[PATCH] powerpc/pseries: Fix plpks crash on non-pseries

2022-09-06 Thread Michael Ellerman
As reported[1] by Nathan, the recently added plpks driver will crash if it's built into the kernel and booted on a non-pseries machine, eg powernv: kernel BUG at arch/powerpc/kernel/syscall.c:39! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA Pow

[PATCH] powerpc/math-emu: Inhibit W=1 warnings

2022-09-06 Thread Christophe Leroy
When building with W=1 you get: arch/powerpc/math-emu/fre.c:6:5: error: no previous prototype for 'fre' [-Werror=missing-prototypes] arch/powerpc/math-emu/fsqrt.c:11:1: error: no previous prototype for 'fsqrt' [-Werror=missing-prototypes] arch/powerpc/math-emu/fsqrts.c:12

Re: [PATCH v2] powerpc/vdso: link with -z noexecstack

2022-09-06 Thread Christophe Leroy
Le 07/09/2022 à 06:36, Nicholas Piggin a écrit : > On Sat Sep 3, 2022 at 1:25 AM AEST, Christophe Leroy wrote: >> With recent binutils, the following warning appears: >> >>VDSO32L arch/powerpc/kernel/vdso/vdso32.so.dbg >> /opt/gcc-12.2.0-nolibc/powerpc64-linux/bin/../lib/gcc/powerpc64-linux/1

Re: [PATCH] mm: gup: fix the fast GUP race against THP collapse

2022-09-06 Thread Aneesh Kumar K V
On 9/7/22 12:37 AM, Yang Shi wrote: > On Mon, Sep 5, 2022 at 1:56 AM Aneesh Kumar K.V > wrote: >> >> Yang Shi writes: >> >>> >>> On Fri, Sep 2, 2022 at 9:00 AM Peter Xu wrote: On Thu, Sep 01, 2022 at 04:50:45PM -0700, Yang Shi wrote: > On Thu, Sep 1, 2022 at 4:26 PM Peter Xu wrote

Re: [PATCH v2] powerpc/vdso: link with -z noexecstack

2022-09-06 Thread Nicholas Piggin
On Sat Sep 3, 2022 at 1:25 AM AEST, Christophe Leroy wrote: > With recent binutils, the following warning appears: > > VDSO32L arch/powerpc/kernel/vdso/vdso32.so.dbg > /opt/gcc-12.2.0-nolibc/powerpc64-linux/bin/../lib/gcc/powerpc64-linux/12.2.0/../../../../powerpc64-linux/bin/ld: > warning: arch

Re: [PATCH] powerpc/book3s: Inline first level of update_mmu_cache()

2022-09-06 Thread Nicholas Piggin
On Mon Sep 5, 2022 at 7:38 PM AEST, Christophe Leroy wrote: > update_mmu_cache() voids when hash page tables are not used. > On PPC32 that means when MMU_FTR_HPTE_TABLE is not defined. > On PPC64 that means when RADIX is enabled. > > Rename core part of update_mmu_cache() as __update_mmu_cache() >

PASEMI: Wrong lscpu info since the RC1 of kernel 6.0

2022-09-06 Thread Christian Zigotzky
Hi All, I use the Nemo board with a PASemi PA6T CPU and some values of lscpu are wrong since the RC1 of kernel 6.0. ┌──(mintppc㉿mintppc)-[~] └─$ lscpu Architecture:ppc64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Big Endian CPU(s):

Re: [RFC PATCH] powerpc: ideas to improve page table frag allocator

2022-09-06 Thread Nicholas Piggin
On Tue Sep 6, 2022 at 4:36 AM AEST, Christophe Leroy wrote: > > > Le 05/09/2022 à 10:50, Nicholas Piggin a écrit : > > The page table fragment allocator is a simple per-mm slab allocator. > > It can be quite wasteful of space for small processes, as well as being > > expensive to initialise. It do

Re: [PACTH v2] powerpc/pseries/mce: Avoid instrumentation in realmode

2022-09-06 Thread Nicholas Piggin
On Mon Sep 5, 2022 at 4:38 PM AEST, Ganesh Goudar wrote: > Part of machine check error handling is done in realmode, > As of now instrumentation is not possible for any code that > runs in realmode. > When MCE is injected on KASAN enabled kernel, crash is > observed, Hence force inline or mark no i

[powerpc:next-test] BUILD REGRESSION 7611de9cd7806a9c41426d12b98cf8867263a05f

