Re: [PATCH 00/25] mm: Page fault accounting cleanups

2020-06-16 Thread Michael Ellerman
Linus Torvalds writes: > On Mon, Jun 15, 2020 at 3:16 PM Peter Xu wrote: >> This series tries to address all of them by introducing mm_fault_accounting() >> first, so that we move all the page fault accounting into the common code >> base, >> then call it properly from arch pf handlers just

Re: [PATCH] powerpc/8xx: use pmd_off() to access a PMD entry in pte_update()

2020-06-16 Thread Michael Ellerman
Andrew Morton writes: > On Mon, 15 Jun 2020 12:22:29 +0300 Mike Rapoport wrote: > >> From: Mike Rapoport >> >> The pte_update() implementation for PPC_8xx unfolds page table from the PGD >> level to access a PMD entry. Since 8xx has only 2-level page table this can >> be simplified with

[PATCH 2/2] powerpc/syscalls: Split SPU-ness out of ABI

2020-06-16 Thread Michael Ellerman
with a single "spu" field. If the field has the value "spu" then the syscall is available to SPU programs, any other value or no entry entirely means the syscall is not available to SPU programs. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/syscalls/Makefile |

[PATCH 1/2] powerpc/syscalls: Use the number when building SPU syscall table

2020-06-16 Thread Michael Ellerman
e compiler. Signed-off-by: Michael Ellerman Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20190116132714.20094-1-...@ellerman.id.au --- arch/powerpc/platforms/cell/spu_callbacks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/cell/spu_callbacks

Re: [PATCH] powerpc/ptdump: Fix build failure in hashpagetable.c

2020-06-16 Thread Michael Ellerman
Christophe Leroy writes: > H_SUCCESS is only defined when CONFIG_PPC_PSERIES is defined. It's always defined in hvcall.h, but it doesn't always get included via plpar_wrappers.h. It looks to be CONFIG_SMP=n that causes that, for SMP=y we get a copy via asm/spinlock.h > != H_SUCCESS means != 0.

[GIT PULL] Please pull powerpc/linux.git powerpc-5.8-2 tag

2020-06-13 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull a powerpc fix for 5.8: The following changes since commit 7ae77150d94d3b535c7b85e6b3647113095e79bf: Merge tag 'powerpc-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux (2020-06-05 12:39:30 -0700)

Re: [PATCH v4 1/2] powerpc/uaccess: Implement unsafe_put_user() using 'asm goto'

2020-06-13 Thread Michael Ellerman
Nick Desaulniers writes: > On Thu, Jun 11, 2020 at 4:53 PM Segher Boessenkool > wrote: >> >> On Thu, Jun 11, 2020 at 03:43:55PM -0700, Nick Desaulniers wrote: >> > Segher, Cristophe, I suspect Clang is missing support for the %L and %U >> > output templates [1]. ... > > IIUC the bug report

Re: [PATCH v4 0/2] Recommend denylist/allowlist instead of blacklist/whitelist

2020-06-12 Thread Michael Ellerman
Jiri Slaby writes: > On 11. 06. 20, 9:38, SeongJae Park wrote: >> On Wed, 10 Jun 2020 23:35:24 -0700 Joe Perches wrote: >>> On Thu, 2020-06-11 at 08:25 +0200, SeongJae Park wrote: From: SeongJae Park This patchset 1) adds support of deprecated terms in the 'checkpatch.pl'

Re: [PATCH] powerpc/pseries/svm: Fixup align argument in alloc_shared_lppaca() function

2020-06-10 Thread Michael Ellerman
Satheesh Rajendran writes: > Argument "align" in alloc_shared_lppaca() function was unused inside the > function. Let's fix it and update code comment. I think it would be better to drop the align argument entirely and keep that logic, and the comment, internal to alloc_shared_lppaca(). cheers

Re: [PATCH] powerpc/kprobes: Use probe_address() to read instructions

2020-06-10 Thread Michael Ellerman
Christoph Hellwig writes: > On Tue, Jun 09, 2020 at 03:28:38PM +1000, Michael Ellerman wrote: >> On Mon, 24 Feb 2020 18:02:10 + (UTC), Christophe Leroy wrote: >> > In order to avoid Oopses, use probe_address() to read the >> > instruction at the address where the tr

Re: ipr crashes due to NULL dma_need_drain since cc97923a5bcc ("block: move dma drain handling to scsi")

2020-06-09 Thread Michael Ellerman
A drivers > > We need ata_scsi_dma_need_drain for all drivers wired up to drive ATAPI > devices through libata. That also includes the SAS HBA drivers in > addition to native libata HBA drivers. > > Fixes: cc97923a5bcc ("block: move dma drain handling to scsi") > Reported-by: Michae

ipr crashes due to NULL dma_need_drain since cc97923a5bcc ("block: move dma drain handling to scsi")

2020-06-09 Thread Michael Ellerman
Hi all, I'm seeing crashes on powerpc with the ipr driver, which I'm fairly sure are due to dma_need_drain being NULL. The backtrace is: scsi_init_io+0x1d8/0x350 scsi_queue_rq+0x7a4/0xc30 blk_mq_dispatch_rq_list+0x1b0/0x910 blk_mq_sched_dispatch_requests+0x154/0x270

Re: [PATCH] powerpc/powernv: Fix a warning message

