Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread Anshuman Khandual
On 5/17/21 11:25 AM, Aneesh Kumar K.V wrote: > On 5/17/21 11:17 AM, Christophe Leroy wrote: >> +aneesh >> +linuxppc-dev list >> >> Le 17/05/2021 à 07:44, Anshuman Khandual a écrit : >>> Hello Christophe, >>> >>> DEBUG_VM_PGTABLE has now been re-enabled on powerpc recently ? was not >>> aware abo

Re: [FSL P50x0] KVM HV doesn't work anymore

2021-05-17 Thread Nicholas Piggin
Excerpts from Christian Zigotzky's message of May 15, 2021 11:46 pm: > On 15 May 2021 at 12:08pm Christophe Leroy wrote: >> >> >> Le 15/05/2021 à 11:48, Christian Zigotzky a écrit : >>> Hi All, >>> >>> I bisected today [1] and the bisecting itself was OK but the >>> reverting of the bad commit doe

Re: [PATCH 1/2] powerpc/interrupt: Refactor interrupt_exit_user_prepare() and syscall_exit_prepare()

2021-05-17 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of May 14, 2021 6:28 pm: > Last part of interrupt_exit_user_prepare() and syscall_exit_prepare() > are identical. > > Create a __interrupt_exit_user_prepare() function that is called by > both. > > Note that it replaces a local_irq_save(flags) by local_irq

Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread Aneesh Kumar K.V
On 5/17/21 12:55 PM, Anshuman Khandual wrote: On 5/17/21 11:25 AM, Aneesh Kumar K.V wrote: On 5/17/21 11:17 AM, Christophe Leroy wrote: +aneesh +linuxppc-dev list Le 17/05/2021 à 07:44, Anshuman Khandual a écrit : Hello Christophe, DEBUG_VM_PGTABLE has now been re-enabled on powerpc recent