2022-09-06 Thread kernel test robot
tfsb1' [-Werror=missing-prototypes] arch/powerpc/math-emu/mtfsf.c:10:1: error: no previous prototype for 'mtfsf' [-Werror=missing-prototypes] arch/powerpc/math-emu/mtfsfi.c:10:1: error: no previous prototype for 'mtfsfi' [-Werror=missing-prototypes] arch/powerpc/math

[powerpc:merge] BUILD SUCCESS 33a92cf0fa6e2f07c1d1a0338abc86d85803f630

2022-09-06 Thread kernel test robot
been built successfully. More configs may be tested in the coming days. gcc tested configs: um i386_defconfig um x86_64_defconfig arc randconfig-r043-20220906 riscvrandconfig-r042-202209

Re: [PATCH v8 27/31] Kbuild: add Rust support

2022-09-06 Thread Michael Ellerman
Masahiro Yamada writes: > On Tue, Aug 2, 2022 at 10:53 AM Miguel Ojeda wrote: >> >> Having all the new files in place, we now enable Rust support >> in the build system, including `Kconfig` entries related to Rust, >> the Rust configuration printer, the target specification >> generation script,

Re: [PATCH v2 1/3] powerpc/pseries: define driver for Platform KeyStore

2022-09-06 Thread Nathan Chancellor
On Wed, Sep 07, 2022 at 09:23:02AM +1000, Michael Ellerman wrote: > Nathan Chancellor writes: > > Hi all, > > > > On Sat, Jul 23, 2022 at 07:30:46AM -0400, Nayna Jain wrote: > >> PowerVM provides an isolated Platform Keystore(PKS) storage allocation > >> for each LPAR with individually managed acc

Re: [PATCH v2 1/3] powerpc/pseries: define driver for Platform KeyStore

2022-09-06 Thread Michael Ellerman
Nathan Chancellor writes: > Hi all, > > On Sat, Jul 23, 2022 at 07:30:46AM -0400, Nayna Jain wrote: >> PowerVM provides an isolated Platform Keystore(PKS) storage allocation >> for each LPAR with individually managed access controls to store >> sensitive information securely. It provides a new set

[PATCH] powerpc: remove redundant space

2022-09-06 Thread Jingyu Wang
This commit remmove redundant space in arch/powerpc/sysdev/mmio_nvram.c Signed-off-by: Jingyu Wang --- arch/powerpc/sysdev/mmio_nvram.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/sysdev/mmio_nvram.c b/arch/powerpc/sysdev/mmio_nvram.c index eb48210ef98e

[PATCH][next] powerpc: Fix fall-through warning for Clang

2022-09-06 Thread Gustavo A. R. Silva
Fix the following fallthrough warning: arch/powerpc/platforms/85xx/mpc85xx_cds.c:161:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] Link: https://github.com/KSPP/linux/issues/198 Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/202209061224.

Re: [PATCH v2 1/3] powerpc/pseries: define driver for Platform KeyStore

2022-09-06 Thread Nathan Chancellor
Hi all, On Sat, Jul 23, 2022 at 07:30:46AM -0400, Nayna Jain wrote: > PowerVM provides an isolated Platform Keystore(PKS) storage allocation > for each LPAR with individually managed access controls to store > sensitive information securely. It provides a new set of hypervisor > calls for Linux ke

Re: [RFC PATCH RESEND 19/28] mm: disallow do_swap_page to handle page faults under VMA lock

2022-09-06 Thread Peter Xu
On Tue, Sep 06, 2022 at 01:08:10PM -0700, Suren Baghdasaryan wrote: > On Tue, Sep 6, 2022 at 12:39 PM Peter Xu wrote: > > > > On Thu, Sep 01, 2022 at 10:35:07AM -0700, Suren Baghdasaryan wrote: > > > Due to the possibility of do_swap_page dropping mmap_lock, abort fault > > > handling under VMA lo

Re: [RFC PATCH RESEND 06/28] mm: mark VMA as locked whenever vma->vm_flags are modified

2022-09-06 Thread Liam Howlett
* Suren Baghdasaryan [220906 15:01]: > On Tue, Sep 6, 2022 at 7:27 AM Laurent Dufour wrote: > > > > Le 01/09/2022 à 19:34, Suren Baghdasaryan a écrit : > > > VMA flag modifications should be done under VMA lock to prevent concurrent > > > page fault handling in that area. > > > > > > Signed-off-b

