Re: [6.0-rc1] Kernel crash while running MCE tests

2022-08-16 Thread Michael Ellerman
Sachin Sant writes: > Following crash is seen while running powerpc/mce subtest on > a Power10 LPAR. > > 1..1 > # selftests: powerpc/mce: inject-ra-err > [ 155.240591] BUG: Unable to handle kernel data access on read at > 0xc00e00022d55b503 > [ 155.240618] Faulting instruction address:

Re: [PATCH v4 2/2] selftests/powerpc: Add a test for execute-only memory

2022-08-16 Thread Christophe Leroy
Le 17/08/2022 à 07:06, Russell Currey a écrit : > From: Nicholas Miehlbradt > > This selftest is designed to cover execute-only protections > on the Radix MMU but will also work with Hash. > > The tests are based on those found in pkey_exec_test with modifications > to use the generic

[PATCH v4 2/2] selftests/powerpc: Add a test for execute-only memory

2022-08-16 Thread Russell Currey
From: Nicholas Miehlbradt This selftest is designed to cover execute-only protections on the Radix MMU but will also work with Hash. The tests are based on those found in pkey_exec_test with modifications to use the generic mprotect() instead of the pkey variants. Signed-off-by: Nicholas

[PATCH v4 1/2] powerpc/mm: Support execute-only memory on the Radix MMU

2022-08-16 Thread Russell Currey
Add support for execute-only memory (XOM) for the Radix MMU by using an execute-only mapping, as opposed to the RX mapping used by powerpc's other MMUs. The Hash MMU already supports XOM through the execute-only pkey, which is a separate mechanism shared with x86. A PROT_EXEC-only mapping will

Re: [PATCH] gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file

2022-08-16 Thread Andrew Donnellan
On Tue, 2022-08-16 at 12:25 -0700, Kees Cook wrote: > Applied to for-next/hardening, thanks! > > [1/1] gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin > disabled for a file >   https://git.kernel.org/kees/c/2d08c71d2c79 > Thanks Kees! Can we make sure this lands in rc2? -- Andrew

Re: [PATCH] gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file

2022-08-16 Thread Andrew Donnellan
On Tue, 2022-08-16 at 05:14 -0700, Yury Norov wrote: > On Tue, Aug 16, 2022 at 03:17:20PM +1000, Andrew Donnellan wrote: > > Commit 36d4b36b6959 ("lib/nodemask: inline next_node_in() and > > node_random()") refactored some code by moving node_random() from > > lib/nodemask.c to

Re: [PATCH v2 1/2] mm/migrate_device.c: Copy pte dirty bit to page

2022-08-16 Thread Peter Xu
On Wed, Aug 17, 2022 at 11:49:03AM +1000, Alistair Popple wrote: > > Peter Xu writes: > > > On Tue, Aug 16, 2022 at 04:10:29PM +0800, huang ying wrote: > >> > @@ -193,11 +194,10 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp, > >> > bool anon_exclusive; > >> >

Re: [PATCH v2 1/2] mm/migrate_device.c: Copy pte dirty bit to page

2022-08-16 Thread Alistair Popple
Peter Xu writes: > On Tue, Aug 16, 2022 at 04:10:29PM +0800, huang ying wrote: >> > @@ -193,11 +194,10 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp, >> > bool anon_exclusive; >> > pte_t swp_pte; >> > >> > +

Re: [PATCH v2 1/2] mm/migrate_device.c: Copy pte dirty bit to page

2022-08-16 Thread Alistair Popple
huang ying writes: > On Tue, Aug 16, 2022 at 3:39 PM Alistair Popple wrote: >> >> migrate_vma_setup() has a fast path in migrate_vma_collect_pmd() that >> installs migration entries directly if it can lock the migrating page. >> When removing a dirty pte the dirty bit is supposed to be

[Bug 216367] Kernel 6.0-rc1 fails to build with GCC_PLUGIN_LATENT_ENTROPY=y (PowerMac G5 11,2)

2022-08-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216367 --- Comment #3 from Andrew Donnellan (a...@linux.ibm.com) --- Patch has been taken via Kees Cook's hardening tree:

[PATCH] KVM: PPC: Book3S HV: Fix decrementer migration

2022-08-16 Thread Fabiano Rosas
We used to have a workaround[1] for a hang during migration that was made ineffective when we converted the decrementer expiry to be relative to guest timebase. The point of the workaround was that in the absence of an explicit decrementer expiry value provided by userspace during migration, KVM

[PATCH 6/8] serial: Make ->set_termios() old ktermios const

2022-08-16 Thread Ilpo Järvinen
There should be no reason to adjust old ktermios which is going to get discarded anyway. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/21285.c | 2 +- drivers/tty/serial/8250/8250_bcm7271.c | 2 +- drivers/tty/serial/8250/8250_dw.c | 2 +-

Re: [PATCH v2 1/4] Make place for common balloon code

