Re: [PATCH v2 05/18] x86: remove __range_not_ok()

2022-02-17 Thread Arnd Bergmann
On Fri, Feb 18, 2022 at 7:28 AM Christoph Hellwig wrote: > On Wed, Feb 16, 2022 at 02:13:19PM +0100, Arnd Bergmann wrote: > > --- a/arch/x86/events/core.c > > +++ b/arch/x86/events/core.c > > @@ -2794,7 +2794,7 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx > > *entry, struct pt_regs *r

Re: [PATCH v2 13/18] uaccess: generalize access_ok()

2022-02-17 Thread Arnd Bergmann
On Fri, Feb 18, 2022 at 7:34 AM Christoph Hellwig wrote: > > > +#include > > Instead of the asm-generic games, shouldn't we just define access_ok in > if not already defined by the architecture? I tried, but couldn't actually make it work because asm/uaccess.h tends to contain inline functions

Re: [PATCH v2 13/18] uaccess: generalize access_ok()

2022-02-17 Thread Arnd Bergmann
On Thu, Feb 17, 2022 at 8:15 PM Andy Lutomirski wrote: > > On Wed, Feb 16, 2022 at 5:19 AM 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_

Re: [PATCH v2 14/18] lib/test_lockup: fix kernel pointer check for separate address spaces

2022-02-17 Thread Arnd Bergmann
On Fri, Feb 18, 2022 at 7:35 AM Christoph Hellwig wrote: > > On Wed, Feb 16, 2022 at 02:13:28PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > test_kernel_ptr() uses access_ok() to figure out if a given address > > points to user space instead of kernel space. However on architecture

Re: bug: usb: gadget: FSL_UDC_CORE Corrupted request list leads to unrecoverable loop.

2022-02-17 Thread Thorsten Leemhuis
Hi, this is your Linux kernel regression tracker speaking. Top-posting for once, to make this easy accessible to everyone. Sadly it looks to me like nobody is going to address this (quite old) regression (that afaic only very few people will hit), despite the rough patch to fix it that was already

Re: [PATCH v2 18/18] uaccess: drop maining CONFIG_SET_FS users

2022-02-17 Thread Arnd Bergmann
On Fri, Feb 18, 2022 at 7:37 AM Christoph Hellwig wrote: > > s/maining/remaining/ ? > > Or maybe rather: > > uaccess: remove CONFIG_SET_FS > > because it is all gone now. > > > With CONFIG_SET_FS gone, so drop all remaining references to > > set_fs()/get_fs(), mm_segment_t and uaccess_kernel(). >

Re: [PATCH 3/3] kprobes: Allow probing on any address belonging to ftrace

2022-02-17 Thread Naveen N. Rao
Naveen N. Rao wrote: On certain architectures, ftrace can reserve multiple instructions at function entry. Rather than rejecting kprobe on addresses other than the exact ftrace call instruction, use the address returned by ftrace to probe at the correct address when CONFIG_KPROBES_ON_FTRACE is en

Re: [PATCH v2 18/18] uaccess: drop maining CONFIG_SET_FS users

2022-02-17 Thread Christoph Hellwig
s/maining/remaining/ ? Or maybe rather: uaccess: remove CONFIG_SET_FS because it is all gone now. > With CONFIG_SET_FS gone, so drop all remaining references to > set_fs()/get_fs(), mm_segment_t and uaccess_kernel(). And this sentence does not parse.

Re: [PATCH v2 16/18] sh: remove CONFIG_SET_FS support

2022-02-17 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH v2 14/18] lib/test_lockup: fix kernel pointer check for separate address spaces

2022-02-17 Thread Christoph Hellwig
On Wed, Feb 16, 2022 at 02:13:28PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > test_kernel_ptr() uses access_ok() to figure out if a given address > points to user space instead of kernel space. However on architectures > that set CONFIG_ALTERNATE_USER_ADDRESS_SPACE, a pointer can be va

Re: [PATCH v2 13/18] uaccess: generalize access_ok()

2022-02-17 Thread Christoph Hellwig
> +#include Instead of the asm-generic games, shouldn't we just define access_ok in if not already defined by the architecture?

Re: [PATCH v2 12/18] uaccess: fix type mismatch warnings from access_ok()

2022-02-17 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 10/18] m68k: fix access_ok for coldfire

2022-02-17 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 08/18] uaccess: add generic __{get,put}_kernel_nofault