Re: [RFC PATCH RESEND 19/28] mm: disallow do_swap_page to handle page faults under VMA lock

2022-09-06 Thread Peter Xu
On Thu, Sep 01, 2022 at 10:35:07AM -0700, Suren Baghdasaryan wrote: > Due to the possibility of do_swap_page dropping mmap_lock, abort fault > handling under VMA lock and retry holding mmap_lock. This can be handled > more gracefully in the future. > > Signed-off-by: Suren Baghdasaryan > --- > m

Re: [PATCH v2 04/10] drm/simpledrm: Compute framebuffer stride if not set

2022-09-06 Thread Daniel Vetter
On Thu, Aug 11, 2022 at 08:27:42PM +0200, Thomas Zimmermann wrote: > > > Am 11.08.22 um 20:26 schrieb Thomas Zimmermann: > > Hi Daniel > > > > Am 11.08.22 um 19:23 schrieb Daniel Vetter: > > > On Wed, 27 Jul 2022 at 09:53, Thomas Zimmermann > > > wrote: > > > > > > > > Hi > > > > > > > > Am 2

Re: [PATCH v8 27/31] Kbuild: add Rust support

2022-09-06 Thread Masahiro Yamada
On Tue, Aug 2, 2022 at 10:53 AM Miguel Ojeda wrote: > > Having all the new files in place, we now enable Rust support > in the build system, including `Kconfig` entries related to Rust, > the Rust configuration printer, the target specification > generation script, the version detection script and

Re: [PATCH v2] hugetlb: simplify hugetlb handling in follow_page_mask

2022-09-06 Thread Mike Kravetz
On 09/05/22 06:34, Christophe Leroy wrote: > > > Le 02/09/2022 à 21:03, Mike Kravetz a écrit : > > diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h > > index fe4944f89d34..275e554dd365 100644 > > --- a/include/linux/hugetlb.h > > +++ b/include/linux/hugetlb.h > > @@ -264,6 +255,13 @

[powerpc:next-test 26/64] arch/powerpc/math-emu/math_efp.c:177:5: error: no previous prototype for 'do_spe_mathemu'

2022-09-06 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test head: 7611de9cd7806a9c41426d12b98cf8867263a05f commit: 7245fc5bb7a966852d5bd7779d1f5855530b461a [26/64] powerpc/math-emu: Remove -w build flag and fix warnings config: powerpc-tqm8541_defconfig compiler: powerpc

Re: [PATCH net-next v4 0/8] [RFT] net: dpaa: Convert to phylink

2022-09-06 Thread Sean Anderson
On 8/4/22 3:46 PM, Sean Anderson wrote: > This series converts the DPAA driver to phylink. > > I have tried to maintain backwards compatibility with existing device > trees whereever possible. However, one area where I was unable to > achieve this was with QSGMII. Please refer to patch 2 for de

Re: [PATCH v5 4/8] phy: fsl: Add Lynx 10G SerDes driver

