RE: [PATCH 05/11] iov_iter: merge the compat case into rw_copy_check_uvector

2021-01-08 Thread David Laight
From: Christoph Hellwig > Sent: 21 September 2020 15:34 > > Stop duplicating the iovec verify code, and instead add add a > __import_iovec helper that does the whole verify and import, but takes > a bool compat to decided on the native or compat layout. This also > ends up massively simplifying

[powerpc:merge] BUILD SUCCESS 39a77db53cca8200b8bc99fc0993e127b59f08fb

2021-01-08 Thread kernel test robot
lmodconfig powerpc allnoconfig x86_64 randconfig-a004-20210108 x86_64 randconfig-a006-20210108 x86_64 randconfig-a001-20210108 x86_64 randconfig-a002-20210108 x86_64 randconfig-a003-20210

[powerpc:fixes-test] BUILD SUCCESS 3ce47d95b7346dcafd9bed3556a8d072cb2b8571

2021-01-08 Thread kernel test robot
randconfig-a004-20210108 x86_64 randconfig-a006-20210108 x86_64 randconfig-a001-20210108 x86_64 randconfig-a002-20210108 x86_64 randconfig-a003-20210108 x86_64 randconfig-a005-20210108 i386 randconfig

[powerpc:next-test] BUILD SUCCESS 3e069ffc01566d93fa14c80f3c705c1610b9c402

2021-01-08 Thread kernel test robot
allmodconfig x86_64 randconfig-a004-20210108 x86_64 randconfig-a006-20210108 x86_64 randconfig-a001-20210108 x86_64 randconfig-a002-20210108 x86_64 randconfig-a003-20210108 x86_64 randconfig-a005-20210108 i386

Re: [patch V3 13/37] mips/mm/highmem: Switch to generic kmap atomic

2021-01-08 Thread Paul Cercueil
Hi Thomas, 5.11 does not boot anymore on Ingenic SoCs, I bisected it to this commit. Any idea what could be happening? Cheers, -Paul

Re: [PATCH] powerpc/mm: Limit allocation of SWIOTLB on server machines

2021-01-08 Thread Thiago Jung Bauermann
Ram Pai writes: > On Wed, Dec 23, 2020 at 09:06:01PM -0300, Thiago Jung Bauermann wrote: >> >> Hi Ram, >> >> Thanks for reviewing this patch. >> >> Ram Pai writes: >> >> > On Fri, Dec 18, 2020 at 03:21:03AM -0300, Thiago Jung Bauermann wrote: >> >> On server-class POWER machines, we don't

Re: [patch V3 13/37] mips/mm/highmem: Switch to generic kmap atomic

2021-01-08 Thread Thomas Bogendoerfer
On Fri, Jan 08, 2021 at 08:20:43PM +, Paul Cercueil wrote: > Hi Thomas, > > 5.11 does not boot anymore on Ingenic SoCs, I bisected it to this commit. > > Any idea what could be happening? not yet, kernel crash log of a Malta QEMU is below. Thomas. Kernel bug detected[#1]: CPU: 0 PID: 1 Com

Re: [patch V3 13/37] mips/mm/highmem: Switch to generic kmap atomic

2021-01-08 Thread Thomas Bogendoerfer
On Sat, Jan 09, 2021 at 12:58:05AM +0100, Thomas Bogendoerfer wrote: > On Fri, Jan 08, 2021 at 08:20:43PM +, Paul Cercueil wrote: > > Hi Thomas, > > > > 5.11 does not boot anymore on Ingenic SoCs, I bisected it to this commit. > > > > Any idea what could be happening? > > not yet, kernel cra

[PATCH v3 7/8] powerpc/signal64: Rewrite handle_rt_signal64() to minimise uaccess switches

2021-01-08 Thread Christopher M. Riedl
From: Daniel Axtens Add uaccess blocks and use the 'unsafe' versions of functions doing user access where possible to reduce the number of times uaccess has to be opened/closed. There is no 'unsafe' version of copy_siginfo_to_user, so move it slightly to allow for a "longer" uaccess block. Sign

[PATCH v3 5/8] powerpc/signal64: Replace setup_sigcontext() w/ unsafe_setup_sigcontext()

2021-01-08 Thread Christopher M. Riedl
Previously setup_sigcontext() performed a costly KUAP switch on every uaccess operation. These repeated uaccess switches cause a significant drop in signal handling performance. Rewrite setup_sigcontext() to assume that a userspace write access window is open. Replace all uaccess functions with th

[PATCH v3 1/8] powerpc/uaccess: Add unsafe_copy_from_user

2021-01-08 Thread Christopher M. Riedl
Implement raw_copy_from_user_allowed() which assumes that userspace read access is open. Use this new function to implement raw_copy_from_user(). Finally, wrap the new function to follow the usual "unsafe_" convention of taking a label argument. The new raw_copy_from_user_allowed() calls non-inlin

[PATCH v3 6/8] powerpc/signal64: Replace restore_sigcontext() w/ unsafe_restore_sigcontext()

2021-01-08 Thread Christopher M. Riedl
Previously restore_sigcontext() performed a costly KUAP switch on every uaccess operation. These repeated uaccess switches cause a significant drop in signal handling performance. Rewrite restore_sigcontext() to assume that a userspace read access window is open. Replace all uaccess functions with

[PATCH v3 2/8] powerpc/signal: Add unsafe_copy_{vsx,fpr}_from_user()

2021-01-08 Thread Christopher M. Riedl
Reuse the "safe" implementation from signal.c except for calling unsafe_copy_from_user() to copy into a local buffer. Signed-off-by: Christopher M. Riedl --- arch/powerpc/kernel/signal.h | 33 + 1 file changed, 33 insertions(+) diff --git a/arch/powerpc/kernel/si

[PATCH v3 4/8] powerpc/signal64: Remove TM ifdefery in middle of if/else block

2021-01-08 Thread Christopher M. Riedl
Rework the messy ifdef breaking up the if-else for TM similar to commit f1cf4f93de2f ("powerpc/signal32: Remove ifdefery in middle of if/else"). Unlike that commit for ppc32, the ifdef can't be removed entirely since uc_transact in sigframe depends on CONFIG_PPC_TRANSACTIONAL_MEM. Signed-off-by:

[PATCH v3 8/8] powerpc/signal64: Rewrite rt_sigreturn() to minimise uaccess switches

2021-01-08 Thread Christopher M. Riedl
From: Daniel Axtens Add uaccess blocks and use the 'unsafe' versions of functions doing user access where possible to reduce the number of times uaccess has to be opened/closed. Signed-off-by: Daniel Axtens Co-developed-by: Christopher M. Riedl Signed-off-by: Christopher M. Riedl --- arch/po

[PATCH v3 0/8] Improve signal performance on PPC64 with KUAP

2021-01-08 Thread Christopher M. Riedl
As reported by Anton, there is a large penalty to signal handling performance on radix systems using KUAP. The signal handling code performs many user access operations, each of which needs to switch the KUAP permissions bit to open and then close user access. This involves a costly 'mtspr' operati

[PATCH v3 3/8] powerpc/signal64: Move non-inline functions out of setup_sigcontext()

2021-01-08 Thread Christopher M. Riedl
There are non-inline functions which get called in setup_sigcontext() to save register state to the thread struct. Move these functions into a separate prepare_setup_sigcontext() function so that setup_sigcontext() can be refactored later into an "unsafe" version which assumes an open uaccess windo