2020-06-09 Thread Michael Ellerman
On Sat, 2020-05-02 at 11:59:49 UTC, Christophe JAILLET wrote: > Fix a cut'n'paste error in a warning message. This should be > 'cpu-idle-state-residency-ns' to match the property searched in the > previous 'of_property_read_u32_array()' > > Fixes: 9c7b185ab2fe ("powernv/cpuidle: Parse dt idle

Re: [PATCH v2 1/1] powerpc/crash: Use NMI context for printk when starting to crash

2020-06-08 Thread Michael Ellerman
On Tue, 12 May 2020 18:45:35 -0300, Leonardo Bras wrote: > Currently, if printk lock (logbuf_lock) is held by other thread during > crash, there is a chance of deadlocking the crash on next printk, and > blocking a possibly desired kdump. > > At the start of default_machine_crash_shutdown, make

Re: [PATCH v6 0/2] Implement reentrant rtas call

2020-06-08 Thread Michael Ellerman
On Mon, 18 May 2020 20:42:43 -0300, Leonardo Bras wrote: > Patch 2 implement rtas_call_reentrant() for reentrant rtas-calls: > "ibm,int-on", "ibm,int-off",ibm,get-xive" and "ibm,set-xive", > according to LoPAPR Version 1.1 (March 24, 2016). > > For that, it's necessary that every call uses a

Re: [PATCH] hw_breakpoint: Fix build warnings with clang

2020-06-08 Thread Michael Ellerman
On Tue, 2 Jun 2020 09:42:08 +0530, Ravi Bangoria wrote: > kbuild test robot reported few build warnings with hw_breakpoint code > when compiled with clang[1]. Fix those. > > [1]: > https://lore.kernel.org/linuxppc-dev/202005192233.oi9cjrta%25...@intel.com/ Applied to powerpc/next. [1/1]

Re: [PATCH] powerpc/wii: Fix declaration made after definition

2020-06-08 Thread Michael Ellerman
On Mon, 13 Apr 2020 12:06:45 -0700, Nathan Chancellor wrote: > A 0day randconfig uncovered an error with clang, trimmed for brevity: > > arch/powerpc/platforms/embedded6xx/wii.c:195:7: error: attribute > declaration must precede definition [-Werror,-Wignored-attributes] > if

Re: [PATCH] powerpc/kprobes: Use probe_address() to read instructions

2020-06-08 Thread Michael Ellerman
On Mon, 24 Feb 2020 18:02:10 + (UTC), Christophe Leroy wrote: > In order to avoid Oopses, use probe_address() to read the > instruction at the address where the trap happened. Applied to powerpc/next. [1/1] powerpc/kprobes: Use probe_address() to read instructions

Re: [PATCH] powerpc/32: disable KASAN with pages bigger than 16k

2020-06-08 Thread Michael Ellerman
On Thu, 28 May 2020 10:17:04 + (UTC), Christophe Leroy wrote: > Mapping of early shadow area is implemented by using a single static > page table having all entries pointing to the same early shadow page. > The shadow area must therefore occupy full PGD entries. > > The shadow area has a size

Re: [PATCH] input: i8042: Remove special PowerPC handling

2020-06-08 Thread Michael Ellerman
On Mon, 18 May 2020 11:10:43 -0700, Nathan Chancellor wrote: > This causes a build error with CONFIG_WALNUT because kb_cs and kb_data > were removed in commit 917f0af9e5a9 ("powerpc: Remove arch/ppc and > include/asm-ppc"). > > ld.lld: error: undefined symbol: kb_cs > > referenced by

Re: [PATCH v3 1/1] powerpc/kernel: Enables memory hot-remove after reboot on pseries guests

2020-06-08 Thread Michael Ellerman
On Thu, 2 Apr 2020 16:51:57 -0300, Leonardo Bras wrote: > While providing guests, it's desirable to resize it's memory on demand. > > By now, it's possible to do so by creating a guest with a small base > memory, hot-plugging all the rest, and using 'movable_node' kernel > command-line parameter,

Re: [PATCH v2] powerpc/32s: Fix another build failure with CONFIG_PPC_KUAP_DEBUG

2020-06-08 Thread Michael Ellerman
On Sat, 30 May 2020 17:16:33 + (UTC), Christophe Leroy wrote: > 'thread' doesn't exist in kuap_check() macro. > > Use 'current' instead. Applied to powerpc/next. [1/1] powerpc/32s: Fix another build failure with CONFIG_PPC_KUAP_DEBUG

Re: [PATCH] powerpc/uaccess: Don't set KUEP by default on book3s/32

2020-06-08 Thread Michael Ellerman
On Wed, 15 Apr 2020 14:57:11 + (UTC), Christophe Leroy wrote: > On book3s/32, KUEP is an heavy process as it requires to > set/unset the NX bit in each of the 12 user segments > everytime the kernel is entered/exited from/to user space. > > Don't select KUEP by default on book3s/32. Applied

Re: [PATCH] macintosh/ams-input: switch to using input device polling mode

2020-06-08 Thread Michael Ellerman
On Wed, 2 Oct 2019 14:48:54 -0700, Dmitry Torokhov wrote: > Now that instances of input_dev support polling mode natively, > we no longer need to create input_polled_dev instance. Applied to powerpc/next. [1/1] macintosh/ams-input: switch to using input device polling mode

Re: [PATCH v2 01/12] powerpc/52xx: Blacklist functions running with MMU disabled for kprobe

2020-06-08 Thread Michael Ellerman
On Tue, 31 Mar 2020 16:03:36 + (UTC), Christophe Leroy wrote: > kprobe does not handle events happening in real mode, all > functions running with MMU disabled have to be blacklisted. Applied to powerpc/next. [01/12] powerpc/52xx: Blacklist functions running with MMU disabled for kprobe

Re: [PATCH] powerpc/uaccess: Don't set KUAP by default on book3s/32

2020-06-08 Thread Michael Ellerman
On Wed, 15 Apr 2020 14:57:09 + (UTC), Christophe Leroy wrote: > On book3s/32, KUAP is an heavy process as it requires to > determine which segments are impacted and unlock/lock > each of them. > > And since the implementation of user_access_begin/end, it > is even worth for the time being

Re: [PATCH] powerpc/8xx: Reduce time spent in allow_user_access() and friends

2020-06-08 Thread Michael Ellerman
On Wed, 15 Apr 2020 10:06:09 + (UTC), Christophe Leroy wrote: > To enable/disable kernel access to user space, the 8xx has to > modify the properties of access group 1. This is done by writing > predefined values into SPRN_Mx_AP registers. > > As of today, a __put_user() gives: > > 0d64

Re: [PATCH v5 00/13] Modernise powerpc 40x

2020-06-08 Thread Michael Ellerman
On Thu, 21 May 2020 16:55:51 + (UTC), Christophe Leroy wrote: > v1 and v2 of this series were aiming at removing 40x entirely, > but it led to protests. > > v3 is trying to start modernising powerpc 40x: > - Rework TLB miss handlers to not use PTE_ATOMIC_UPDATES and _PAGE_HWWRITE > - Remove

Re: [PATCH v4 00/45] Use hugepages to map kernel mem on 8xx

2020-06-08 Thread Michael Ellerman
On Tue, 19 May 2020 05:48:42 + (UTC), Christophe Leroy wrote: > The main purpose of this big series is to: > - reorganise huge page handling to avoid using mm_slices. > - use huge pages to map kernel memory on the 8xx. > > The 8xx supports 4 page sizes: 4k, 16k, 512k and 8M. > It uses 2 Level

Re: [PATCH v3] powerpc/64s/pgtable: fix an undefined behaviour

2020-06-08 Thread Michael Ellerman
On Thu, 5 Mar 2020 23:48:52 -0500, Qian Cai wrote: > Booting a power9 server with hash MMU could trigger an undefined > behaviour because pud_offset(p4d, 0) will do, > > 0 >> (PAGE_SHIFT:16 + PTE_INDEX_SIZE:8 + H_PMD_INDEX_SIZE:10) > > Fix it by converting pud_index() and friends to static

Re: [PATCH -next] powerpc/powernv: add NULL check after kzalloc

2020-06-08 Thread Michael Ellerman
On Sat, 9 May 2020 10:08:38 +0800, Chen Zhou wrote: > Fixes coccicheck warning: > > ./arch/powerpc/platforms/powernv/opal.c:813:1-5: > alloc with no test, possible model on line 814 > > Add NULL check after kzalloc. Applied to powerpc/next. [1/1] powerpc/powernv: add NULL check after

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.8-1 tag

2020-06-05 Thread Michael Ellerman
Linus Torvalds writes: > On Fri, Jun 5, 2020 at 12:01 PM Linus Torvalds > wrote: >> >> ..and then when I actually compared whether I otherwise got the same >> result as you, I realized that this all depends on the module tree. >> >> I'll go merge that first, and then re-do this all. Oh well. > >

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.8-1 tag

2020-06-05 Thread Michael Ellerman
Linus Torvalds writes: > On Fri, Jun 5, 2020 at 9:38 AM Michael Ellerman wrote: >> >> I've pushed the result of my resolution of the conflicts to the powerpc/merge >> branch, if you want to look at that, though I've also tried to describe it in >> full

[GIT PULL] Please pull powerpc/linux.git powerpc-5.8-1 tag

2020-06-05 Thread Michael Ellerman
e error messages net/ps3_gelic_net: Remove duplicate error message Michael Ellerman (24): Merge VAS page fault handling into next Merge NX gzip support into next Merge branch 'topic/uaccess' into topic/uaccess-ppc Merge tag 'kvm-ppc-fixes-5.7-1' into topic/ppc-kvm M

Re: linux-next: fix ups for clashes between akpm and powerpc trees

2020-06-04 Thread Michael Ellerman
Stephen Rothwell writes: > Hi all, > > On Thu, 4 Jun 2020 16:52:46 +1000 Stephen Rothwell > wrote: >> >> diff --git a/arch/powerpc/mm/kasan/8xx.c b/arch/powerpc/mm/kasan/8xx.c >> index db4ef44af22f..569d98a41881 100644 >> --- a/arch/powerpc/mm/kasan/8xx.c >> +++ b/arch/powerpc/mm/kasan/8xx.c >>

Re: linux-next: fix ups for clashes between akpm and powerpc trees

2020-06-04 Thread Michael Ellerman
Stephen Rothwell writes: > Hi all, > > On Thu, 4 Jun 2020 16:52:46 +1000 Stephen Rothwell > wrote: >> >> diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h >> b/arch/powerpc/include/asm/book3s/64/pgtable.h >> index 25c3cb8272c0..a6799723cd98 100644 >> ---

Re: [PATCH] powerpc/nvram: Replace kmalloc with kzalloc in the error message

2020-06-03 Thread Michael Ellerman
Dan Carpenter writes: > On Tue, Jun 02, 2020 at 09:23:57PM +1000, Michael Ellerman wrote: >> Markus Elfring writes: >> >>>> Please just remove the message instead, it's a tiny allocation that's >> >>>> unlikely to ever fail, and the caller will pr

Re: [PATCH v8 0/8] powerpc: switch VDSO to C implementation

2020-06-03 Thread Michael Ellerman
Christophe Leroy writes: > Hi Michael, > > Le 28/04/2020 à 15:16, Christophe Leroy a écrit : >> This is the seventh version of a series to switch powerpc VDSO to >> generic C implementation. >> >> Main changes since v7 are: >> - Added gettime64 on PPC32 >> >> This series applies on today's

Re: [PATCH] cxl: Fix kobject memory leak in cxl_sysfs_afu_new_cr()

2020-06-02 Thread Michael Ellerman
"wanghai (M)" writes: > 在 2020/6/3 1:20, Markus Elfring 写道: >>> Fix it by adding a call to kobject_put() in the error path of >>> kobject_init_and_add(). >> Thanks for another completion of the exception handling. >> >> Would an other patch subject be a bit nicer? > Thanks for the guidance, I

Re: [PATCH] powerpc/nvram: Replace kmalloc with kzalloc in the error message

2020-06-02 Thread Michael Ellerman
Markus Elfring writes: Please just remove the message instead, it's a tiny allocation that's unlikely to ever fail, and the caller will print an error anyway. >>> >>> How do you think about to take another look at a previous update suggestion >>> like the following? >>> >>>

Re: [PATCH] hw_breakpoint: Fix build warnings with clang

2020-06-02 Thread Michael Ellerman
Christophe Leroy writes: > Le 02/06/2020 à 06:12, Ravi Bangoria a écrit : >> kbuild test robot reported few build warnings with hw_breakpoint code >> when compiled with clang[1]. Fix those. >> >> [1]: >> https://lore.kernel.org/linuxppc-dev/202005192233.oi9cjrta%25...@intel.com/ >> This

Re: [PATCH] powerpc/32: disable KASAN with pages bigger than 16k

2020-06-02 Thread Michael Ellerman
e rework the early shadow mapping, disable KASAN when the page size is too big. Fixes: 2edb16efc899 ("powerpc/32: Add KASAN support") Cc: sta...@vger.kernel.org # v5.2+ Reported-by: kbuild test robot Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link:

Re: [PATCH] powerpc/nvram: Replace kmalloc with kzalloc in the error message

2020-06-01 Thread Michael Ellerman
Markus Elfring writes: >> Please just remove the message instead, it's a tiny allocation that's >> unlikely to ever fail, and the caller will print an error anyway. > > How do you think about to take another look at a previous update suggestion > like the following? > > powerpc/nvram: Delete

[tip: timers/core] clocksource/drivers/timer-microchip-pit64b: Select CONFIG_TIMER_OF

2020-06-01 Thread tip-bot2 for Michael Ellerman
The following commit has been merged into the timers/core branch of tip: Commit-ID: 25259f7a5de2de9d67793dc584b15c83a3134c93 Gitweb: https://git.kernel.org/tip/25259f7a5de2de9d67793dc584b15c83a3134c93 Author:Michael Ellerman AuthorDate:Sun, 26 Apr 2020 22:43:56 +10:00

[GIT PULL] Please pull powerpc/linux.git powerpc-5.7-6 tag

2020-05-30 Thread Michael Ellerman
sers for C syscall/interrupt entry/exit code Michael Ellerman (1): powerpc/64s: Fix restore of NV GPRs after facility unavailable exception arch/powerpc/kernel/Makefile | 3 +++ arch/powerpc/kernel/exceptions-64s.S | 2 ++ 2 files changed, 5 insertions(+) -BEGIN PGP

Re: [PATCH v4 1/2] powerpc/uaccess: Implement unsafe_put_user() using 'asm goto'

2020-05-28 Thread Michael Ellerman
On Fri, 2020-04-17 at 17:08:51 UTC, Christophe Leroy wrote: > unsafe_put_user() is designed to take benefit of 'asm goto'. > > Instead of using the standard __put_user() approach and branch > based on the returned error, use 'asm goto' and make the > exception code branch directly to the error

Re: [PATCH v2 4/5] powerpc/uaccess: Implement user_read_access_begin and user_write_access_begin

2020-05-28 Thread Michael Ellerman
On Fri, 2020-04-03 at 07:20:53 UTC, Christophe Leroy wrote: > Add support for selective read or write user access with > user_read_access_begin/end and user_write_access_begin/end. > > Signed-off-by: Christophe Leroy > Reviewed-by: Kees Cook Applied to powerpc topic/uaccess-ppc, thanks.

Re: [PATCH v4 2/2] powerpc/uaccess: Implement unsafe_copy_to_user() as a simple loop

2020-05-28 Thread Michael Ellerman
On Fri, 2020-04-17 at 17:08:52 UTC, Christophe Leroy wrote: > At the time being, unsafe_copy_to_user() is based on > raw_copy_to_user() which calls __copy_tofrom_user(). > > __copy_tofrom_user() is a big optimised function to copy big amount > of data. It aligns destinations to cache line in

Re: [PATCH v2 2/5] uaccess: Selectively open read or write user access

2020-05-28 Thread Michael Ellerman
On Fri, 2020-04-03 at 07:20:51 UTC, Christophe Leroy wrote: > When opening user access to only perform reads, only open read access. > When opening user access to only perform writes, only open write > access. > > Signed-off-by: Christophe Leroy > Reviewed-by: Kees Cook Applied to powerpc

Re: [PATCH v2 1/5] uaccess: Add user_read_access_begin/end and user_write_access_begin/end

2020-05-28 Thread Michael Ellerman
On Fri, 2020-04-03 at 07:20:50 UTC, Christophe Leroy wrote: > Some architectures like powerpc64 have the capability to separate > read access and write access protection. > For get_user() and copy_from_user(), powerpc64 only open read access. > For put_user() and copy_to_user(), powerpc64 only

Re: [PATCH v2 3/5] drm/i915/gem: Replace user_access_begin by user_write_access_begin

2020-05-28 Thread Michael Ellerman
On Fri, 2020-04-03 at 07:20:52 UTC, Christophe Leroy wrote: > When i915_gem_execbuffer2_ioctl() is using user_access_begin(), > that's only to perform unsafe_put_user() so use > user_write_access_begin() in order to only open write access. > > Signed-off-by: Christophe Leroy > Reviewed-by: Kees

Re: [PATCH] powerpc/nvram: Replace kmalloc with kzalloc in the error message

2020-05-28 Thread Michael Ellerman
Yi Wang writes: > From: Liao Pingfang > > Use kzalloc instead of kmalloc in the error message according to > the previous kzalloc() call. Please just remove the message instead, it's a tiny allocation that's unlikely to ever fail, and the caller will print an error anyway. cheers > diff --git

Re: [PATCH] powerpc/bpf: Enable bpf_probe_read{, str}() on powerpc again

2020-05-28 Thread Michael Ellerman
Daniel Borkmann writes: > On 5/28/20 2:23 PM, Michael Ellerman wrote: >> Petr Mladek writes: >>> On Thu 2020-05-28 11:03:43, Michael Ellerman wrote: >>>> Petr Mladek writes: >>>>> The commit 0ebeea8ca8a4d1d453a ("bpf: Restrict bpf_probe_read{,

Re: [PATCH] Revert "powerpc/32s: reorder Linux PTE bits to better match Hash PTE bits."

2020-05-28 Thread Michael Ellerman
On Wed, 20 May 2020 10:23:45 + (UTC), Christophe Leroy wrote: > This reverts commit 697ece78f8f749aeea40f2711389901f0974017a. > > The implementation of SWAP on powerpc requires page protection > bits to not be one of the least significant PTE bits. > > Until the SWAP implementation is

Re: [PATCH v2] powerpc/wii: Fix declaration made after definition

2020-05-28 Thread Michael Ellerman
Nathan Chancellor writes: > A 0day randconfig uncovered an error with clang, trimmed for brevity: > > arch/powerpc/platforms/embedded6xx/wii.c:195:7: error: attribute > declaration must precede definition [-Werror,-Wignored-attributes] > if (!machine_is(wii)) > ^ > > The

Re: [PATCH] powerpc/bpf: Enable bpf_probe_read{, str}() on powerpc again

2020-05-28 Thread Michael Ellerman
Petr Mladek writes: > On Thu 2020-05-28 11:03:43, Michael Ellerman wrote: >> Petr Mladek writes: >> > The commit 0ebeea8ca8a4d1d453a ("bpf: Restrict bpf_probe_read{, str}() only >> > to archs where they work") caused that bpf_probe_read{, str}() fun

Re: [PATCH] powerpc/bpf: Enable bpf_probe_read{, str}() on powerpc again

2020-05-27 Thread Michael Ellerman
Petr Mladek writes: > The commit 0ebeea8ca8a4d1d453a ("bpf: Restrict bpf_probe_read{, str}() only > to archs where they work") caused that bpf_probe_read{, str}() functions > were not longer available on architectures where the same logical address > might have different content in kernel and

Re: [PATCH v4 07/45] powerpc/ptdump: Limit size of flags text to 1/2 chars on PPC32

2020-05-26 Thread Michael Ellerman
Christophe Leroy writes: > Le 25/05/2020 à 07:15, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> In order to have all flags fit on a 80 chars wide screen, >>> reduce the flags to 1 char (2 where ambiguous). >> >> I don't love this, the outpu

Re: [RESEND PATCH v7 4/5] ndctl/papr_scm, uapi: Add support for PAPR nvdimm specific methods

2020-05-26 Thread Michael Ellerman
Vaibhav Jain writes: > Hi Ira, Mpe and Aneesh, > > Vaibhav Jain writes: > >> Michael Ellerman writes: >> >>> Ira Weiny writes: >>>> On Wed, May 20, 2020 at 12:30:57AM +0530, Vaibhav Jain wrote: >>>>> Introduce support for Papr nvDi

Re: [PATCH v2] relay: handle alloc_percpu returning NULL in relay_open

2020-05-25 Thread Michael Ellerman
zbot+587b2421926808309...@syzkaller-ppc64.appspotmail.com >>> > Reported-by: syzbot+58320b7171734bf79...@syzkaller.appspotmail.com >>> > Reported-by: syzbot+d6074fb08bdb2e010...@syzkaller.appspotmail.com >>> > Cc: Akash Goel >>> > Cc: Andrew D

Re: [PATCH v4 14/45] powerpc/32s: Don't warn when mapping RO data ROX.

2020-05-24 Thread Michael Ellerman
Christophe Leroy writes: > Mapping RO data as ROX is not an issue since that data > cannot be modified to introduce an exploit. Being pedantic: it is still an issue, in that it means there's more targets for a code-reuse attack. But given the entire kernel text is also available for code-reuse

Re: [PATCH v4 07/45] powerpc/ptdump: Limit size of flags text to 1/2 chars on PPC32

2020-05-24 Thread Michael Ellerman
Christophe Leroy writes: > In order to have all flags fit on a 80 chars wide screen, > reduce the flags to 1 char (2 where ambiguous). I don't love this, the output is less readable. Is fitting on an 80 char screen a real issue for you? I just make my terminal window bigger. cheers > No cache

Re: [PATCH v4 1/2] x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()

2020-05-23 Thread Michael Ellerman
nore > +++ b/tools/testing/selftests/powerpc/copyloops/.gitignore > @@ -12,4 +12,4 @@ memcpy_p7_t1 > copyuser_64_exc_t0 > copyuser_64_exc_t1 > copyuser_64_exc_t2 > -memcpy_mcsafe_64 > +copy_mc_to_user Should be: +copy_mc_64 Otherwise the powerpc bits look good to me. Ack

Re: [PATCH v4 1/6] printk: Collapse shutdown types into a single dump reason

2020-05-23 Thread Michael Ellerman
/* These are almost always orderly shutdowns. */ > return; > case KMSG_DUMP_OOPS: Acked-by: Michael Ellerman (powerpc) cheers

[GIT PULL] Please pull powerpc/linux.git powerpc-5.7-5 tag

2020-05-22 Thread Michael Ellerman
Salvaterra. - -- Christophe Leroy (1): Revert "powerpc/32s: reorder Linux PTE bits to better match Hash PTE bits." Michael Ellerman (1): powerpc/64s: Disable STRICT_KERNEL_RWX arch/powerpc/Kconfig | 2 +- arch

Re: [RESEND PATCH v7 3/5] powerpc/papr_scm: Fetch nvdimm health information from PHYP

2020-05-21 Thread Michael Ellerman
Vaibhav Jain writes: > Thanks for reviewing this this patch Ira. My responses below: > Ira Weiny writes: >> On Wed, May 20, 2020 at 12:30:56AM +0530, Vaibhav Jain wrote: >>> Implement support for fetching nvdimm health information via >>> H_SCM_HEALTH hcall as documented in Ref[1]. The hcall

Re: [PATCH] input: i8042: Remove special PowerPC handling

2020-05-21 Thread Michael Ellerman
Dmitry Torokhov writes: > Hi Michael, > > On Wed, May 20, 2020 at 04:07:00PM +1000, Michael Ellerman wrote: >> [ + Dmitry & linux-input ] >> >> Nathan Chancellor writes: >> > This causes a build error with CONFIG_WALNUT because kb_cs and kb_data

Re: [RESEND PATCH v7 4/5] ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods

2020-05-21 Thread Michael Ellerman
Ira Weiny writes: > On Wed, May 20, 2020 at 12:30:57AM +0530, Vaibhav Jain wrote: >> Introduce support for Papr nvDimm Specific Methods (PDSM) in papr_scm >> modules and add the command family to the white list of NVDIMM command >> sets. Also advertise support for ND_CMD_CALL for the dimm >>

Re: [PATCH] powerpc/5200: update contact email

2020-05-20 Thread Michael Ellerman
On Sat, 2 May 2020 16:26:42 +0200, Wolfram Sang wrote: > My 'pengutronix' address is defunct for years. Merge the entries and use > the proper contact address. Applied to powerpc/next. [1/1] powerpc/5200: update contact email

Re: [PATCH v6 00/16] powerpc/watchpoint: Preparation for more than one watchpoint

2020-05-20 Thread Michael Ellerman
On Thu, 14 May 2020 16:47:25 +0530, Ravi Bangoria wrote: > So far, powerpc Book3S code has been written with an assumption of > only one watchpoint. But Power10[1] is introducing second watchpoint > register (DAWR). Even though this patchset does not enable 2nd DAWR, > it makes the infrastructure

Re: [PATCH 1/5] drivers/powerpc: Replace _ALIGN_UP() by ALIGN()

2020-05-20 Thread Michael Ellerman
On Mon, 20 Apr 2020 18:36:34 + (UTC), Christophe Leroy wrote: > _ALIGN_UP() is specific to powerpc > ALIGN() is generic and does the same > > Replace _ALIGN_UP() by ALIGN() Applied to powerpc/next. [1/5] drivers/powerpc: Replace _ALIGN_UP() by ALIGN()

Re: [PATCH] powerpc/kasan: Fix stack overflow by increasing THREAD_SHIFT

2020-05-20 Thread Michael Ellerman
On Wed, 8 Apr 2020 15:58:49 + (UTC), Christophe Leroy wrote: > When CONFIG_KASAN is selected, the stack usage is increased. > > In the same way as x86 and arm64 architectures, increase > THREAD_SHIFT when CONFIG_KASAN is selected. Applied to powerpc/next. [1/1] powerpc/kasan: Fix stack

Re: [PATCH] powerpc/8xx: Update email address in MAINTAINERS

2020-05-20 Thread Michael Ellerman
On Wed, 6 May 2020 06:51:59 + (UTC), Christophe Leroy wrote: > Since 01 May 2020, our email adresses have changed to @csgroup.eu > > Update MAINTAINERS accordingly. Applied to powerpc/next. [1/1] powerpc/8xx: Update email address in MAINTAINERS

Re: [PATCH] powerpc: Replace zero-length array with flexible-array

2020-05-20 Thread Michael Ellerman
On Thu, 7 May 2020 13:57:49 -0500, Gustavo A. R. Silva wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99:

Re: [PATCH] powerpc/mm: Replace zero-length array with flexible-array

2020-05-20 Thread Michael Ellerman
On Thu, 7 May 2020 13:57:55 -0500, Gustavo A. R. Silva wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99:

Re: [PATCH] of: drop a reference on error in __of_attach_node_sysfs()

2020-05-20 Thread Michael Ellerman
Dan Carpenter writes: > We add a new of_node_get() to this function, but we should drop the > reference if kobject_add(). ^ fails? > > Fixes: 5b2c2f5a0ea3 ("of: overlay: add missing of_node_get() in > __of_attach_node_sysfs") >

Re: [PATCH v3 1/2] x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()

2020-05-20 Thread Michael Ellerman
Hi Dan, Just a couple of minor things ... Dan Williams writes: > In reaction to a proposal to introduce a memcpy_mcsafe_fast() > implementation Linus points out that memcpy_mcsafe() is poorly named > relative to communicating the scope of the interface. Specifically what > addresses are valid

Re: [PATCH] input: i8042: Remove special PowerPC handling

2020-05-20 Thread Michael Ellerman
> drivers/input/serio/i8042.h | 2 -- > 2 files changed, 59 deletions(-) > delete mode 100644 drivers/input/serio/i8042-ppcio.h This LGTM. Acked-by: Michael Ellerman (powerpc) I assumed drivers/input/serio would be pretty quiet, but there's actually some commits t

Re: linux-next: manual merge of the rcu tree with the powerpc tree

2020-05-19 Thread Michael Ellerman
Stephen Rothwell writes: > Hi all, > > Today's linux-next merge of the rcu tree got a conflict in: > > arch/powerpc/kernel/traps.c > > between commit: > > 116ac378bb3f ("powerpc/64s: machine check interrupt update NMI accounting") > > from the powerpc tree and commit: > > 187416eeb388

Remove WALNUT hacks in serio/i8042 (was Re: ld.lld: error: undefined symbol: kb_cs)

2020-05-18 Thread Michael Ellerman
[ Cc += linuxppc-dev ] Nathan Chancellor writes: > On Thu, May 14, 2020 at 08:13:48AM +0800, kbuild test robot wrote: >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git >> master >> head: 24085f70a6e1b0cb647ec92623284641d8270637 >> commit:

Re: [PATCH] powerpc/sysdev: fix compile errors

2020-05-18 Thread Michael Ellerman
Jiri Kosina writes: > On Mon, 18 May 2020, Jiri Kosina wrote: >> > > Include linux/io.h into fsl_85xx_cache_sram.c to fix the >> > > implicit-declaration compile errors when building Cache-Sram. >> > > >> > > arch/powerpc/sysdev/fsl_85xx_cache_sram.c: In function >> > > ‘instantiate_cache_sram’:

[GIT PULL] Please pull powerpc/linux.git powerpc-5.7-4 tag

2020-05-16 Thread Michael Ellerman
powerpc/vdso32: Fallback on getres syscall when clock is unknown powerpc/40x: Make more space for system call exception Michael Ellerman (2): Merge KUAP fix from topic/uaccess-ppc into fixes powerpc/64s: Fix unrecoverable SLB crashes due to preemption check Nayna Jain (1

Re: [PATCH 2/2] perf: Add missing metrics to POWER9 'cpi_breakdown'

2020-05-16 Thread Michael Ellerman
"Paul A. Clarke" writes: > On Wed, May 13, 2020 at 06:28:31PM +1000, Michael Ellerman wrote: >> "Paul A. Clarke" writes: >> > Add the following metrics to the POWER9 'cpi_breakdown' metricgroup: >> > - ict_noslot_br_mpred_cpi >> > - ict_no

Re: [PATCH 06/11] powerpc/xmon: constify sysrq_key_op

2020-05-13 Thread Michael Ellerman
Emil Velikov writes: > With earlier commits, the API no longer discards the const-ness of the > sysrq_key_op. As such we can add the notation. > > Cc: Greg Kroah-Hartman > Cc: Jiri Slaby > Cc: linux-kernel@vger.kernel.org > Cc: Michael Ellerman > Cc: Benjamin H

Re: [PATCH fixes] powerpc/40x: Make more space for system call exception

2020-05-13 Thread Michael Ellerman
On Sat, 9 May 2020 17:05:11 + (UTC), Christophe Leroy wrote: > When CONFIG_VIRT_CPU_ACCOUNTING is selected, system call exception > handler doesn't fit below 0xd00 and build fails. > > As exception 0xd00 doesn't exist and is never generated by 40x, > comment it out in order to get more space

Re: [PATCH v2] powerpc/ima: fix secure boot rules in ima arch policy

2020-05-13 Thread Michael Ellerman
On Fri, 1 May 2020 10:16:52 -0400, Nayna Jain wrote: > To prevent verifying the kernel module appended signature twice > (finit_module), once by the module_sig_check() and again by IMA, powerpc > secure boot rules define an IMA architecture specific policy rule > only if CONFIG_MODULE_SIG_FORCE is

Re: [PATCH fixes] powerpc/vdso32: Fallback on getres syscall when clock is unknown

2020-05-13 Thread Michael Ellerman
On Sat, 9 May 2020 09:42:14 + (UTC), Christophe Leroy wrote: > There are other clocks than the standard ones, for instance > per process clocks. Therefore, being above the last standard clock > doesn't mean it is a bad clock. So, fallback to syscall instead > of returning -EINVAL

Re: [PATCH] powerpc/32s: Fix build failure with CONFIG_PPC_KUAP_DEBUG

2020-05-13 Thread Michael Ellerman
On Mon, 20 Apr 2020 07:47:05 + (UTC), Christophe Leroy wrote: > gpr2 is not a parametre of kuap_check(), it doesn't exist. > > Use gpr instead. Applied to powerpc/fixes. [1/1] powerpc/32s: Fix build failure with CONFIG_PPC_KUAP_DEBUG

Re: [PATCH 2/2] perf: Add missing metrics to POWER9 'cpi_breakdown'

2020-05-13 Thread Michael Ellerman
"Paul A. Clarke" writes: > From: "Paul A. Clarke" > > Add the following metrics to the POWER9 'cpi_breakdown' metricgroup: > - ict_noslot_br_mpred_cpi > - ict_noslot_br_mpred_icmiss_cpi > - ict_noslot_cyc_other_cpi > - ict_noslot_disp_held_cpi > - ict_noslot_disp_held_hb_full_cpi > -

Re: [PATCH] powerpc/kvm: silence kmemleak false positives

2020-05-12 Thread Michael Ellerman
Qian Cai writes: > kvmppc_pmd_alloc() and kvmppc_pte_alloc() allocate some memory but then > pud_populate() and pmd_populate() will use __pa() to reference the newly > allocated memory. The same is in xive_native_provision_pages(). Can you please split this into two patches, one for the KVM

Re: [PATCH] powerpc/kvm: silence kmemleak false positives

2020-05-12 Thread Michael Ellerman
Catalin Marinas writes: > On Mon, May 11, 2020 at 09:15:55PM +1000, Michael Ellerman wrote: >> Qian Cai writes: >> > kvmppc_pmd_alloc() and kvmppc_pte_alloc() allocate some memory but then >> > pud_populate() and pmd_populate() will use __pa() to reference the

Re: [PATCH v3 1/1] ppc/crash: Reset spinlocks during crash

2020-05-12 Thread Michael Ellerman
Paul Mackerras writes: > On Wed, Apr 08, 2020 at 10:21:29PM +1000, Michael Ellerman wrote: >> >> We should be able to just allocate the rtas_args on the stack, it's only >> ~80 odd bytes. And then we can use rtas_call_unlocked() which doesn't >> take the global lock.

Re: [PATCH v3 1/3] powerpc/numa: Set numa_node for all possible cpus

2020-05-11 Thread Michael Ellerman
? > > We can fold this into numa_setup_cpu(). > > However till now we were sure that numa_setup_cpu() would be called only for > a present cpu. That assumption will change. > + (non-consequential) an additional check everytime cpu is hotplugged in. > > If Michael Ellerman is okay with the change, I can fold it in. Yes I agree it would be better in numa_setup_cpu(). cheers

Re: [PATCH] powerpc/kvm: silence kmemleak false positives

2020-05-11 Thread Michael Ellerman
Qian Cai writes: > kvmppc_pmd_alloc() and kvmppc_pte_alloc() allocate some memory but then > pud_populate() and pmd_populate() will use __pa() to reference the newly > allocated memory. The same is in xive_native_provision_pages(). > > Since kmemleak is unable to track the physical memory

Re: [PATCH v7 2/5] seq_buf: Export seq_buf_printf() to external modules

2020-05-08 Thread Michael Ellerman
Borislav Petkov writes: > On Fri, May 08, 2020 at 04:19:19PM +0530, Vaibhav Jain wrote: >> 'seq_buf' provides a very useful abstraction for writing to a string >> buffer without needing to worry about it over-flowing. However even >> though the API has been stable for couple of years now its

[PATCH 1/2] selftests/lkdtm: Don't clear dmesg when running tests

2020-05-08 Thread Michael Ellerman
that to the dmesg afterward, producing a log with just the added lines. Signed-off-by: Michael Ellerman --- tools/testing/selftests/lkdtm/run.sh | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/lkdtm/run.sh b/tools/testing/selftests/lkdtm/run.sh index

[PATCH 2/2] selftests/lkdtm: Use grep -E instead of egrep

2020-05-08 Thread Michael Ellerman
shellcheck complains that egrep is deprecated, and the grep man page agrees. Use grep -E instead. Signed-off-by: Michael Ellerman --- tools/testing/selftests/lkdtm/run.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/lkdtm/run.sh b/tools

Re: [PATCH] powerpc/5200: update contact email

2020-05-06 Thread Michael Ellerman
Wolfram Sang writes: >> > My 'pengutronix' address is defunct for years. Merge the entries and use >> > the proper contact address. >> >> Is there any point adding the new address? It's just likely to bit-rot >> one day too. > > At least, this one is a group address, not an individual one, so

Re: [PATCH v5 1/5] powerpc: Move idle_loop_prolog()/epilog() functions to header file

2020-05-05 Thread Michael Ellerman
On Tue, 2020-04-07 at 08:47:39 UTC, "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > Currently prior to entering an idle state on a Linux Guest, the > pseries cpuidle driver implement an idle_loop_prolog() and > idle_loop_epilog() functions which ensure that idle_purr is correctly >

Re: [PATCH] powerpc/ps3: Move static keyword to the front of declaration

2020-05-05 Thread Michael Ellerman
On Wed, 2020-04-29 at 10:00:48 UTC, Xiongfeng Wang wrote: > Move the static keyword to the front of declaration of 'vuart_bus_priv', > and resolve the following compiler warning that can be seen when > building with warnings enabled (W=1): > > drivers/ps3/ps3-vuart.c:867:1: warning: ‘static’

<    2   3   4   5   6   7   8   9   10   11   >