2022-08-16 Thread Alexander Atanasov
Hello, On 16.08.22 12:49, Greg Kroah-Hartman wrote: On Tue, Aug 16, 2022 at 12:41:14PM +0300, Alexander Atanasov wrote: rename include/linux/{balloon_compaction.h => balloon_common.h} (99%) Why rename the .h file? It still handles the "balloon compaction" logic. File contains code

Re: [PATCH] arch: mm: rename FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER

2022-08-16 Thread Huacai Chen
For LoongArch: Acked-by: Huacai Chen On Tue, Aug 16, 2022 at 6:30 PM Catalin Marinas wrote: > > On Mon, Aug 15, 2022 at 10:39:59AM -0400, Zi Yan wrote: > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > > index 571cc234d0b3..c6fcd8746f60 100644 > > --- a/arch/arm64/Kconfig > > +++

Re: [PATCH v2 1/2] mm/migrate_device.c: Copy pte dirty bit to page

2022-08-16 Thread Peter Xu
On Tue, Aug 16, 2022 at 04:10:29PM +0800, huang ying wrote: > > @@ -193,11 +194,10 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp, > > bool anon_exclusive; > > pte_t swp_pte; > > > > + flush_cache_page(vma, addr,

Re: [PATCH] gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file

2022-08-16 Thread Kees Cook
On Tue, 16 Aug 2022 15:17:20 +1000, Andrew Donnellan wrote: > Commit 36d4b36b6959 ("lib/nodemask: inline next_node_in() and > node_random()") refactored some code by moving node_random() from > lib/nodemask.c to include/linux/nodemask.h, thus requiring nodemask.h to > include random.h, which

Re: [PATCH 0/2] ftrace/recordmcount: Handle object files without section symbols

2022-08-16 Thread Naveen N. Rao
Hi Steven, Steven Rostedt wrote: On Wed, 27 Apr 2022 15:01:20 +0530 "Naveen N. Rao" wrote: This solves a build issue on powerpc with binutils v2.36 and newer [1]. Since commit d1bcae833b32f1 ("ELF: Don't generate unused section symbols") [2], binutils started dropping section symbols that it

[6.0-rc1] Kernel crash while running MCE tests

2022-08-16 Thread Sachin Sant
Following crash is seen while running powerpc/mce subtest on a Power10 LPAR. 1..1 # selftests: powerpc/mce: inject-ra-err [ 155.240591] BUG: Unable to handle kernel data access on read at 0xc00e00022d55b503 [ 155.240618] Faulting instruction address: 0xc06f1f0c [ 155.240627] Oops:

Re: [PATCH] powerpc/ftrace: Ignore weak functions

2022-08-16 Thread Steven Rostedt
On Tue, 9 Aug 2022 16:24:25 +0530 "Naveen N. Rao" wrote: > Extend commit b39181f7c6907d ("ftrace: Add FTRACE_MCOUNT_MAX_OFFSET to > avoid adding weak function") to ppc32 and ppc64 -mprofile-kernel by > defining FTRACE_MCOUNT_MAX_OFFSET. > > For ppc64 -mprofile-kernel ABI, we can have two

Re: [PATCH 0/2] ftrace/recordmcount: Handle object files without section symbols

2022-08-16 Thread Steven Rostedt
On Wed, 27 Apr 2022 15:01:20 +0530 "Naveen N. Rao" wrote: > This solves a build issue on powerpc with binutils v2.36 and newer [1]. > Since commit d1bcae833b32f1 ("ELF: Don't generate unused section > symbols") [2], binutils started dropping section symbols that it thought > were unused. Due to

Re: [PATCH v2] ASoC: fsl_sai: fix incorrect mclk number in error message

2022-08-16 Thread Mark Brown
On Sat, 13 Aug 2022 10:33:52 +0200, Pieterjan Camerlynck wrote: > In commit c3ecef21c3f26 ("ASoC: fsl_sai: add sai master mode support") > the loop was changed to start iterating from 1 instead of 0. The error > message however was not updated, reporting the wrong clock to the user. > > Applied

Re: [PATCH] gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file

2022-08-16 Thread Yury Norov
On Tue, Aug 16, 2022 at 03:17:20PM +1000, Andrew Donnellan wrote: > Commit 36d4b36b6959 ("lib/nodemask: inline next_node_in() and > node_random()") refactored some code by moving node_random() from > lib/nodemask.c to include/linux/nodemask.h, thus requiring nodemask.h to > include random.h, which

Re: [PATCH v2 1/4] Make place for common balloon code

2022-08-16 Thread Michael S. Tsirkin
On Tue, Aug 16, 2022 at 01:56:32PM +0200, Greg Kroah-Hartman wrote: > On Tue, Aug 16, 2022 at 02:47:22PM +0300, Alexander Atanasov wrote: > > Hello, > > > > On 16.08.22 12:49, Greg Kroah-Hartman wrote: > > > On Tue, Aug 16, 2022 at 12:41:14PM +0300, Alexander Atanasov wrote: > > > > > > rename

Re: [PATCH v2 1/4] Make place for common balloon code

2022-08-16 Thread Greg Kroah-Hartman
On Tue, Aug 16, 2022 at 02:47:22PM +0300, Alexander Atanasov wrote: > Hello, > > On 16.08.22 12:49, Greg Kroah-Hartman wrote: > > On Tue, Aug 16, 2022 at 12:41:14PM +0300, Alexander Atanasov wrote: > > > > rename include/linux/{balloon_compaction.h => balloon_common.h} (99%) > > > > Why

Re: [PATCH] arch: mm: rename FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER

2022-08-16 Thread Catalin Marinas
On Mon, Aug 15, 2022 at 10:39:59AM -0400, Zi Yan wrote: > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 571cc234d0b3..c6fcd8746f60 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1401,7 +1401,7 @@ config XEN > help > Say Y if you want to run Linux in

[Bug 216367] Kernel 6.0-rc1 fails to build with GCC_PLUGIN_LATENT_ENTROPY=y (PowerMac G5 11,2)

2022-08-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216367 --- Comment #2 from Erhard F. (erhar...@mailbox.org) --- (In reply to Andrew Donnellan from comment #1) > I've sent a patch: > https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220816051720.44108- > 1-...@linux.ibm.com/ > > Please let me

Re: [PATCH v2 1/4] Make place for common balloon code

2022-08-16 Thread Greg Kroah-Hartman
On Tue, Aug 16, 2022 at 12:41:14PM +0300, Alexander Atanasov wrote: > File already contains code that is common along balloon > drivers so rename it to reflect its contents. > mm/balloon_compaction.c -> mm/balloon_common.c > > Signed-off-by: Alexander Atanasov > --- > MAINTAINERS

[PATCH] [backport for 4.14] powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E

2022-08-16 Thread Christophe Leroy
[ Upstream commit dd8de84b57b02ba9c1fe530a6d916c0853f136bd ] On FSL_BOOK3E, _PAGE_RW is defined with two bits, one for user and one for supervisor. As soon as one of the two bits is set, the page has to be display as RW. But the way it is implemented today requires both bits to be set in order to

Re: [PATCH v2 1/2] mm/migrate_device.c: Copy pte dirty bit to page

2022-08-16 Thread huang ying
On Tue, Aug 16, 2022 at 3:39 PM Alistair Popple wrote: > > migrate_vma_setup() has a fast path in migrate_vma_collect_pmd() that > installs migration entries directly if it can lock the migrating page. > When removing a dirty pte the dirty bit is supposed to be carried over > to the underlying

Re: [PATCH v2] ASoC: fsl_sai: fix incorrect mclk number in error message

2022-08-16 Thread Shengjiu Wang
On Sat, Aug 13, 2022 at 4:34 PM Pieterjan Camerlynck < pieterjan.camerly...@gmail.com> wrote: > In commit c3ecef21c3f26 ("ASoC: fsl_sai: add sai master mode support") > the loop was changed to start iterating from 1 instead of 0. The error > message however was not updated, reporting the wrong

[PATCH v2 2/2] selftests/hmm-tests: Add test for dirty bits

2022-08-16 Thread Alistair Popple
We were not correctly copying PTE dirty bits to pages during migrate_vma_setup() calls. This could potentially lead to data loss, so add a test for this. Signed-off-by: Alistair Popple --- tools/testing/selftests/vm/hmm-tests.c | 124 ++- 1 file changed, 124

[PATCH v2 1/2] mm/migrate_device.c: Copy pte dirty bit to page

2022-08-16 Thread Alistair Popple
migrate_vma_setup() has a fast path in migrate_vma_collect_pmd() that installs migration entries directly if it can lock the migrating page. When removing a dirty pte the dirty bit is supposed to be carried over to the underlying page to prevent it being lost. Currently migrate_vma_*() can only

[Bug 216368] do_IRQ: stack overflow at boot on a PowerMac G5 11,2

2022-08-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216368 Christophe Leroy (christophe.le...@csgroup.eu) changed: What|Removed |Added CC|

Re: [PATCH] arch: mm: rename FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER

2022-08-16 Thread Geert Uytterhoeven
On Mon, Aug 15, 2022 at 4:40 PM Zi Yan wrote: > From: Zi Yan > > This Kconfig option is used by individual arch to set its desired > MAX_ORDER. Rename it to reflect its actual use. > > Acked-by: Mike Rapoport > Signed-off-by: Zi Yan > arch/m68k/Kconfig.cpu| 2 +-

Re: [PATCH] treewide: Complete variable type

2022-08-16 Thread Christophe Leroy
Le 15/08/2022 à 21:53, Xin Gao a écrit : > It is better to use "unsigned int" instead of "unsigned", line 24. The Subject in wrong: It is not a treewide patch but only a powerpc patch as far as I understand. Christophe > > Signed-off-by: Xin Gao > --- > arch/powerpc/boot/epapr.c | 2 +- >