2022-09-06 Thread Sean Anderson
On 9/3/22 11:23 AM, kernel test robot wrote: > Hi Sean, > > I love your patch! Yet something to improve: > > [auto build test ERROR on shawnguo/for-next] > [also build test ERROR on robh/for-next clk/clk-next arm/for-next > arm64/for-next/core rockchip/for-next soc/for-next linus/master v6.0-

Re: [RFC PATCH RESEND 12/28] mm/mremap: mark VMA as locked while remapping it to a new address range

2022-09-06 Thread Laurent Dufour
Le 01/09/2022 à 19:35, Suren Baghdasaryan a écrit : > Mark VMA as locked before copying it and when copy_vma produces a new VMA. > > Signed-off-by: Suren Baghdasaryan > --- > mm/mmap.c | 1 + > mm/mremap.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/mm/mmap.c b/mm/mmap.c > inde

Re: [RFC PATCH RESEND 11/28] mm/mmap: mark VMAs as locked before merging or splitting them

2022-09-06 Thread Laurent Dufour
Le 01/09/2022 à 19:34, Suren Baghdasaryan a écrit : > Decisions about whether VMAs can be merged or split must be made while > VMAs are protected from the changes which can affect that decision. > For example, merge_vma uses vma->anon_vma in its decision whether the > VMA can be merged. Meanwhile,

Re: [RFC PATCH RESEND 10/28] mm/mmap: mark VMAs as locked in vma_adjust

2022-09-06 Thread Laurent Dufour
Le 01/09/2022 à 19:34, Suren Baghdasaryan a écrit : > vma_adjust modifies a VMA and possibly its neighbors. Mark them as locked > before making the modifications. > > Signed-off-by: Suren Baghdasaryan > --- > mm/mmap.c | 11 ++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff

Re: [RFC PATCH RESEND 09/28] mm/mempolicy: mark VMA as locked when changing protection policy

2022-09-06 Thread Laurent Dufour
Le 01/09/2022 à 19:34, Suren Baghdasaryan a écrit : > Protect VMA from concurrent page fault handler while performing VMA > protection policy changes. > > Signed-off-by: Suren Baghdasaryan > --- > mm/mempolicy.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/mm/me

Re: [RFC PATCH RESEND 08/28] mm/khugepaged: mark VMA as locked while collapsing a hugepage

2022-09-06 Thread Laurent Dufour
Le 01/09/2022 à 19:34, Suren Baghdasaryan a écrit : > Protect VMA from concurrent page fault handler while modifying it in > collapse_huge_page. Is the goal to protect changes in the anon_vma structure? AFAICS, the vma it self is not impacted here, only the anon_vma and the PMD/PTE are touched, a

Re: [RFC PATCH RESEND 07/28] kernel/fork: mark VMAs as locked before copying pages during fork

2022-09-06 Thread Laurent Dufour
Le 01/09/2022 à 19:34, Suren Baghdasaryan a écrit : > Protect VMAs from concurrent page fault handler while performing > copy_page_range for VMAs having VM_WIPEONFORK flag set. I'm wondering why is that necessary. The copied mm is write locked, and the destination one is not reachable. If any othe

Re: [RFC PATCH RESEND 06/28] mm: mark VMA as locked whenever vma->vm_flags are modified

2022-09-06 Thread Laurent Dufour
Le 01/09/2022 à 19:34, Suren Baghdasaryan a écrit : > VMA flag modifications should be done under VMA lock to prevent concurrent > page fault handling in that area. > > Signed-off-by: Suren Baghdasaryan > --- > fs/proc/task_mmu.c | 1 + > fs/userfaultfd.c | 6 ++ > mm/madvise.c | 1 +

Re: [RFC PATCH RESEND 05/28] mm: add per-VMA lock and helper functions to control it

2022-09-06 Thread Laurent Dufour
Le 01/09/2022 à 19:34, Suren Baghdasaryan a écrit : > Introduce a per-VMA rw_semaphore to be used during page fault handling > instead of mmap_lock. Because there are cases when multiple VMAs need > to be exclusively locked during VMA tree modifications, instead of the > usual lock/unlock patter we

Re: [PATCH V2 1/2] tools/perf: Fix out of bound access to affinity "sched_cpus"

2022-09-06 Thread Arnaldo Carvalho de Melo
Em Mon, Sep 05, 2022 at 07:49:28PM +0530, Athira Rajeev escreveu: > The affinity code in "affinity_set" function access array > named "sched_cpus". The size for this array is allocated in > affinity_setup function which is nothing but value from > get_cpu_set_size. This is used to contain the cpuma

Re: [PATCH] ASoC: fsl_asrc: Add initialization finishing check in runtime resume

2022-09-06 Thread Nicolin Chen
On Tue, Sep 6, 2022 at 3:50 AM Shengjiu Wang wrote: >> >> > + /* Wait for status of initialization for every enabled pairs */ >> >> > + do { >> >> > + udelay(5); >> >> > + regmap_read(asrc->regmap, REG_ASRCFG, ®); >> >> > + reg = (reg >> ASRCFG

Re: [PATCH] powerpc/pasemi: Use of_root in pas_pci_init()

2022-09-06 Thread Michael Ellerman
Christophe Leroy writes: > Le 06/09/2022 à 03:03, Michael Ellerman a écrit : >> Currently in pas_pci_init() a reference to the root node is leaked due >> to a missing of_node_put(). Instead just use of_root directly. >> >> Note that converting to of_find_compatible_node(NULL, ...) would >> not be

[PATCH linux-next] ocxl: Remove the unneeded result variable

2022-09-06 Thread cgel . zte
From: ye xingchen Return the value opal_npu_spa_clear_cache() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- arch/powerpc/platforms/powernv/ocxl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/