2022-02-17 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH v2 07/18] nios2: drop access_ok() check from __put_user()

2022-02-17 Thread Christoph Hellwig
On Wed, Feb 16, 2022 at 02:13:21PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > Unlike other architectures, the nios2 version of __put_user() has an > extra check for access_ok(), preventing it from being used to implement > __put_kernel_nofault(). > > Split up put_user() along the same

Re: [PATCH v2 06/18] x86: use more conventional access_ok() definition

2022-02-17 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 05/18] x86: remove __range_not_ok()

2022-02-17 Thread Christoph Hellwig
On Wed, Feb 16, 2022 at 02:13:19PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > The __range_not_ok() helper is an x86 (and sparc64) specific interface > that does roughly the same thing as __access_ok(), but with different > calling conventions. > > Change this to use the normal interfa

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

2022-02-17 Thread Christoph Hellwig
On Wed, Feb 16, 2022 at 02:13:17PM +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. > > This broke in 4.19 for nds32, when it gained an extraneous > check in __ge

Re: [PATCH v2 02/18] uaccess: fix nios2 and microblaze get_user_8()

2022-02-17 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH 0/3] drivers/crypto: Constify static attribute_group

2022-02-17 Thread Herbert Xu
On Thu, Feb 10, 2022 at 09:28:02PM +0100, Rikard Falkeborn wrote: > This series constifies a couple of static attribute_group structs that > are not modified. This allows the compiler to put them in read-only > memory. The patches are independent and can be applied in any order (and > go through di

[GIT PULL] Please pull powerpc/linux.git powerpc-5.17-4 tag

2022-02-17 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 5.17: The following changes since commit 26291c54e111ff6ba87a164d85d4a4e134b7315c: Linux 5.17-rc2 (2022-01-30 15:37:07 +0200) are available in the git repository at: https://git.kernel.org/pu

Re: [PATCH] powerpc/603: Fix boot failure with DEBUG_PAGEALLOC and KFENCE

2022-02-17 Thread Michael Ellerman
On Tue, 7 Dec 2021 06:10:05 +, Christophe Leroy wrote: > Allthough kernel text is always mapped with BATs, we still have > inittext mapped with pages, so TLB miss handling is required > when CONFIG_DEBUG_PAGEALLOC or CONFIG_KFENCE is set. > > The final solution should be to set a BAT that also

Re: [PATCHv2] powerpc/lib/sstep: fix 'ptesync' build error

2022-02-17 Thread Michael Ellerman
On Fri, 11 Feb 2022 01:51:13 +0100, Anders Roxell wrote: > Building tinyconfig with gcc (Debian 11.2.0-16) and assembler (Debian > 2.37.90.20220207) the following build error shows up: > > {standard input}: Assembler messages: > {standard input}:2088: Error: unrecognized opcode: `ptesync' > make[3

Re: [PATCH v2 00/18] clean up asm/uaccess.h, kill set_fs for good

2022-02-17 Thread Al Viro
On Thu, Feb 17, 2022 at 08:49:59AM +0100, Arnd Bergmann wrote: > Same here: architectures can already provide a __put_user_fn() > and __get_user_fn(), to get the generic versions of the interface, > but few architectures use that. You can actually get all the interfaces > by just providing raw_cop

Re: [PATCH] powerpc/kvm: no need to initialise statics to 0

2022-02-17 Thread Michael Ellerman
On Mon, 20 Dec 2021 11:02:43 +0800, Jason Wang wrote: > Static variables do not need to be initialised to 0, because compiler > will initialise all uninitialised statics to 0. Thus, remove the > unneeded initialization. > > Applied to powerpc/topic/ppc-kvm. [1/1] powerpc/kvm: no need to initial

Re: [PATCH 0/3] KVM: PPC: KVM module exit fixes

2022-02-17 Thread Michael Ellerman
On Thu, 23 Dec 2021 18:19:28 -0300, Fabiano Rosas wrote: > This is a resend the module cleanup fixes but this time without the > HV/PR merge. > > Fabiano Rosas (1): > KVM: PPC: Book3S HV: Check return value of kvmppc_radix_init > KVM: PPC: Book3S HV: Delay setting of kvm ops > KVM: PPC: Book

Re: [PATCH kernel v5] KVM: PPC: Merge powerpc's debugfs entry content into generic entry

2022-02-17 Thread Michael Ellerman
On Tue, 11 Jan 2022 11:54:04 +1100, Alexey Kardashevskiy wrote: > At the moment KVM on PPC creates 4 types of entries under the kvm debugfs: > 1) "%pid-%fd" per a KVM instance (for all platforms); > 2) "vm%pid" (for PPC Book3s HV KVM); > 3) "vm%u_vcpu%u_timing" (for PPC Book3e KVM); > 4) "kvm-xive-

Re: [PATCH v2 00/18] clean up asm/uaccess.h, kill set_fs for good

2022-02-17 Thread Al Viro
On Thu, Feb 17, 2022 at 07:20:11AM +, Christophe Leroy wrote: > And we have also > user_access_begin()/user_read_access_begin()/user_write_access_begin() > which call access_ok() then do the real work. Could be made generic with > call to some arch specific __user_access_begin() and friends

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Masahiro Yamada
On Fri, Feb 18, 2022 at 3:10 AM Segher Boessenkool wrote: > > On Fri, Feb 18, 2022 at 02:27:16AM +0900, Masahiro Yamada wrote: > > On Fri, Feb 18, 2022 at 1:49 AM David Laight > > wrote: > > > That description is largely fine. > > > > > > Inappropriate 'inline' ought to be removed. > > > Then 'i

Re: [PATCH v2 18/18] uaccess: drop maining CONFIG_SET_FS users

2022-02-17 Thread Eric W. Biederman
Arnd Bergmann writes: > From: Arnd Bergmann > > There are no remaining callers of set_fs(), so CONFIG_SET_FS > can be removed globally, along with the thread_info field and > any references to it. > > This turns access_ok() into a cheaper check against TASK_SIZE_MAX. > > With CONFIG_SET_FS gone,

Re: [PATCH 1/3] powerpc/ftrace: Reserve instructions from function entry for ftrace

2022-02-17 Thread kernel test robot
Hi "Naveen, I love your patch! Perhaps something to improve: [auto build test WARNING on 1b43a74f255c5c00db25a5fedfd75ca0dc029022] url: https://github.com/0day-ci/linux/commits/Naveen-N-Rao/powerpc-ftrace-Reserve-instructions-from-function-entry-for-ftrace/20220217-200314

Re: [PATCH v2 13/18] uaccess: generalize access_ok()

2022-02-17 Thread Andy Lutomirski
On Wed, Feb 16, 2022 at 5:19 AM 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 that wor

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Segher Boessenkool
On Fri, Feb 18, 2022 at 02:27:16AM +0900, Masahiro Yamada wrote: > On Fri, Feb 18, 2022 at 1:49 AM David Laight wrote: > > That description is largely fine. > > > > Inappropriate 'inline' ought to be removed. > > Then 'inline' means - 'really do inline this'. > > You cannot change "static inline"

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Masahiro Yamada
On Fri, Feb 18, 2022 at 1:49 AM David Laight wrote: > > From: Masahiro Yamada > > Sent: 17 February 2022 16:17 > ... > > No. Not that one. > > > > The commit you presumably want to revert is: > > > > a771f2b82aa2 ("[PATCH] Add a section about inlining to > > Documentation/CodingStyle") > > > > Th

RE: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread David Laight
From: Masahiro Yamada > Sent: 17 February 2022 16:17 ... > No. Not that one. > > The commit you presumably want to revert is: > > a771f2b82aa2 ("[PATCH] Add a section about inlining to > Documentation/CodingStyle") > > This is now referred to as "__always_inline disease", though. That descript

[PATCH v6 3/4] powerpc/papr_scm: Add perf interface support

2022-02-17 Thread Kajol Jain
Performance monitoring support for papr-scm nvdimm devices via perf interface is added which includes addition of pmu functions like add/del/read/event_init for nvdimm_pmu struture. A new parameter 'priv' in added to the pdev_archdata structure to save nvdimm_pmu device pointer, to handle the unre

[PATCH v6 4/4] docs: ABI: sysfs-bus-nvdimm: Document sysfs event format entries for nvdimm pmu

2022-02-17 Thread Kajol Jain
Details are added for the event, cpumask and format attributes in the ABI documentation. Signed-off-by: Kajol Jain --- Changelog: Resend v5 -> v6 - No logic change, just a rebase to latest upstream. - Link to the patchset Resend v5: https://lkml.org/lkml/2021/11/15/3979 Documentation/ABI/testi

[PATCH v6 2/4] drivers/nvdimm: Add perf interface to expose nvdimm performance stats

2022-02-17 Thread Kajol Jain
A common interface is added to get performance stats reporting support for nvdimm devices. Added interface defines supported event list, config fields for the event attributes and their corresponding bit values which are exported via sysfs. Interface also added support for pmu register/unregister

[PATCH v6 1/4] drivers/nvdimm: Add nvdimm pmu structure

2022-02-17 Thread Kajol Jain
A structure is added called nvdimm_pmu, for performance stats reporting support of nvdimm devices. It can be used to add device pmu data such as pmu data structure for performance stats, nvdimm device pointer along with cpumask attributes. Signed-off-by: Kajol Jain --- Changelog: Resend v5 -> v6

[PATCH v6 0/4] Add perf interface to expose nvdimm

2022-02-17 Thread Kajol Jain
Patchset adds performance stats reporting support for nvdimm. Added interface includes support for pmu register/unregister functions. A structure is added called nvdimm_pmu to be used for adding arch/platform specific data such as cpumask, nvdimm device pointer and pmu event functions like event_in

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Masahiro Yamada
On Fri, Feb 18, 2022 at 12:15 AM David Laight wrote: > > From: Christophe Leroy > > Sent: 17 February 2022 14:55 > > > > Le 17/02/2022 à 15:50, Christophe Leroy a écrit : > > > Adding Ingo, Andrew and Nick as they were involved in the subjet, > > > > > > Le 17/02/2022 à 14:36, David Laight a écrit

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Joe Perches
On Thu, 2022-02-17 at 13:19 +0100, Christophe Leroy wrote: > All functions defined as static inline in net/checksum.h are > meant to be inlined for performance reason. > > But since commit ac7c3e4ff401 ("compiler: enable > CONFIG_OPTIMIZE_INLINING forcibly") the compiler is allowed to > uninline f

RE: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread David Laight
From: Christophe Leroy > Sent: 17 February 2022 14:55 > > Le 17/02/2022 à 15:50, Christophe Leroy a écrit : > > Adding Ingo, Andrew and Nick as they were involved in the subjet, > > > > Le 17/02/2022 à 14:36, David Laight a écrit : > >> From: Christophe Leroy > >>> Sent: 17 February 2022 12:19 > >

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Christophe Leroy
Le 17/02/2022 à 15:50, Christophe Leroy a écrit : Adding Ingo, Andrew and Nick as they were involved in the subjet, Le 17/02/2022 à 14:36, David Laight a écrit : From: Christophe Leroy Sent: 17 February 2022 12:19 All functions defined as static inline in net/checksum.h are meant to be inl

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Christophe Leroy
Adding Ingo, Andrew and Nick as they were involved in the subjet, Le 17/02/2022 à 14:36, David Laight a écrit : > From: Christophe Leroy >> Sent: 17 February 2022 12:19 >> >> All functions defined as static inline in net/checksum.h are >> meant to be inlined for performance reason. >> >> But since

[PATCH net v4] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Christophe Leroy
All functions defined as static inline in net/checksum.h are meant to be inlined for performance reason. But since commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") the compiler is allowed to uninline functions when it wants. Fair enough in the general case, but for tiny

RE: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread David Laight
From: Christophe Leroy > Sent: 17 February 2022 12:19 > > All functions defined as static inline in net/checksum.h are > meant to be inlined for performance reason. > > But since commit ac7c3e4ff401 ("compiler: enable > CONFIG_OPTIMIZE_INLINING forcibly") the compiler is allowed to > uninline fun

[PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Christophe Leroy
All functions defined as static inline in net/checksum.h are meant to be inlined for performance reason. But since commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") the compiler is allowed to uninline functions when it wants. Fair enough in the general case, but for tiny

[PATCH v1 2/4] powerpc/ftrace: Refactor ftrace_{regs_}caller

2022-02-17 Thread Christophe Leroy
ftrace_caller() and frace_regs_caller() have now a lot in common. Refactor them using GAS macros. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/ftrace_mprofile.S | 147 ++-- 1 file changed, 45 insertions(+), 102 deletions(-) diff --git a/arch/powerpc/kernel/trac

[PATCH v1 1/4] powerpc/ftrace: Don't use lmw/stmw in ftrace_regs_caller()

2022-02-17 Thread Christophe Leroy
For the same reason as commit a85c728cb5e1 ("powerpc/32: Don't use lmw/stmw for saving/restoring non volatile regs"), don't use lmw/stmw in ftrace_regs_caller(). Use the same macros for PPC32 and PPC64. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/ftrace_mprofile.S | 10 ++-

[PATCH v1 4/4] powerpc/ftrace: Use STK_GOT in ftrace_mprofile.S

2022-02-17 Thread Christophe Leroy
Instead of open coding offset value 24, use STK_GOT when accessing got register in stack. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/ftrace_mprofile.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/trace/ftrace_mprofile.S b/arch/po

[PATCH v1 3/4] powerpc/ftrace: Regroup PPC64 specific operations in ftrace_mprofile.S

2022-02-17 Thread Christophe Leroy
CONFIG_MPROFILE_KERNEL is only for PPC64 and ftrace_mprofile.o is build on PPC64 only when CONFIG_MPROFILE_KERNEL is defined. Move saving of r0 inside #ifdef PPC64 Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/trace/ftrace_mprofile.S | 7 ++- 1 file changed, 2 insertions(+), 5 del

[PATCH 0/3] powerpc/ftrace: Reserve instructions from function entry for ftrace

2022-02-17 Thread Naveen N. Rao
Previously discussed here: https://lore.kernel.org/20220207102454.41b1d...@gandalf.local.home - Naveen Naveen N. Rao (3): powerpc/ftrace: Reserve instructions from function entry for ftrace bpf/trampoline: Allow ftrace location to differ from trampoline attach address kprobes: Allow pr

[PATCH 3/3] kprobes: Allow probing on any address belonging to ftrace

2022-02-17 Thread Naveen N. Rao
On certain architectures, ftrace can reserve multiple instructions at function entry. Rather than rejecting kprobe on addresses other than the exact ftrace call instruction, use the address returned by ftrace to probe at the correct address when CONFIG_KPROBES_ON_FTRACE is enabled. Signed-off-by:

[PATCH 2/3] bpf/trampoline: Allow ftrace location to differ from trampoline attach address

2022-02-17 Thread Naveen N. Rao
On some architectures, ftrace location can include multiple instructions, and does not necessarily match the function entry address returned by kallsyms_lookup(). Drop the check in is_ftrace_location() to accommodate the same. Signed-off-by: Naveen N. Rao --- kernel/bpf/trampoline.c | 2 -- 1 fi

[PATCH 1/3] powerpc/ftrace: Reserve instructions from function entry for ftrace

2022-02-17 Thread Naveen N. Rao
On some architectures, enabling function tracing results in multiple instructions being emitted at function entry. As an example, on powerpc64 with -mprofile-kernel, two instructions are emitted at function entry: mflrr0 bl _mcount It is desirable to nop out both these ins

[PATCH net v2] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Christophe Leroy
All functions defined as static inline in net/checksum.h are meant to be inlined for performance reason. But since commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") the compiler is allowed to uninline functions when it wants. Fair enough in the general case, but for tiny

[PATCH v3 1/2] crypto: vmx - merge CRYPTO_DEV_VMX_ENCRYPT into CRYPTO_DEV_VMX

2022-02-17 Thread Petr Vorel
CRYPTO_DEV_VMX_ENCRYPT is redundant with CRYPTO_DEV_VMX. And it also forces CRYPTO_GHASH to be builtin even CRYPTO_DEV_VMX_ENCRYPT was configured as module. This requires to change defconfig values to m for backwards compatibility. Signed-off-by: Petr Vorel --- changes v2->v3: * keep CRYPTO_DEV

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

2022-02-17 Thread Petr Vorel
Hi all, changes v2->v3: * keep CRYPTO_DEV_VMX and merge CRYPTO_DEV_VMX_ENCRYPT into it instead of vice versa (suggested by Nicolai). I have no problem to send another version if maintainers want the original approach. * change commit subject to be compatible * remove MAINTAINERS changes Petr

[PATCH v3 2/2] crypto: vmx - add missing dependencies

2022-02-17 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=y && !CRYPTO_MANAGER_DISABLE_TESTS and either of CRYPTO_AES, CRYPTO_CBC, CRYPTO_CTR or CRYPTO_XTS is built as module or disabled, alg_tes

[PATCH v9 2/2] selftest/powerpc: Add PAPR sysfs attributes sniff test

2022-02-17 Thread Pratik R. Sampat
Include a testcase to check if the sysfs files for energy and frequency related have its related attribute files exist and populated Signed-off-by: Pratik R. Sampat --- tools/testing/selftests/powerpc/Makefile | 1 + .../powerpc/papr_attributes/.gitignore| 2 + .../powerpc/papr_

[PATCH v9 1/2] powerpc/pseries: Interface to represent PAPR firmware attributes

2022-02-17 Thread Pratik R. Sampat
Adds a syscall interface to represent the energy and frequency related PAPR attributes on the system using the new H_CALL "H_GET_ENERGY_SCALE_INFO". H_GET_EM_PARMS H_CALL was previously responsible for exporting this information in the lparcfg, however the H_GET_EM_PARMS H_CALL will be deprecated

[PATCH v9 0/2] Interface to represent PAPR firmware attributes

2022-02-17 Thread Pratik R. Sampat
RFC: https://lkml.org/lkml/2021/6/4/791 PATCH v1: https://lkml.org/lkml/2021/6/16/805 PATCH v2: https://lkml.org/lkml/2021/7/6/138 PATCH v3: https://lkml.org/lkml/2021/7/12/2799 PATCH v4: https://lkml.org/lkml/2021/7/16/532 PATCH v5: https://lkml.org/lkml/2021/7/19/247 PATCH v6: https://lkml.org/lk

Re: [PATCH 2/2] powerpc/32: Implement csum_sub

2022-02-17 Thread Christophe Leroy
Le 13/02/2022 à 04:01, David Laight a écrit : > From: Christophe Leroy >> Sent: 11 February 2022 10:25 >> >> When building kernel with CONFIG_CC_OPTIMISE_FOR_SIZE, several >> copies of csum_sub() are generated, with the following code: >> >> 0170 : >> 170: 7c 84 20 f8

[PATCH] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Christophe Leroy
All functions defined as static inline in net/checksum.h are meant to be inlined for performance reason. But since commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") the compiler is allowed to uninline functions when it wants. Fair enough in the general case, but for tiny

Re: [PATCH v2 00/18] clean up asm/uaccess.h, kill set_fs for good

2022-02-17 Thread Arnd Bergmann
On Wed, Feb 16, 2022 at 2:13 PM Arnd Bergmann wrote: > > From: Arnd Bergmann > > Christoph Hellwig and a few others spent a huge effort on removing > set_fs() from most of the important architectures, but about half the > other architectures were never completed even though most of them don't > a

[PATCH v3 2/2] selftest/vm: add helpers to detect PAGE_SIZE and PAGE_SHIFT

2022-02-17 Thread Aneesh Kumar K.V
From: Mike Rapoport PAGE_SIZE is not 4096 in many configurations, particularily ppc64 uses 64K pages in majority of cases. Add helpers to detect PAGE_SIZE and PAGE_SHIFT dynamically. Without this tests are broken w.r.t reading /proc/self/pagemap if (pread(pagemap_fd, ent, sizeof(ent),

Re: [PATCH v2 13/18] uaccess: generalize access_ok()

2022-02-17 Thread Arnd Bergmann
On Wed, Feb 16, 2022 at 2:13 PM Arnd Bergmann wrote: > + * limit and catch all possible overflows. > + * On architectures with separate user address space (m68k, s390, parisc, > + * sparc64) or those without an MMU, this should always return true. ... > +static inline int __access_ok(const void _

[PATCH v3 1/2] selftest/vm: Add util.h and and move helper functions there

2022-02-17 Thread Aneesh Kumar K.V
Avoid code duplication by adding util.h. No functional change in this patch. Cc: Shuah Khan Cc: linux-kselft...@vger.kernel.org Signed-off-by: Aneesh Kumar K.V --- tools/testing/selftests/vm/ksm_tests.c| 38 +-- tools/testing/selftests/vm/transhuge-stress.c | 42 ++--

[PATCH] selftest/vm: Fix map_fixed_noreplace test failure

2022-02-17 Thread Aneesh Kumar K.V
On the latest RHEL the test fails due to executable mapped at 256MB address # ./map_fixed_noreplace mmap() @ 0x1000-0x1005 p=0x result=File exists 1000-1001 r-xp fd:04 34905657 /root/rpmbuild/BUILD/kernel-5.14.0-56.el9/linux-5.14