[PATCH 9/9] tty: hvc_console: Move open brace { on the previous line

2021-05-17 Thread Xiaofei Tan
Fix issues that open brace { should be on the previous line, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan --- drivers/tty/hvc/hvc_console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index b6720b

[PATCH 4/9] tty: hvc_console: Fix issues of code indent should use tabs

2021-05-17 Thread Xiaofei Tan
Fix issues of code indent should use tabs, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan --- drivers/tty/hvc/hvc_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index 13f63d5..2e5c133 100644 --- a

[PATCH 1/9] tty: hvc_console: Fix spaces required around that '='

2021-05-17 Thread Xiaofei Tan
Fix spaces required around that '=', reported by checkpatch.pl. Signed-off-by: Xiaofei Tan --- drivers/tty/hvc/hvc_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index d0f0253..a1eca9d 100644 --- a/drive

[PATCH 6/9] tty: hvc_console: Fix coding style issues of block comments

2021-05-17 Thread Xiaofei Tan
Fix coding style issues of block comments, reported by checkpatch.pl. Besides, add a period at the end of the sentenses. Signed-off-by: Xiaofei Tan --- drivers/tty/hvc/hvc_console.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/tty/hvc/hvc_console.c

[PATCH 3/9] tty: hvc_console: Remove trailing whitespace

2021-05-17 Thread Xiaofei Tan
Remove trailing whitespace, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan --- drivers/tty/hvc/hvc_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index ddf07ff..13f63d5 100644 --- a/drivers/tty/hv

[PATCH 8/9] tty: hvc_console: Remove the repeated words 'no' and 'from'

2021-05-17 Thread Xiaofei Tan
Remove the repeated words 'no' and 'from', reported by checkpatch.pl. Signed-off-by: Xiaofei Tan --- drivers/tty/hvc/hvc_console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index f31efeb..b6720b0 100644 -

[PATCH 2/9] tty: hvc_console: Fix "foo * bar" should be "foo *bar"

2021-05-17 Thread Xiaofei Tan
Fix "foo * bar" should be "foo *bar", reported by checkpatch.pl. Signed-off-by: Xiaofei Tan --- drivers/tty/hvc/hvc_console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index a1eca9d..ddf07ff 100644 --- a/

[PATCH 7/9] tty: hvc_console: Add a blank line after declarations

2021-05-17 Thread Xiaofei Tan
Add a blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan --- drivers/tty/hvc/hvc_console.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index a61cdf0..f31efeb 100644 --- a/drivers/tty/hvc/hvc_c

[PATCH 5/9] tty: hvc_console: Delete spaces prohibited around open parenthesis '(' and ')'

2021-05-17 Thread Xiaofei Tan
Delete spaces prohibited after that open parenthesis '(' and before that close parenthesis ')', reported by checkpatch.pl. Signed-off-by: Xiaofei Tan --- drivers/tty/hvc/hvc_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/

[PATCH 0/9] tty: hvc_console: Fix some coding style issues

2021-05-17 Thread Xiaofei Tan
Fix some issues reported by checkpatch.pl. All of them are coding style issues, no function changes. Xiaofei Tan (9): tty: hvc_console: Fix spaces required around that '=' tty: hvc_console: Fix "foo * bar" should be "foo *bar" tty: hvc_console: Remove trailing whitespace tty: hvc_console:

Re: [PATCH] lockdown, selinux: fix bogus SELinux lockdown permission checks

2021-05-17 Thread Ondrej Mosnacek
On Sat, May 15, 2021 at 2:57 AM Casey Schaufler wrote: > On 5/14/2021 8:12 AM, Ondrej Mosnacek wrote: > > On Wed, May 12, 2021 at 7:12 PM Casey Schaufler > > wrote: > >> On 5/12/2021 9:44 AM, Ondrej Mosnacek wrote: > >>> On Wed, May 12, 2021 at 6:18 PM Casey Schaufler > >>> wrote: > On 5/

Re: [PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument

2021-05-17 Thread Aneesh Kumar K.V
On 5/15/21 10:05 PM, Guenter Roeck wrote: On Thu, Apr 22, 2021 at 11:13:19AM +0530, Aneesh Kumar K.V wrote: No functional change in this patch Signed-off-by: Aneesh Kumar K.V --- .../include/asm/book3s/64/tlbflush-radix.h| 19 +++- arch/powerpc/include/asm/book3s/64/tlbflush.h |

[PATCH v5] pseries/drmem: update LMBs after LPM

2021-05-17 Thread Laurent Dufour
After a LPM, the device tree node ibm,dynamic-reconfiguration-memory may be updated by the hypervisor in the case the NUMA topology of the LPAR's memory is updated. This is handled by the kernel, but the memory's node is not updated because there is no way to move a memory block between nodes from

[PATCH v2] lockdown, selinux: avoid bogus SELinux lockdown permission checks

2021-05-17 Thread Ondrej Mosnacek
Commit 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") added an implementation of the locked_down LSM hook to SELinux, with the aim to restrict which domains are allowed to perform operations that would breach lockdown. However, in several places the security_locked_down() h

[Bug 206733] i2c i2c-3: i2c-powermac: modalias failure on /uni-n@f8000000/i2c@f8001000/cereal@1c0

2021-05-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206733 Paul Osmialowski (newch...@king.net.pl) changed: What|Removed |Added CC||newch...@king.ne

Re: [FSL P50x0] KVM HV doesn't work anymore

2021-05-17 Thread Christian Zigotzky
On 17 May 2021 at 09:42am, Nicholas Piggin wrote: Excerpts from Christian Zigotzky's message of May 15, 2021 11:46 pm: On 15 May 2021 at 12:08pm Christophe Leroy wrote: Le 15/05/2021 à 11:48, Christian Zigotzky a écrit : Hi All, I bisected today [1] and the bisecting itself was OK but the re

[Bug 213069] kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213069 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|NEW |ASSIGNED

Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread Anshuman Khandual
On 5/17/21 1:14 PM, Aneesh Kumar K.V wrote: > On 5/17/21 12:55 PM, Anshuman Khandual wrote: >> >> >> On 5/17/21 11:25 AM, Aneesh Kumar K.V wrote: >>> On 5/17/21 11:17 AM, Christophe Leroy wrote: +aneesh +linuxppc-dev list Le 17/05/2021 à 07:44, Anshuman Khandual a écrit : >>>

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-17 Thread Michael Ellerman
Ondrej Mosnacek writes: > Commit 59438b46471a ("security,lockdown,selinux: implement SELinux > lockdown") added an implementation of the locked_down LSM hook to > SELinux, with the aim to restrict which domains are allowed to perform > operations that would breach lockdown. > > However, in several

Re: [PATCH v14 3/9] powerpc/modules: Make module_alloc() Strict Module RWX aware

2021-05-17 Thread Michael Ellerman
Jordan Niethe writes: > On Mon, May 17, 2021 at 4:37 PM Christophe Leroy > wrote: >> Le 17/05/2021 à 05:28, Jordan Niethe a écrit : >> > Make module_alloc() use PAGE_KERNEL protections instead of >> > PAGE_KERNEL_EXEX if Strict Module RWX is enabled. >> > >> > Signed-off-by: Jordan Niethe >> > -

Re: [PATCH v14 3/9] powerpc/modules: Make module_alloc() Strict Module RWX aware

2021-05-17 Thread Christophe Leroy
Le 17/05/2021 à 13:01, Michael Ellerman a écrit : Jordan Niethe writes: On Mon, May 17, 2021 at 4:37 PM Christophe Leroy wrote: Le 17/05/2021 à 05:28, Jordan Niethe a écrit : Make module_alloc() use PAGE_KERNEL protections instead of PAGE_KERNEL_EXEX if Strict Module RWX is enabled. Sign

Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread Aneesh Kumar K.V
On 5/17/21 4:23 PM, Anshuman Khandual wrote: On 5/17/21 1:14 PM, Aneesh Kumar K.V wrote: On 5/17/21 12:55 PM, Anshuman Khandual wrote: On 5/17/21 11:25 AM, Aneesh Kumar K.V wrote: On 5/17/21 11:17 AM, Christophe Leroy wrote: +aneesh +linuxppc-dev list Le 17/05/2021 à 07:44, Anshuman Khan

Re: [PATCH] watchdog: Remove MV64x60 watchdog driver

2021-05-17 Thread Michael Ellerman
Guenter Roeck writes: > On 3/18/21 10:25 AM, Christophe Leroy wrote: >> Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") >> removed the last selector of CONFIG_MV64X60. >> >> Therefore CONFIG_MV64X60_WDT cannot be selected anymore and >> can be removed. >> >> Signed-off-by:

[PATCH 1/1] selftests/powerpc: Remove duplicated header file inclusion

2021-05-17 Thread Zhen Lei
The header file is already included above and can be removed here. Signed-off-by: Zhen Lei --- tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c b/tools/testing/selftests/powerpc/tm/tm-vmx-

Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread Anshuman Khandual
On 5/17/21 11:25 AM, Aneesh Kumar K.V wrote: > On 5/17/21 11:17 AM, Christophe Leroy wrote: >> +aneesh >> +linuxppc-dev list >> >> Le 17/05/2021 à 07:44, Anshuman Khandual a écrit : >>> Hello Christophe, >>> >>> DEBUG_VM_PGTABLE has now been re-enabled on powerpc recently ? was not >>> aware abo

[Bug 213069] kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213069 --- Comment #3 from Christophe Leroy (christophe.le...@csgroup.eu) --- Patch proposed by Anshuman, to be tested: https://lore.kernel.org/linuxppc-dev/bug-213069-206...@https.bugzilla.kernel.org%2F/T/#m82f2974b813c4d3a085b0cd2ac3d5b732a362e68 --

Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread Christophe Leroy
Le 17/05/2021 à 14:49, Anshuman Khandual a écrit : On 5/17/21 11:25 AM, Aneesh Kumar K.V wrote: On 5/17/21 11:17 AM, Christophe Leroy wrote: +aneesh +linuxppc-dev list Le 17/05/2021 à 07:44, Anshuman Khandual a écrit : Hello Christophe, DEBUG_VM_PGTABLE has now been re-enabled on powerp

Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread Anshuman Khandual
On 5/17/21 6:29 PM, Christophe Leroy wrote: > > > Le 17/05/2021 à 14:49, Anshuman Khandual a écrit : >> >> >> On 5/17/21 11:25 AM, Aneesh Kumar K.V wrote: >>> On 5/17/21 11:17 AM, Christophe Leroy wrote: +aneesh +linuxppc-dev list Le 17/05/2021 à 07:44, Anshuman Khandual a

Re: [PATCH v2 1/2] powerpc/sstep: Add emulation support for ‘setb’ instruction

2021-05-17 Thread Naveen N. Rao
Sathvika Vasireddy wrote: This adds emulation support for the following instruction: * Set Boolean (setb) Signed-off-by: Sathvika Vasireddy --- arch/powerpc/lib/sstep.c | 22 ++ 1 file changed, 22 insertions(+) Tested-by: Naveen N. Rao diff --git a/arch/powerpc/lib

Re: [PATCH v2 2/2] powerpc/sstep: Add tests for setb instruction

2021-05-17 Thread Naveen N. Rao
Sathvika Vasireddy wrote: This adds selftests for setb instruction. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/include/asm/ppc-opcode.h | 1 + arch/powerpc/lib/test_emulate_step.c | 29 + 2 files changed, 30 insertions(+) Tested-by: Naveen N. Rao di

Re: [PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument

2021-05-17 Thread Guenter Roeck
On 5/17/21 1:40 AM, Aneesh Kumar K.V wrote: On 5/15/21 10:05 PM, Guenter Roeck wrote: On Thu, Apr 22, 2021 at 11:13:19AM +0530, Aneesh Kumar K.V wrote: No functional change in this patch Signed-off-by: Aneesh Kumar K.V ---   .../include/asm/book3s/64/tlbflush-radix.h    | 19 +++-   ar

Re: [PATCH] watchdog: Remove MV64x60 watchdog driver

2021-05-17 Thread Guenter Roeck
On 5/17/21 4:17 AM, Michael Ellerman wrote: Guenter Roeck writes: On 3/18/21 10:25 AM, Christophe Leroy wrote: Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") removed the last selector of CONFIG_MV64X60. Therefore CONFIG_MV64X60_WDT cannot be selected anymore and can be

Re: [PATCH 01/14] powerpc: remove interrupt exit helpers unused argument

2021-05-17 Thread Christophe Leroy
Le 15/03/2021 à 23:03, Nicholas Piggin a écrit : The msr argument is not used, remove it. And why not use it instead of re-reading regs->msr ? Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/asm-prototypes.h | 4 ++-- arch/powerpc/kernel/interrupt.c | 4 ++-- 2

Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread Aneesh Kumar K.V
Anshuman Khandual writes: > On 5/17/21 11:25 AM, Aneesh Kumar K.V wrote: >> On 5/17/21 11:17 AM, Christophe Leroy wrote: >>> +aneesh >>> +linuxppc-dev list >>> >>> Le 17/05/2021 à 07:44, Anshuman Khandual a écrit : Hello Christophe, DEBUG_VM_PGTABLE has now been re-enabled on power

Re: [PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument

2021-05-17 Thread Aneesh Kumar K.V
Guenter Roeck writes: > On 5/17/21 1:40 AM, Aneesh Kumar K.V wrote: >> On 5/15/21 10:05 PM, Guenter Roeck wrote: >>> On Thu, Apr 22, 2021 at 11:13:19AM +0530, Aneesh Kumar K.V wrote: ... >>>   extern void radix__local_flush_all_mm(struct mm_struct *mm); diff --git a/arch/powerpc/include/as

Re: [PATCH 1/2] powerpc/interrupt: Refactor interrupt_exit_user_prepare() and syscall_exit_prepare()

2021-05-17 Thread Christophe Leroy
Le 17/05/2021 à 09:44, Nicholas Piggin a écrit : Excerpts from Christophe Leroy's message of May 14, 2021 6:28 pm: Last part of interrupt_exit_user_prepare() and syscall_exit_prepare() are identical. Create a __interrupt_exit_user_prepare() function that is called by both. Note that it repl

[PATCH] powerpc/powernv: Fix machine check reporting of async store errors

2021-05-17 Thread Nicholas Piggin
POWER9 and POWER10 asynchronous machine checks due to stores have their cause reported in SRR1 but SRR1[42] is set, which in other cases indicates DSISR cause. Check for these cases and clear SRR1[42], so the cause matching uses the i-side (SRR1) table. Cc: Mahesh Salgaonkar Fixes: 7b9f71f974 ("

Re: [PATCH 14/14] powerpc/64s: use the same default PPR for user and kernel

2021-05-17 Thread Christophe Leroy
Le 15/03/2021 à 23:04, Nicholas Piggin a écrit : Change the default PPR to userspace to 4 (medium), matching the normal kernel PPR. This allows system calls and user interrupts to avoid setting PPR on entry and exit, providing a significant speedup. This is a change to the user environment.

Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread Anshuman Khandual
On 5/17/21 7:22 PM, Aneesh Kumar K.V wrote: > Anshuman Khandual writes: > >> On 5/17/21 11:25 AM, Aneesh Kumar K.V wrote: >>> On 5/17/21 11:17 AM, Christophe Leroy wrote: +aneesh +linuxppc-dev list Le 17/05/2021 à 07:44, Anshuman Khandual a écrit : > Hello Christophe, >>

Re: [PATCH 6/9] tty: hvc_console: Fix coding style issues of block comments

2021-05-17 Thread Johan Hovold
On Mon, May 17, 2021 at 02:37:10PM +0800, Xiaofei Tan wrote: > Fix coding style issues of block comments, reported by checkpatch.pl. > Besides, add a period at the end of the sentenses. > > Signed-off-by: Xiaofei Tan > --- > drivers/tty/hvc/hvc_console.c | 15 ++- > 1 file changed, 1

Re: [PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument

2021-05-17 Thread Guenter Roeck
On 5/17/21 6:55 AM, Aneesh Kumar K.V wrote: Guenter Roeck writes: On 5/17/21 1:40 AM, Aneesh Kumar K.V wrote: On 5/15/21 10:05 PM, Guenter Roeck wrote: On Thu, Apr 22, 2021 at 11:13:19AM +0530, Aneesh Kumar K.V wrote: ...   extern void radix__local_flush_all_mm(struct mm_struct *mm); d

Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-17 Thread Christophe Leroy
Le 17/05/2021 à 15:12, Anshuman Khandual a écrit : On 5/17/21 6:29 PM, Christophe Leroy wrote: Le 17/05/2021 à 14:49, Anshuman Khandual a écrit : On 5/17/21 11:25 AM, Aneesh Kumar K.V wrote: On 5/17/21 11:17 AM, Christophe Leroy wrote: +aneesh +linuxppc-dev list Le 17/05/2021 à 07:4

Re: [PATCH v2 01/14] PCI: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-17 Thread Logan Gunthorpe
On 2021-05-14 11:24 p.m., Krzysztof Wilczyński wrote: > The sysfs_emit() and sysfs_emit_at() functions were introduced to make > it less ambiguous which function is preferred when writing to the output > buffer in a device attribute's "show" callback [1]. > > Convert the PCI sysfs object "show"

Re: [PATCH v2 01/14] PCI: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-17 Thread Krzysztof Wilczyński
Hi Logan, > > The sysfs_emit() and sysfs_emit_at() functions were introduced to make > > it less ambiguous which function is preferred when writing to the output > > buffer in a device attribute's "show" callback [1]. > > > > Convert the PCI sysfs object "show" functions from sprintf(), snprintf(

Re: [PATCH kernel v3] powerpc/makefile: Do not redefine $(CPP) for preprocessor

2021-05-17 Thread Segher Boessenkool
Hi! On Mon, May 17, 2021 at 01:23:11PM +1000, Alexey Kardashevskiy wrote: > On 5/14/21 18:46, Segher Boessenkool wrote: > >On Fri, May 14, 2021 at 11:42:32AM +0900, Masahiro Yamada wrote: > >>In my best guess, the reason why powerpc adding the endian flag to CPP > >>is this line in arch/powerpc/ke

[PATCH AUTOSEL 5.12 2/5] powerpc/pseries: Fix hcall tracing recursion in pv queued spinlocks

2021-05-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 2c8c89b95831f46a2fb31a8d0fef4601694023ce ] The paravit queued spinlock slow path adds itself to the queue then calls pv_wait to wait for the lock to become free. This is implemented by calling H_CONFER to donate cycles. When hcall tracing is enabled, this

[PATCH AUTOSEL 5.11 1/3] powerpc/pseries: Fix hcall tracing recursion in pv queued spinlocks

2021-05-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 2c8c89b95831f46a2fb31a8d0fef4601694023ce ] The paravit queued spinlock slow path adds itself to the queue then calls pv_wait to wait for the lock to become free. This is implemented by calling H_CONFER to donate cycles. When hcall tracing is enabled, this

[PATCH AUTOSEL 5.10 1/3] powerpc/pseries: Fix hcall tracing recursion in pv queued spinlocks

2021-05-17 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 2c8c89b95831f46a2fb31a8d0fef4601694023ce ] The paravit queued spinlock slow path adds itself to the queue then calls pv_wait to wait for the lock to become free. This is implemented by calling H_CONFER to donate cycles. When hcall tracing is enabled, this

Re: [PATCH v14 3/9] powerpc/modules: Make module_alloc() Strict Module RWX aware

2021-05-17 Thread Michael Ellerman
Christophe Leroy writes: > Le 17/05/2021 à 13:01, Michael Ellerman a écrit : >> Jordan Niethe writes: >>> On Mon, May 17, 2021 at 4:37 PM Christophe Leroy >>> wrote: Le 17/05/2021 à 05:28, Jordan Niethe a écrit : > Make module_alloc() use PAGE_KERNEL protections instead of > PAGE_KE

Re: [PATCH 6/9] tty: hvc_console: Fix coding style issues of block comments

2021-05-17 Thread Xiaofei Tan
Hi Johan, Thanks for reviewing this patch. On 2021/5/17 22:15, Johan Hovold wrote: On Mon, May 17, 2021 at 02:37:10PM +0800, Xiaofei Tan wrote: Fix coding style issues of block comments, reported by checkpatch.pl. Besides, add a period at the end of the sentenses. Signed-off-by: Xiaofei Tan

Re: [PATCH] powerpc/powernv/pci: remove dead code from !CONFIG_EEH

2021-05-17 Thread Nick Desaulniers
On Thu, Apr 22, 2021 at 6:13 PM Oliver O'Halloran wrote: > > On Fri, Apr 23, 2021 at 9:09 AM Daniel Axtens wrote: > > > > Hi Nick, > > > > > While looking at -Wundef warnings, the #if CONFIG_EEH stood out as a > > > possible candidate to convert to #ifdef CONFIG_EEH, but it seems that > > > based

Re: [PATCH] powerpc/powernv/pci: remove dead code from !CONFIG_EEH

2021-05-17 Thread Michael Ellerman
Nick Desaulniers writes: > On Thu, Apr 22, 2021 at 6:13 PM Oliver O'Halloran wrote: >> >> On Fri, Apr 23, 2021 at 9:09 AM Daniel Axtens wrote: >> > >> > Hi Nick, >> > >> > > While looking at -Wundef warnings, the #if CONFIG_EEH stood out as a >> > > possible candidate to convert to #ifdef CONFIG

Re: [FSL P50x0] KVM HV doesn't work anymore

2021-05-17 Thread Christian Zigotzky
> On 17. May 2021, at 11:43, Christian Zigotzky wrote: > > On 17 May 2021 at 09:42am, Nicholas Piggin wrote: >> Excerpts from Christian Zigotzky's message of May 15, 2021 11:46 pm: >>> On 15 May 2021 at 12:08pm Christophe Leroy wrote: > Le 15/05/2021 à 11:48, Christian Zigotzky a éc

[PATCH v7 00/15] Restricted DMA

2021-05-17 Thread Claire Chang
This series implements mitigations for lack of DMA access control on systems without an IOMMU, which could result in the DMA accessing the system memory at unexpected times and/or unexpected addresses, possibly leading to data leakage or corruption. For example, we plan to use the PCI-e bus for Wi

[PATCH v7 01/15] swiotlb: Refactor swiotlb init functions

2021-05-17 Thread Claire Chang
Add a new function, swiotlb_init_io_tlb_mem, for the io_tlb_mem struct initialization to make the code reusable. Note that we now also call set_memory_decrypted in swiotlb_init_with_tbl. Signed-off-by: Claire Chang --- kernel/dma/swiotlb.c | 51 ++-- 1 fi

[PATCH v7 02/15] swiotlb: Refactor swiotlb_create_debugfs

2021-05-17 Thread Claire Chang
Split the debugfs creation to make the code reusable for supporting different bounce buffer pools, e.g. restricted DMA pool. Signed-off-by: Claire Chang --- kernel/dma/swiotlb.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/kernel/dma/swiotlb.c b/

[PATCH v7 03/15] swiotlb: Add DMA_RESTRICTED_POOL

2021-05-17 Thread Claire Chang
Add a new kconfig symbol, DMA_RESTRICTED_POOL, for restricted DMA pool. Signed-off-by: Claire Chang --- kernel/dma/Kconfig | 14 ++ 1 file changed, 14 insertions(+) diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig index 77b405508743..3e961dc39634 100644 --- a/kernel/dma/Kconfig

[PATCH v7 04/15] swiotlb: Add restricted DMA pool initialization

2021-05-17 Thread Claire Chang
Add the initialization function to create restricted DMA pools from matching reserved-memory nodes. Signed-off-by: Claire Chang --- include/linux/device.h | 4 +++ include/linux/swiotlb.h | 3 +- kernel/dma/swiotlb.c| 76 + 3 files changed, 82 inser

[PATCH v7 05/15] swiotlb: Add a new get_io_tlb_mem getter

2021-05-17 Thread Claire Chang
Add a new getter, get_io_tlb_mem, to help select the io_tlb_mem struct. The restricted DMA pool is preferred if available. Signed-off-by: Claire Chang --- include/linux/swiotlb.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h in

[PATCH v7 06/15] swiotlb: Update is_swiotlb_buffer to add a struct device argument

2021-05-17 Thread Claire Chang
Update is_swiotlb_buffer to add a struct device argument. This will be useful later to allow for restricted DMA pool. Signed-off-by: Claire Chang --- drivers/iommu/dma-iommu.c | 12 ++-- drivers/xen/swiotlb-xen.c | 2 +- include/linux/swiotlb.h | 6 +++--- kernel/dma/direct.c |

[PATCH v7 07/15] swiotlb: Update is_swiotlb_active to add a struct device argument

2021-05-17 Thread Claire Chang
Update is_swiotlb_active to add a struct device argument. This will be useful later to allow for restricted DMA pool. Signed-off-by: Claire Chang --- drivers/gpu/drm/i915/gem/i915_gem_internal.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c| 2 +- drivers/pci/xen-pcifront.c

[PATCH v7 08/15] swiotlb: Bounce data from/to restricted DMA pool if available

2021-05-17 Thread Claire Chang
Regardless of swiotlb setting, the restricted DMA pool is preferred if available. The restricted DMA pools provide a basic level of protection against the DMA overwriting buffer contents at unexpected times. However, to protect against general data leakage and system memory corruption, the system

[PATCH v7 09/15] swiotlb: Move alloc_size to find_slots

2021-05-17 Thread Claire Chang
Move the maintenance of alloc_size to find_slots for better code reusability later. Signed-off-by: Claire Chang --- kernel/dma/swiotlb.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index 95f482c4408c..2ec6711071de 100

[PATCH v7 10/15] swiotlb: Refactor swiotlb_tbl_unmap_single

2021-05-17 Thread Claire Chang
Add a new function, release_slots, to make the code reusable for supporting different bounce buffer pools, e.g. restricted DMA pool. Signed-off-by: Claire Chang --- kernel/dma/swiotlb.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/kern

[PATCH v7 11/15] dma-direct: Add a new wrapper __dma_direct_free_pages()

2021-05-17 Thread Claire Chang
Add a new wrapper __dma_direct_free_pages() that will be useful later for swiotlb_free(). Signed-off-by: Claire Chang --- kernel/dma/direct.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index 078f7087e466..eb409832

[PATCH v7 12/15] swiotlb: Add restricted DMA alloc/free support.

2021-05-17 Thread Claire Chang
Add the functions, swiotlb_{alloc,free} to support the memory allocation from restricted DMA pool. Signed-off-by: Claire Chang --- include/linux/swiotlb.h | 4 kernel/dma/swiotlb.c| 35 +-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/

[PATCH v7 13/15] dma-direct: Allocate memory from restricted DMA pool if available

2021-05-17 Thread Claire Chang
The restricted DMA pool is preferred if available. The restricted DMA pools provide a basic level of protection against the DMA overwriting buffer contents at unexpected times. However, to protect against general data leakage and system memory corruption, the system needs to provide a way to lock

[PATCH v7 14/15] dt-bindings: of: Add restricted DMA pool

2021-05-17 Thread Claire Chang
Introduce the new compatible string, restricted-dma-pool, for restricted DMA. One can specify the address and length of the restricted DMA memory region by restricted-dma-pool in the reserved-memory node. Signed-off-by: Claire Chang --- .../reserved-memory/reserved-memory.txt | 27

[PATCH v7 15/15] of: Add plumbing for restricted DMA pool

2021-05-17 Thread Claire Chang
If a device is not behind an IOMMU, we look up the device node and set up the restricted DMA when the restricted-dma-pool is presented. Signed-off-by: Claire Chang --- drivers/of/address.c| 25 + drivers/of/device.c | 3 +++ drivers/of/of_private.h | 5 + 3

Re: [PATCH v7 04/15] swiotlb: Add restricted DMA pool initialization

2021-05-17 Thread Claire Chang
I didn't move this to a separate file because I feel it might be confusing for swiotlb_alloc/free (and need more functions to be non-static). Maybe instead of moving to a separate file, we can try to come up with a better naming?

Re: [PATCH v7 05/15] swiotlb: Add a new get_io_tlb_mem getter

2021-05-17 Thread Claire Chang
Still keep this function because directly using dev->dma_io_tlb_mem will cause issues for memory allocation for existing devices. The pool can't support atomic coherent allocation so we need to distinguish the per device pool and the default pool in swiotlb_alloc.

[PATCH 1/1] powerpc/ps3: Fix error return code in ps3_register_devices()

2021-05-17 Thread Zhen Lei
When call ps3_start_probe_thread() failed, further initialization should be stopped and the returned error code should be propagated. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- arch/powerpc/platforms/ps3/device-init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/p