Re: [next-20220215] WARNING at fs/iomap/buffered-io.c:75 with xfstests

2022-02-15 Thread Stephen Rothwell
Hi Sachin, On Wed, 16 Feb 2022 12:55:02 +0530 Sachin Sant wrote: > > While running xfstests on IBM Power10 logical partition (LPAR) booted > with 5.17.0-rc4-next-20220215 following warning was seen: > > The warning is seen when test tries to unmount the file system. This pro

[next-20220215] WARNING at fs/iomap/buffered-io.c:75 with xfstests

2022-02-15 Thread Sachin Sant
While running xfstests on IBM Power10 logical partition (LPAR) booted with 5.17.0-rc4-next-20220215 following warning was seen: [ 2547.384210] xfs filesystem being mounted at /mnt/scratch supports timestamps until 2038 (0x7fff) [ 2547.389021] XFS (dm-0): metadata I/O error in "xfs_imap_

Re: [PATCH v2 1/2] crypto: vmx: Turn CRYPTO_DEV_VMX_ENCRYPT into tristate

2022-02-15 Thread Petr Vorel
Hi, I kept CRYPTO_DEV_VMX_ENCRYPT in drivers/crypto/vmx/Kconfig, but maybe I should have moved it into drivers/crypto/Kconfig. It's not clear what is preferred. Kind regards, Petr

[PATCH v4 0/6] Improve KVM's interaction with CPU hotplug

2022-02-15 Thread Chao Gao
Changes from v3->v4: - rebased to the lastest kvm/next branch. - add Sean's reviewed-by tags - add Marc's patch to simplify ARM's cpu hotplug logic in KVM Changes from v2->v3: - rebased to the latest kvm/next branch. - patch 1: rename {svm,vmx}_check_processor_compat to follow the name

Re: [PATCH v4 2/6] Partially revert "KVM: Pass kvm_init()'s opaque param to additional arch funcs"

