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
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 ++--
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 _
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),
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
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
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
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
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
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_
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
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
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
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
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
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
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:
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
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
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
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 ++-
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
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
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
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
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
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
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
> >
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
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
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
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
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
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
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
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
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
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"
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
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
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,
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
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
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-
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
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
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
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
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
-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
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
Looks good:
Reviewed-by: 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
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
Looks good,
Reviewed-by: 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
Looks good:
Reviewed-by: Christoph Hellwig
Looks good,
Reviewed-by: Christoph Hellwig
Looks good,
Reviewed-by: Christoph Hellwig
> +#include
Instead of the asm-generic games, shouldn't we just define access_ok in
if not already defined by the architecture?
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
Looks good:
Reviewed-by: 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.
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
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().
>
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
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
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_
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
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
70 matches
Mail list logo