2022-02-15 Thread Anup Patel
On Wed, Feb 16, 2022 at 8:46 AM Chao Gao wrote: > > This partially reverts commit b99040853738 ("KVM: Pass kvm_init()'s opaque > param to additional arch funcs") remove opaque from > kvm_arch_check_processor_compat because no one uses this opaque now. > Address conflicts for ARM (due to file movem

[PATCH v4 2/6] Partially revert "KVM: Pass kvm_init()'s opaque param to additional arch funcs"

2022-02-15 Thread Chao Gao
This partially reverts commit b99040853738 ("KVM: Pass kvm_init()'s opaque param to additional arch funcs") remove opaque from kvm_arch_check_processor_compat because no one uses this opaque now. Address conflicts for ARM (due to file movement) and manually handle RISC-V which comes after the commi

Re: [PATCH v3 07/10] powerpc/vas: Add paste address mmap fault handler

2022-02-15 Thread Haren Myneni
On Mon, 2022-02-14 at 13:37 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of January 22, 2022 5:59 am: > > The user space opens VAS windows and issues NX requests by pasting > > CRB on the corresponding paste address mmap. When the system looses > > s/loose/lose/g throughout

Re: [PATCH v3 04/10] powerpc/pseries/vas: Reopen windows with DLPAR core add

2022-02-15 Thread Haren Myneni
On Mon, 2022-02-14 at 13:08 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of January 22, 2022 5:56 am: > > VAS windows can be closed in the hypervisor due to lost credits > > when the core is removed. If these credits are available later > > for core add, reopen these windows

Re: [PATCH v3 06/10] powerpc/vas: Map paste address only if window is active

2022-02-15 Thread Haren Myneni
On Mon, 2022-02-14 at 13:20 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of January 22, 2022 5:58 am: > > The paste address mapping is done with mmap() after the window is > > opened with ioctl. But the window can be closed due to lost credit > > due to core removal before m

Re: [PATCH v3 05/10] powerpc/pseries/vas: Close windows with DLPAR core removal

2022-02-15 Thread Haren Myneni
On Mon, 2022-02-14 at 13:17 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of January 22, 2022 5:57 am: > > The hypervisor reduces the available credits if the core is removed > > from the LPAR. So there is possibility of using excessive credits > > (windows) in the LPAR and t

Re: [PATCH kernel 2/3] powerpc/llvm: Sample config for LLVM LTO

2022-02-15 Thread Alexey Kardashevskiy
On 2/12/22 11:05, Nick Desaulniers wrote: On Thu, Feb 10, 2022 at 6:31 PM Alexey Kardashevskiy wrote: The config is a copy of ppc64_defconfig with a few tweaks. This could be a smaller config to merge into ppc64_defconfig but unfortunately merger does not allow disabling already enabled opt

Re: [PATCH v3 03/10] powerpc/pseries/vas: Save LPID in pseries_vas_window struct

2022-02-15 Thread Haren Myneni
On Mon, 2022-02-14 at 12:41 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of January 22, 2022 5:55 am: > > The kernel sets the VAS window with partition PID when is opened in > > the hypervisor. During DLPAR operation, windows can be closed and > > reopened in the hypervisor

Re: [PATCH v3 02/10] powerpc/pseries/vas: Add notifier for DLPAR core removal/add

2022-02-15 Thread Haren Myneni
On Mon, 2022-02-14 at 12:27 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of January 22, 2022 5:54 am: > > The hypervisor assigns credits for each LPAR based on number of > > cores configured in that system. So expects to release credits > > (means windows) when the core is r

Re: [PATCH v1 1/2] cma: factor out minimum alignment requirement

2022-02-15 Thread Rob Herring
On Mon, Feb 14, 2022 at 11:42 AM David Hildenbrand wrote: > > Let's factor out determining the minimum alignment requirement for CMA > and add a helpful comment. > > No functional change intended. > > Signed-off-by: David Hildenbrand > --- > arch/powerpc/include/asm/fadump-internal.h | 5 -

[PATCH v2 1/2] crypto: vmx: Turn CRYPTO_DEV_VMX_ENCRYPT into tristate

2022-02-15 Thread Petr Vorel
and remove CRYPTO_DEV_VMX, which looked redundant when only CRYPTO_DEV_VMX_ENCRYPT used it. Also it forces CRYPTO_GHASH to be builtin even CRYPTO_DEV_VMX_ENCRYPT was configured as module. Update powerpc defconfigs and description in MAINTAINERS. Signed-off-by: Petr Vorel --- new in v2 This migh

[PATCH v2 2/2] crypto: vmx: Add missing dependencies

2022-02-15 Thread Petr Vorel
vmx-crypto module depends on CRYPTO_AES, CRYPTO_CBC, CRYPTO_CTR or CRYPTO_XTS, thus add them. These dependencies are likely to be enabled, but if CRYPTO_DEV_VMX_ENCRYPT=y && !CRYPTO_MANAGER_DISABLE_TESTS and either of CRYPTO_AES, CRYPTO_CBC, CRYPTO_CTR or CRYPTO_XTS is built as module or disabled,

[PATCH v2 0/2] vmx-crypto: Add missing dependencies

2022-02-15 Thread Petr Vorel
Hi, [ Cc powerpc list and VMX people this time ] changes v1->v2: * new commit: crypto: vmx: Turn CRYPTO_DEV_VMX_ENCRYPT into tristate * use "select" instead of "depends on" (Nicolai) * drop !CRYPTO_MANAGER_DISABLE_TESTS as the dependency is always (Nicolai) Petr Vorel (2): crypto: vmx: Turn CR

Re: [PATCH v3 01/10] powerpc/pseries/vas: Use common names in VAS capability structure

2022-02-15 Thread Haren Myneni
On Mon, 2022-02-14 at 12:14 +1000, Nicholas Piggin wrote: > Excerpts from Haren Myneni's message of January 22, 2022 5:54 am: > > target/used/avail_creds provides credits usage to user space via > > sysfs and the same interface can be used on PowerNV in future. > > Remove "lpar" from these names so

[PATCH v1 4/4] powerpc/ftrace: Style cleanup in ftrace_mprofile.S

2022-02-15 Thread Christophe Leroy
Add some line breaks to better match the file's style, add some space after comma and fix a couple of misplaced blanks. Suggested-by: Naveen N. Rao Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/ftrace_mprofile.S | 12 1 file changed, 8 insertions(+), 4 deletions(-)

[PATCH v1 3/4] powerpc/ftrace: Have arch_ftrace_get_regs() return NULL unless FL_SAVE_REGS is set

2022-02-15 Thread Christophe Leroy
When FL_SAVE_REGS is not set we get here via ftrace_caller() which doesn't save all registers. ftrace_caller() explicitely clears regs.msr, so we can rely on it to know where we come from. We don't expect MSR register to be 0 at all when involving ftrace. Reported-by: Naveen N. Rao Fixes: 40b035

[PATCH v1 2/4] powerpc/ftrace: Add recursion protection in prepare_ftrace_return()

2022-02-15 Thread Christophe Leroy
The function_graph_enter() does not provide any recursion protection. Add a protection in prepare_ftrace_return() in case function_graph_enter() calls something that gets function graph traced. Reported-by: Naveen N. Rao Fixes: 830213786c49 ("powerpc/ftrace: directly call of function graph trace

[PATCH v1 1/4] powerpc/ftrace: Also save r1 in ftrace_caller()

2022-02-15 Thread Christophe Leroy
Also save r1 in ftrace_caller() r1 is needed during unwinding when the function_graph tracer is active. Reported-by: Naveen N. Rao Fixes: 830213786c49 ("powerpc/ftrace: directly call of function graph tracer by ftrace caller") Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/ftra

Re: [PATCH v2 09/13] powerpc/ftrace: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS

2022-02-15 Thread Naveen N. Rao
Steven Rostedt wrote: On Tue, 15 Feb 2022 19:06:48 +0530 "Naveen N. Rao" wrote: As I understand it, the reason ftrace_get_regs() was introduced was to be able to only return the pt_regs, if _all_ registers were saved into it, which we don't do when coming in through ftrace_caller(). See the

Re: [PATCH v2 09/13] powerpc/ftrace: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS

2022-02-15 Thread Naveen N. Rao
Christophe Leroy wrote: + S390 people Le 15/02/2022 à 15:28, Christophe Leroy a écrit : Le 15/02/2022 à 14:36, Naveen N. Rao a écrit : Michael Ellerman wrote: Christophe Leroy writes: Le 14/02/2022 à 16:25, Naveen N. Rao a écrit : Christophe Leroy wrote: Implement CONFIG_DYNAMIC_FTRACE_

Re: [PATCH v4 00/13] Fix LKDTM for PPC64/IA64/PARISC v4

2022-02-15 Thread Kees Cook
On Tue, Feb 15, 2022 at 01:40:55PM +0100, Christophe Leroy wrote: > PPC64/IA64/PARISC have function descriptors. LKDTM doesn't work > on those three architectures because LKDTM messes up function > descriptors with functions. > > This series does some cleanup in the three architectures and > refac

Re: [PATCH v4 01/13] powerpc: Fix 'sparse' checking on PPC64le

2022-02-15 Thread Kees Cook
On Tue, Feb 15, 2022 at 01:40:56PM +0100, Christophe Leroy wrote: > 'sparse' is architecture agnostic and knows nothing about ELF ABI > version. > > Just like it gets arch and powerpc type and endian from Makefile, > it also need to get _CALL_ELF from there, otherwise it won't set > PPC64_ELF_ABI_

Re: [PATCH v2 09/13] powerpc/ftrace: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS

2022-02-15 Thread Christophe Leroy
+ S390 people Le 15/02/2022 à 15:28, Christophe Leroy a écrit : Le 15/02/2022 à 14:36, Naveen N. Rao a écrit : Michael Ellerman wrote: Christophe Leroy writes: Le 14/02/2022 à 16:25, Naveen N. Rao a écrit : Christophe Leroy wrote: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS. It accelerates

Re: [PATCH v2 09/13] powerpc/ftrace: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS

2022-02-15 Thread Steven Rostedt
On Tue, 15 Feb 2022 19:06:48 +0530 "Naveen N. Rao" wrote: > As I understand it, the reason ftrace_get_regs() was introduced was to > be able to only return the pt_regs, if _all_ registers were saved into > it, which we don't do when coming in through ftrace_caller(). See the > x86 implementati

Re: [PATCH v2 09/13] powerpc/ftrace: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS

2022-02-15 Thread Christophe Leroy
Le 15/02/2022 à 14:36, Naveen N. Rao a écrit : > Michael Ellerman wrote: >> Christophe Leroy writes: >>> Le 14/02/2022 à 16:25, Naveen N. Rao a écrit : Christophe Leroy wrote: > Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS. It accelerates the call > of livepatching. > > Also no

Re: [PATCH v2 09/13] powerpc/ftrace: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS

2022-02-15 Thread Naveen N. Rao
Michael Ellerman wrote: Christophe Leroy writes: Le 14/02/2022 à 16:25, Naveen N. Rao a écrit : Christophe Leroy wrote: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS. It accelerates the call of livepatching. Also note that powerpc being the last one to convert to CONFIG_DYNAMIC_FTRACE_WITH_ARGS,

RE: [PATCH 09/14] m68k: drop custom __access_ok()

2022-02-15 Thread David Laight
From: Arnd Bergmann > Sent: 15 February 2022 10:02 > > On Tue, Feb 15, 2022 at 8:13 AM Al Viro wrote: > > On Tue, Feb 15, 2022 at 07:29:42AM +0100, Christoph Hellwig wrote: > > > On Tue, Feb 15, 2022 at 12:37:41AM +, Al Viro wrote: > > > > Perhaps simply wrap that sucker into #ifdef > > > >

Re: [PATCH 05/14] uaccess: add generic __{get,put}_kernel_nofault

2022-02-15 Thread Arnd Bergmann
On Tue, Feb 15, 2022 at 1:31 AM Al Viro wrote: > > On Mon, Feb 14, 2022 at 05:34:43PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > All architectures that don't provide __{get,put}_kernel_nofault() yet > > can implement this on top of __{get,put}_user. > > > > Add a generic version

[PATCH v4 04/13] powerpc: Remove 'struct ppc64_opd_entry'

2022-02-15 Thread Christophe Leroy
'struct ppc64_opd_entry' doesn't belong to uapi/asm/elf.h It was initially in module_64.c and commit 2d291e902791 ("Fix compile failure with non modular builds") moved it into asm/elf.h But it was by mistake added outside of __KERNEL__ section, therefore commit c3617f72036c ("UAPI: (Scripted) Dis

[PATCH v4 05/13] powerpc: Prepare func_desc_t for refactorisation

2022-02-15 Thread Christophe Leroy
In preparation of making func_desc_t generic, change the ELFv2 version to a struct containing 'addr' element. This allows using single helpers common to ELFv1 and ELFv2 and reduces the amount of #ifdef's Signed-off-by: Christophe Leroy Acked-by: Nicholas Piggin Reviewed-by: Kees Cook --- arch

[PATCH v4 02/13] powerpc: Move and rename func_descr_t

2022-02-15 Thread Christophe Leroy
There are three architectures with function descriptors, try to have common names for the address they contain in order to refactor some functions into generic functions later. powerpc has 'entry' ia64 has 'ip' parisc has 'addr' Vote for 'addr' and update 'func_descr_t' accordingly. Move it in a

[PATCH v4 09/13] asm-generic: Refactor dereference_[kernel]_function_descriptor()

2022-02-15 Thread Christophe Leroy
dereference_function_descriptor() and dereference_kernel_function_descriptor() are identical on the three architectures implementing them. Make them common and put them out-of-line in kernel/extable.c which is one of the users and has similar type of functions. Reviewed-by: Kees Cook Reviewed-by

[PATCH v4 00/13] Fix LKDTM for PPC64/IA64/PARISC v4

2022-02-15 Thread Christophe Leroy
PPC64/IA64/PARISC have function descriptors. LKDTM doesn't work on those three architectures because LKDTM messes up function descriptors with functions. This series does some cleanup in the three architectures and refactors function descriptors so that it can then easily use it in a generic way i

[PATCH v4 07/13] asm-generic: Define CONFIG_HAVE_FUNCTION_DESCRIPTORS

2022-02-15 Thread Christophe Leroy
Replace HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR by a config option named CONFIG_HAVE_FUNCTION_DESCRIPTORS and use it instead of 'dereference_function_descriptor' macro to know whether an arch has function descriptors. To limit churn in one of the following patches, use an #ifdef/#else construct with

[PATCH v4 13/13] lkdtm: Add a test for function descriptors protection

2022-02-15 Thread Christophe Leroy
Add WRITE_OPD to check that you can't modify function descriptors. Gives the following result when function descriptors are not protected: lkdtm: Performing direct entry WRITE_OPD lkdtm: attempting bad 16 bytes write at c269b358 lkdtm: FAIL: survived bad write

[PATCH v4 06/13] ia64: Rename 'ip' to 'addr' in 'struct fdesc'

2022-02-15 Thread Christophe Leroy
There are three architectures with function descriptors, try to have common names for the address they contain in order to refactor some functions into generic functions later. powerpc has 'entry' ia64 has 'ip' parisc has 'addr' Vote for 'addr' and update 'struct fdesc' accordingly. Reviewed-by:

[PATCH v4 10/13] lkdtm: Force do_nothing() out of line

2022-02-15 Thread Christophe Leroy
LKDTM tests display that the run do_nothing() at a given address, but in reality do_nothing() is inlined into the caller. Force it out of line so that it really runs text at the displayed address. Acked-by: Kees Cook Signed-off-by: Christophe Leroy --- drivers/misc/lkdtm/perms.c | 4 ++-- 1 fi

[PATCH v4 08/13] asm-generic: Define 'func_desc_t' to commonly describe function descriptors

2022-02-15 Thread Christophe Leroy
We have three architectures using function descriptors, each with its own type and name. Add a common typedef that can be used in generic code. Also add a stub typedef for architecture without function descriptors, to avoid a forest of #ifdefs. It replaces the similar 'func_desc_t' previously de

[PATCH v4 12/13] lkdtm: Fix execute_[user]_location()

2022-02-15 Thread Christophe Leroy
execute_location() and execute_user_location() intent to copy do_nothing() text and execute it at a new location. However, at the time being it doesn't copy do_nothing() function but do_nothing() function descriptor which still points to the original text. So at the end it still executes do_nothing

[PATCH v4 01/13] powerpc: Fix 'sparse' checking on PPC64le

2022-02-15 Thread Christophe Leroy
'sparse' is architecture agnostic and knows nothing about ELF ABI version. Just like it gets arch and powerpc type and endian from Makefile, it also need to get _CALL_ELF from there, otherwise it won't set PPC64_ELF_ABI_v2 macro for PPC64le and won't check the correct code. Signed-off-by: Christo

[PATCH v4 03/13] powerpc: Use 'struct func_desc' instead of 'struct ppc64_opd_entry'

2022-02-15 Thread Christophe Leroy
'struct ppc64_opd_entry' is somehow redundant with 'struct func_desc', the later is more correct/complete as it includes the third field which is unused. So use 'struct func_desc' instead of 'struct ppc64_opd_entry' Reviewed-by: Kees Cook Reviewed-by: Daniel Axtens Reviewed-by: Nicholas Piggin

[PATCH v4 11/13] lkdtm: Really write into kernel text in WRITE_KERN

2022-02-15 Thread Christophe Leroy
WRITE_KERN is supposed to overwrite some kernel text, namely do_overwritten() function. But at the time being it overwrites do_overwritten() function descriptor, not function text. Fix it by dereferencing the function descriptor to obtain function text pointer. Export dereference_function_descrip

[PATCH] powerpc/Makefile: Don't pass -mcpu=powerpc64 when building 32-bit

2022-02-15 Thread Michael Ellerman
When CONFIG_GENERIC_CPU=y (true for all our defconfigs) we pass -mcpu=powerpc64 to the compiler, even when we're building a 32-bit kernel. This happens because we have an ifdef CONFIG_PPC_BOOK3S_64/else block in the Makefile that was written before 32-bit supported GENERIC_CPU. Prior to that the e

Re: [PATCH] powerpc/module_64: use module_init_section instead of patching names

2022-02-15 Thread Michael Ellerman
Wedson Almeida Filho writes: > Hi Michael, > > On Wed, 2 Feb 2022 at 05:53, Wedson Almeida Filho wrote: >> >> Without this patch, module init sections are disabled by patching their >> names in arch-specific code when they're loaded (which prevents code in >> layout_sections from finding init sec

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Mark Rutland
On Tue, Feb 15, 2022 at 09:30:41AM +, David Laight wrote: > From: Ard Biesheuvel > > Sent: 15 February 2022 08:18 > > > > On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > > > > > From: Arnd Bergmann > > > > > > arm64 has an inline asm implementation of access_ok() that is derived from

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Mark Rutland
On Mon, Feb 14, 2022 at 05:34:46PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > arm64 has an inline asm implementation of access_ok() that is derived from > the 32-bit arm version and optimized for the case that both the limit and > the size are variable. With set_fs() gone, the limit is

Re: [PATCH v2 09/13] powerpc/ftrace: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS

2022-02-15 Thread Michael Ellerman
Christophe Leroy writes: > Le 14/02/2022 à 16:25, Naveen N. Rao a écrit : >> Christophe Leroy wrote: >>> Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS. It accelerates the call >>> of livepatching. >>> >>> Also note that powerpc being the last one to convert to >>> CONFIG_DYNAMIC_FTRACE_WITH_ARGS, it w

Re: [PATCH 07/14] uaccess: generalize access_ok()

2022-02-15 Thread Mark Rutland
On Mon, Feb 14, 2022 at 05:34:45PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > There are many different ways that access_ok() is defined across > architectures, but in the end, they all just compare against the > user_addr_max() value or they accept anything. > > Provide one definition

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Mark Rutland
On Tue, Feb 15, 2022 at 10:39:46AM +0100, Arnd Bergmann wrote: > On Tue, Feb 15, 2022 at 10:21 AM Ard Biesheuvel wrote: > > On Tue, 15 Feb 2022 at 10:13, Arnd Bergmann wrote: > > > > arm64 also has this leading up to the range check, and I think we'd no > > longer need it: > > > > if (IS_ENAB

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Mark Rutland
On Tue, Feb 15, 2022 at 10:21:16AM +0100, Ard Biesheuvel wrote: > On Tue, 15 Feb 2022 at 10:13, Arnd Bergmann wrote: > > > > On Tue, Feb 15, 2022 at 9:17 AM Ard Biesheuvel wrote: > > > On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > > > From: Arnd Bergmann > > > > > > > > > > With set_fs

Re: [PATCH 03/14] nds32: fix access_ok() checks in get/put_user

2022-02-15 Thread Greg KH
On Tue, Feb 15, 2022 at 10:18:15AM +0100, Arnd Bergmann wrote: > On Mon, Feb 14, 2022 at 6:01 PM Christoph Hellwig wrote: > > > > On Mon, Feb 14, 2022 at 05:34:41PM +0100, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > The get_user()/put_user() functions are meant to check for > > > a

Re: [PATCH 09/14] m68k: drop custom __access_ok()

2022-02-15 Thread Arnd Bergmann
On Tue, Feb 15, 2022 at 8:13 AM Al Viro wrote: > On Tue, Feb 15, 2022 at 07:29:42AM +0100, Christoph Hellwig wrote: > > On Tue, Feb 15, 2022 at 12:37:41AM +, Al Viro wrote: > > > Perhaps simply wrap that sucker into #ifdef CONFIG_CPU_HAS_ADDRESS_SPACES > > > (and trim the comment down to "cold

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Arnd Bergmann
On Tue, Feb 15, 2022 at 10:21 AM Ard Biesheuvel wrote: > On Tue, 15 Feb 2022 at 10:13, Arnd Bergmann wrote: > > arm64 also has this leading up to the range check, and I think we'd no > longer need it: > > if (IS_ENABLED(CONFIG_ARM64_TAGGED_ADDR_ABI) && > (current->flags & PF_KTHREAD |

Re: [PATCH v2] i2c: pasemi: Drop I2C classes from platform driver variant

2022-02-15 Thread Wolfram Sang
On Fri, Feb 04, 2022 at 10:59:14AM +0100, Martin Povišer wrote: > Drop I2C device-probing classes from platform variant of the PASemi > controller as it is only used on platforms where I2C devices should > be instantiated in devicetree. (The I2C_CLASS_DEPRECATED flag is not > raised as up to this p

RE: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread David Laight
From: Ard Biesheuvel > Sent: 15 February 2022 08:18 > > On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > > > From: Arnd Bergmann > > > > arm64 has an inline asm implementation of access_ok() that is derived from > > the 32-bit arm version and optimized for the case that both the limit and

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Ard Biesheuvel
On Tue, 15 Feb 2022 at 10:13, Arnd Bergmann wrote: > > On Tue, Feb 15, 2022 at 9:17 AM Ard Biesheuvel wrote: > > On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > > With set_fs() out of the picture, wouldn't it be sufficient to check > > that bit #55 is cl

Re: [PATCH 03/14] nds32: fix access_ok() checks in get/put_user

2022-02-15 Thread Arnd Bergmann
On Mon, Feb 14, 2022 at 6:01 PM Christoph Hellwig wrote: > > On Mon, Feb 14, 2022 at 05:34:41PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > The get_user()/put_user() functions are meant to check for > > access_ok(), while the __get_user()/__put_user() functions > > don't. > > > >

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Arnd Bergmann
On Tue, Feb 15, 2022 at 9:17 AM Ard Biesheuvel wrote: > On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > With set_fs() out of the picture, wouldn't it be sufficient to check > that bit #55 is clear? (the bit that selects between TTBR0 and TTBR1) > That would als

Re: [PATCH v2 12/13] powerpc/ftrace: Prepare ftrace_64_mprofile.S for reuse by PPC32

2022-02-15 Thread Christophe Leroy
Le 14/02/2022 à 18:51, Naveen N. Rao a écrit : > Christophe Leroy wrote: >> PPC64 mprofile versions and PPC32 are very similar. >> >> Modify PPC64 version so that if can be reused for PPC32. >> >> Signed-off-by: Christophe Leroy >> --- >>  .../powerpc/kernel/trace/ftrace_64_mprofile.S | 73 +

Re: [PATCH 08/14] arm64: simplify access_ok()

2022-02-15 Thread Ard Biesheuvel
On Mon, 14 Feb 2022 at 17:37, Arnd Bergmann wrote: > > From: Arnd Bergmann > > arm64 has an inline asm implementation of access_ok() that is derived from > the 32-bit arm version and optimized for the case that both the limit and > the size are variable. With set_fs() gone, the limit is always co

Re: [PATCH 14/14] uaccess: drop set_fs leftovers

2022-02-15 Thread Arnd Bergmann
On Tue, Feb 15, 2022 at 8:46 AM Helge Deller wrote: > > On 2/15/22 04:03, Al Viro wrote: > > On Mon, Feb 14, 2022 at 05:34:52PM +0100, Arnd Bergmann wrote: > >> diff --git a/arch/parisc/include/asm/futex.h > >> b/arch/parisc/include/asm/futex.h > >> index b5835325d44b..2f4a1b1ef387 100644 > >> --

Re: [PATCH v2 09/13] powerpc/ftrace: Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS

2022-02-15 Thread Christophe Leroy
Le 14/02/2022 à 16:25, Naveen N. Rao a écrit : > Christophe Leroy wrote: >> Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS. It accelerates the call >> of livepatching. >> >> Also note that powerpc being the last one to convert to >> CONFIG_DYNAMIC_FTRACE_WITH_ARGS, it will now be possible to remove >>