Re: [next-20230705] kernel BUG mm/memcontrol.c:3715! (ltp/madvise06)

2023-07-06 Thread Thomas Weißschuh
On 2023-07-06 11:41:38+0530, Sachin Sant wrote: > While running LTP tests (madvise06) on IBM Power9 LPAR booted with > 6.4.0-next-20230705 following crash is seen > > Injecting memory failure for pfn 0x3f79 at process virtual address > 0x7fff9b74 > Memory failure: 0x3f79: recovery action for

[PATCH 10/11] sysctl: constify ctl_table arguments of utility function

2024-03-15 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- include/linux/sysctl.h | 2 +- kernel/sysctl.c| 21 +++-- 2 files changed, 12

[PATCH 09/11] ipvs: constify ctl_table arguments of utility functions

2024-03-15 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- net/netfilter/ipvs/ip_vs_ctl.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff -

[PATCH 05/11] neighbour: constify ctl_table arguments of utility function

2024-03-15 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/neighbo

[PATCH 04/11] utsname: constify ctl_table arguments of utility function

2024-03-15 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- kernel/utsname_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/utsname_

[PATCH 08/11] ipv6/ndisc: constify ctl_table arguments of utility function

2024-03-15 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- net/ipv6/ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ndisc.c

[PATCH 03/11] hugetlb: constify ctl_table arguments of utility functions

2024-03-15 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- mm/hugetlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hugetlb.c b/mm

[PATCH 06/11] ipv4/sysctl: constify ctl_table arguments of utility functions

2024-03-15 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- net/ipv4/sysctl_net_ipv4.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 07/11] ipv6/addrconf: constify ctl_table arguments of utility functions

2024-03-15 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- net/ipv6/addrconf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/ipv6/

[PATCH 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers

2024-03-15 Thread Thomas Weißschuh
but is an important step to be able to move all static definitions of ctl_table into .rodata. [0] https://lore.kernel.org/lkml/20231204-const-sysctl-v2-0-7a5060b11...@weissschuh.net/ Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (11): stackleak: don't modify ctl_table argument

[PATCH 01/11] stackleak: don't modify ctl_table argument

2024-03-15 Thread Thomas Weißschuh
stack erasing") Acked-by: Kees Cook Signed-off-by: Thomas Weißschuh --- kernel/stackleak.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/stackleak.c b/kernel/stackleak.c index 34c9d81eea94..b292e5ca0b7d 100644 --- a/kernel/stackleak.c +++ b/kernel/stacklea

[PATCH 02/11] cgroup: bpf: constify ctl_table arguments and fields

2024-03-15 Thread Thomas Weißschuh
In a future commit the sysctl core will only use "const struct ctl_table". As a preparation for that adapt the cgroup-bpf code. Signed-off-by: Thomas Weißschuh --- include/linux/filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/filter.h b/inc

[PATCH 11/11] sysctl: treewide: constify the ctl_table argument of handlers

2024-03-15 Thread Thomas Weißschuh
-consistency reasons Signed-off-by: Thomas Weißschuh --- arch/arm64/kernel/armv8_deprecated.c | 2 +- arch/arm64/kernel/fpsimd.c| 2 +- arch/s390/appldata/appldata_base.c| 10 ++-- arch/s390/kernel/debug.c | 2 +- arch/s390/kernel/topology.c

[PATCH v3 03/11] hugetlb: constify ctl_table arguments of utility functions

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- mm/hugetlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hugetlb.c b/mm

[PATCH v3 05/11] neighbour: constify ctl_table arguments of utility function

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/neighbo

[PATCH v3 04/11] utsname: constify ctl_table arguments of utility function

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- kernel/utsname_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/utsname_

[PATCH v3 11/11] sysctl: treewide: constify the ctl_table argument of handlers

2024-04-23 Thread Thomas Weißschuh
-consistency reasons Signed-off-by: Thomas Weißschuh --- arch/arm64/kernel/armv8_deprecated.c | 2 +- arch/arm64/kernel/fpsimd.c| 2 +- arch/s390/appldata/appldata_base.c| 10 ++--- arch/s390/kernel/debug.c | 2 +- arch/s390/kernel/topology.c

[PATCH v3 09/11] ipvs: constify ctl_table arguments of utility functions

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- net/netfilter/ipvs/ip_vs_ctl.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff -

[PATCH v3 06/11] ipv4/sysctl: constify ctl_table arguments of utility functions

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- net/ipv4/sysctl_net_ipv4.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v3 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers

2024-04-23 Thread Thomas Weißschuh
but is an important step to be able to move all static definitions of ctl_table into .rodata. [0] https://lore.kernel.org/lkml/20231204-const-sysctl-v2-0-7a5060b11...@weissschuh.net/ Signed-off-by: Thomas Weißschuh --- Changes in v3: - Rebase on current -next - Cc affected mailing lists again

[PATCH v3 07/11] ipv6/addrconf: constify ctl_table arguments of utility functions

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- net/ipv6/addrconf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/ipv6/

[PATCH v3 08/11] ipv6/ndisc: constify ctl_table arguments of utility function

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- net/ipv6/ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ndisc.c

[PATCH v3 10/11] sysctl: constify ctl_table arguments of utility function

2024-04-23 Thread Thomas Weißschuh
In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helper. Signed-off-by: Thomas Weißschuh --- include/linux/sysctl.h | 2 +- kernel/sysctl.c| 21 +++-- 2 files changed, 12

[PATCH v3 02/11] cgroup: bpf: constify ctl_table arguments and fields

2024-04-23 Thread Thomas Weißschuh
In a future commit the sysctl core will only use "const struct ctl_table". As a preparation for that adapt the cgroup-bpf code. Signed-off-by: Thomas Weißschuh --- include/linux/filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/filter.h b/inc

[PATCH v3 01/11] stackleak: don't modify ctl_table argument

2024-04-23 Thread Thomas Weißschuh
stack erasing") Acked-by: Kees Cook Signed-off-by: Thomas Weißschuh --- kernel/stackleak.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/stackleak.c b/kernel/stackleak.c index d099f3affcf1..558b9d6d28d3 100644 --- a/kernel/stackleak.c +++ b/kernel/stacklea

Re: [PATCH v3 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers

2024-04-25 Thread Thomas Weißschuh
On 2024-04-24 20:12:34+, Jakub Kicinski wrote: > On Tue, 23 Apr 2024 09:54:35 +0200 Thomas Weißschuh wrote: > > The series was split from my larger series sysctl-const series [0]. > > It only focusses on the proc_handlers but is an important step to be > > able to move a

Re: [PATCH v3 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers

2024-04-25 Thread Thomas Weißschuh
Hi Joel, On 2024-04-25 13:04:12+, Joel Granados wrote: > On Wed, Apr 24, 2024 at 08:12:34PM -0700, Jakub Kicinski wrote: > > On Tue, 23 Apr 2024 09:54:35 +0200 Thomas Weißschuh wrote: > > > The series was split from my larger series sysctl-const series [0]. > > &

Re: [PATCH v3 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers

2024-04-27 Thread Thomas Weißschuh
On 2024-04-25 09:10:27+, Thomas Weißschuh wrote: > On 2024-04-24 20:12:34+, Jakub Kicinski wrote: > > On Tue, 23 Apr 2024 09:54:35 +0200 Thomas Weißschuh wrote: > > > The series was split from my larger series sysctl-const series [0]. > > > It only focusses on

Re: [PATCH v3 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers

2024-05-03 Thread Thomas Weißschuh
Hey Joel, On 2024-05-03 11:03:32+, Joel Granados wrote: > Here is my feedback for your outstanding constification patches [1] and [2]. Thanks! > # You need to split the patch > The answer that you got from Jakub in the network subsystem is very clear and > baring a change of heart from the n

Re: [PATCH v3 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers

2024-05-11 Thread Thomas Weißschuh
Hi Kees, On 2024-05-08 10:11:35+, Kees Cook wrote: > On Wed, Apr 24, 2024 at 08:12:34PM -0700, Jakub Kicinski wrote: > > On Tue, 23 Apr 2024 09:54:35 +0200 Thomas Weißschuh wrote: > > > The series was split from my larger series sysctl-const series [0]. > > &

[PATCH] macintosh/mac_hid.c: don't load by default

2022-11-13 Thread Thomas Weißschuh
utton emulation - implement as an input filter") Signed-off-by: Thomas Weißschuh --- drivers/macintosh/mac_hid.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index d8c4d5664145..d01d28890db4 100644 --- a/drivers/macintosh/mac_h

Re: [PATCH] macintosh/mac_hid.c: don't load by default

2022-11-14 Thread Thomas Weißschuh
Cc Franz who wrote the driver originally. (I hope I got the correct one) Hi Dmitry, On 2022-11-14 10:33-0800, Dmitry Torokhov wrote: > On Sun, Nov 13, 2022 at 04:30:22AM +0100, Thomas Weißschuh wrote: >> There should be no need to automatically load this driver on *all* >>

Re: [PATCH] macintosh/mac_hid.c: don't load by default

2022-11-14 Thread Thomas Weißschuh
On 2022-11-14 16:16-0800, Dmitry Torokhov wrote: > On Tue, Nov 15, 2022 at 12:54:41AM +0100, Thomas Weißschuh wrote: >> Cc Franz who wrote the driver originally. >> (I hope I got the correct one) >> >> Hi Dmitry, >> >> On 2022-11-14 10:33-0800, Dmitry Toro

[PATCH 3/3] init/version.c: remove #include

2022-11-25 Thread Thomas Weißschuh
version.c can be dropped. Fixes: 2df8220cc511 ("kbuild: build init/built-in.a just once") Signed-off-by: Thomas Weißschuh --- init/version.c | 1 - 1 file changed, 1 deletion(-) diff --git a/init/version.c b/init/version.c index 01d4ab05f0ba..f117921811b4 100644 --- a/init/version.c

[PATCH 2/3] powerpc/book3e: remove #include

2022-11-25 Thread Thomas Weißschuh
Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include ") removed the usage of the define UTS_VERSION but forgot to drop the include. Fixes: 7ad4bd887d27 ("powerpc/book3e: get rid of #include ") Signed-off-by: Thomas Weißschuh --- arch/powerpc/mm/nohash/kaslr_booke.c |

[PATCH 1/3] firmware_loader: remove #include

2022-11-25 Thread Thomas Weißschuh
utsrelease.h is potentially generated on each build. By removing this unused include we can get rid of some spurious recompilations. Signed-off-by: Thomas Weißschuh --- drivers/base/firmware_loader/firmware.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/base/firmware_loader

Re: [PATCH 2/3] powerpc/book3e: remove #include

2022-11-26 Thread Thomas Weißschuh
On 2022-11-26 07:36+, Christophe Leroy wrote: > Le 26/11/2022 à 06:10, Thomas Weißschuh a écrit : >> Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include >> ") >> removed the usage of the define UTS_VERSION but forgot to drop the >> include. > >

[PATCH 01/28] csky/vdso: Remove gettimeofday() and friends from VDSO

2024-10-10 Thread Thomas Weißschuh
AT_SYSINFO_EHDR was never wired up, making these functions impossible to test or use. The VDSO itself is kept as it also provides rt_sigreturn which is exposed differently to userspace. Signed-off-by: Thomas Weißschuh --- arch/csky/Kconfig | 4 -- arch/csky/include/as

[PATCH 00/28] vdso: Preparations for generic data storage

2024-10-10 Thread Thomas Weißschuh
unified base. The queue, including the full generic storage, is available at git://git.kernel.org/pub/scm/linux/kernel/git/thomas.weissschuh/linux.git vdso/store Signed-off-by: Thomas Weißschuh --- Nam Cao (1): vdso: Rename struct arch_vdso_data to arch_vdso_time_data Thomas Weißschuh (27

[PATCH 02/28] csky/vdso: Remove arch_vma_name()

2024-10-10 Thread Thomas Weißschuh
All callers of arch_vma_name() also get the name via vm_ops, which for these VMAs will use the name from 'struct vma_special_mapping'. Therefore the custom implementation is unnecessary and can be removed in favor of the default implementation from kernel/signal.c. Signed-off-by: Thomas

[PATCH 09/28] MIPS: vdso: Avoid name conflict around "vdso_data"

2024-10-10 Thread Thomas Weißschuh
The generic vdso/datapage.h declares a symbol named "vdso_data". Avoid a conflict by renaming the identically named variable in genvdso.c. Signed-off-by: Thomas Weißschuh --- arch/mips/vdso/genvdso.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH 03/28] s390/vdso: Drop LBASE_VDSO

2024-10-10 Thread Thomas Weißschuh
This constant is always "0", providing no value and making the logic harder to understand. Also prepare for a consolidation of the vdso linkerscript logic by aligning it with other architectures. Signed-off-by: Thomas Weißschuh --- arch/s390/include/asm/vdso.h | 3 --- arch/s

[PATCH 04/28] arm64: vdso: Drop LBASE_VDSO

2024-10-10 Thread Thomas Weißschuh
This constant is always "0", providing no value and making the logic harder to understand. Also prepare for a consolidation of the vdso linkerscript logic by aligning it with other architectures. Signed-off-by: Thomas Weißschuh --- arch/arm64/include/asm/vdso.h | 9 +

[PATCH 05/28] arm64: vdso: Use only one single vvar mapping

2024-10-10 Thread Thomas Weißschuh
The vvar mapping is the same for all processes. Use a single mapping to simplify the logic and align it with the other architectures. In addition this will enable the move of the vvar handling into generic code. Signed-off-by: Thomas Weißschuh --- arch/arm64/kernel/vdso.c | 43

[PATCH 10/28] x86/mm/mmap: Remove arch_vma_name()

2024-10-10 Thread Thomas Weißschuh
This function does not contain any logic, delete it so the equivalent weak definition from kernel/signal.c is used instead. Signed-off-by: Thomas Weißschuh --- arch/x86/mm/mmap.c | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c index

[PATCH 06/28] riscv: vdso: Use only one single vvar mapping

2024-10-10 Thread Thomas Weißschuh
The vvar mapping is the same for all processes. Use a single mapping to simplify the logic and align it with the other architectures. In addition this will enable the move of the vvar handling into generic code. Signed-off-by: Thomas Weißschuh --- arch/riscv/kernel/vdso.c | 52

[PATCH 08/28] LoongArch: vDSO: Use vdso/datapage.h to access vDSO data

2024-10-10 Thread Thomas Weißschuh
vdso/datapage.h provides symbols and functions to ease the access to shared vDSO data from both the kernel and the vDSO. Make use of it to simplify the current code and also prepare for further changes unifying the vDSO data storage between architectures. Signed-off-by: Thomas Weißschuh

[PATCH 20/28] x86: vdso: Split virtual clock pages into dedicated mapping

2024-10-10 Thread Thomas Weißschuh
The generic vdso data storage can not handle the special pvclock and hvclock pages. Split them into their own mapping, so the other vdso storage can be migrated to the generic code. Signed-off-by: Thomas Weißschuh --- arch/x86/entry/vdso/vdso-layout.lds.S | 10 +++-- arch/x86/entry/vdso/vma.c

[PATCH 11/28] x86: vdso: Use __arch_get_vdso_data() to access vdso data

2024-10-10 Thread Thomas Weißschuh
The implementation details of the vdso_data access will change. Prepare for that by using the existing helper function. Signed-off-by: Thomas Weißschuh --- arch/x86/include/asm/vdso/getrandom.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/vdso

[PATCH 12/28] x86: vdso: Place vdso_data at beginning of vvar page

2024-10-10 Thread Thomas Weißschuh
ata to the beginning of the vvar page aligns x86 with other architectures and opens up the way for the removal of the custom x86 vvar machinery. Signed-off-by: Thomas Weißschuh --- arch/x86/include/asm/vvar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/vva

[PATCH 19/28] x86: vdso: Delete vvar.h

2024-10-10 Thread Thomas Weißschuh
All users have been removed. Signed-off-by: Thomas Weißschuh --- arch/x86/include/asm/vvar.h | 66 - 1 file changed, 66 deletions(-) diff --git a/arch/x86/include/asm/vvar.h b/arch/x86/include/asm/vvar.h deleted file mode 100644 index

[PATCH 07/28] arm: vdso: Remove assembly for datapage access

2024-10-10 Thread Thomas Weißschuh
vdso/datapage.h provides a hidden declaration for _vdso_data. When using it the compiler will automatically generate PC-relative accesses which avoids the need for a custom assembly-based accessor. Signed-off-by: Thomas Weißschuh --- arch/arm/include/asm/vdso/gettimeofday.h | 4 +--- arch/arm

[PATCH 18/28] x86: vdso: Access vdso data without vvar.h

2024-10-10 Thread Thomas Weißschuh
The vdso_data is at the start of the vvar page. Make use of this invariant to remove the usage of vvar.h. This also matches the logic for the timens data. Signed-off-by: Thomas Weißschuh --- arch/x86/entry/vdso/vdso-layout.lds.S| 5 - arch/x86/include/asm/vdso/gettimeofday.h | 6

[PATCH 13/28] x86: vdso: Access rng data from kernel without vvar

2024-10-10 Thread Thomas Weißschuh
soon. DEFINE_VVAR_SINGLE() is now unused. It will be removed later togehter with the rest of vvar.h. Signed-off-by: Thomas Weißschuh --- arch/x86/entry/vdso/vma.c| 1 - arch/x86/include/asm/vdso/vsyscall.h | 2 +- arch/x86/include/asm/vvar.h | 4 +++- 3 files changed, 4

[PATCH 17/28] x86: vdso: Move the rng offset to vsyscall.h

2024-10-10 Thread Thomas Weißschuh
vvar.h will go away, so move the last useful bit into vsyscall.h. Signed-off-by: Thomas Weißschuh --- arch/x86/entry/vdso/vdso-layout.lds.S | 1 + arch/x86/include/asm/vdso/vsyscall.h | 3 ++- arch/x86/include/asm/vvar.h | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 24/28] powerpc/pseries/lparcfg: Use num_possible_cpus() for potential processors

2024-10-10 Thread Thomas Weißschuh
unt to the better matching num_possible_cpus(). Signed-off-by: Thomas Weißschuh --- arch/powerpc/platforms/pseries/lparcfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/pseries/lparcfg.c b/arch/powerpc/platforms/pseries/lparc

[PATCH 21/28] powerpc: vdso: Remove offset comment from 32bit vdso_arch_data

2024-10-10 Thread Thomas Weißschuh
This offset was copy-pasted from the systemcfg structure. It has no meaning for the 32bit VDSO. Signed-off-by: Thomas Weißschuh --- arch/powerpc/include/asm/vdso_datapage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch

[PATCH 28/28] vdso: Rename struct arch_vdso_data to arch_vdso_time_data

2024-10-10 Thread Thomas Weißschuh
From: Nam Cao The struct arch_vdso_data is only about vdso time data. So rename it to arch_vdso_time_data to make it obvious. Non time-related data will be migrated out of these structs soon. Signed-off-by: Nam Cao --- arch/Kconfig| 2 +- arch/riscv/Kco

[PATCH 23/28] powerpc/pseries/lparcfg: Fix printing of system_active_processors

2024-10-10 Thread Thomas Weißschuh
When printing the information "system_active_processors", the variable partition_potential_processors is used instead of partition_active_processors. The wrong value is displayed. Use partition_active_processors instead. Signed-off-by: Thomas Weißschuh --- arch/powerpc/platfor

[PATCH 26/28] powerpc: Split systemcfg data out of vdso data page

2024-10-10 Thread Thomas Weißschuh
tb_ticks_per_sec and it is only changed once during time_init(). Initialize it in both structures there. Signed-off-by: Thomas Weißschuh --- arch/powerpc/include/asm/vdso_datapage.h | 32 ++-- arch/powerpc/kernel/proc_powerpc.c | 25 +- arch

[PATCH 22/28] powerpc: procfs: Propagate error of remap_pfn_range()

2024-10-10 Thread Thomas Weißschuh
If the operation fails and userspace is unaware it will access unmapped memory, crashing the process. Signed-off-by: Thomas Weißschuh --- arch/powerpc/kernel/proc_powerpc.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/proc_powerpc.c b/arch

[PATCH 27/28] powerpc: Split systemcfg struct definitions out from vdso

2024-10-10 Thread Thomas Weißschuh
The systemcfg data has nothing to do anymore with the vdso. Split it into a dedicated header file. Signed-off-by: Thomas Weißschuh --- arch/powerpc/include/asm/systemcfg.h | 52 arch/powerpc/include/asm/vdso_datapage.h | 37 arch

[PATCH 14/28] x86: vdso: Allocate vvar page from C code

2024-10-10 Thread Thomas Weißschuh
Allocate the vvar page through the standard union vdso_data_store and remove the custom linker script logic. Signed-off-by: Thomas Weißschuh --- arch/x86/entry/vdso/vma.c| 16 +--- arch/x86/include/asm/vdso/vsyscall.h | 6 -- arch/x86/kernel/vmlinux.lds.S

[PATCH 16/28] x86: vdso: Access rng vdso data without vvar.h

2024-10-10 Thread Thomas Weißschuh
The vdso_rng_data is at a well-known offset in the vvar page. Make use of this invariant to remove the usage of vvar.h. Signed-off-by: Thomas Weißschuh --- arch/x86/entry/vdso/vdso-layout.lds.S | 2 ++ arch/x86/include/asm/vdso/getrandom.h | 8 arch/x86/include/asm/vvar.h | 5

[PATCH 15/28] x86: vdso: Access timens vdso data without vvar.h

2024-10-10 Thread Thomas Weißschuh
The vdso_data is at the start of the timens page. Make use of this invariant to remove the usage of vvar.h. This also matches the logic for the pvclock and hvclock pages. Signed-off-by: Thomas Weißschuh --- arch/x86/entry/vdso/vdso-layout.lds.S| 6 -- arch/x86/include/asm/vdso

[PATCH 25/28] powerpc: Add kconfig option for the systemcfg page

2024-10-10 Thread Thomas Weißschuh
The systemcfg page through procfs is only a backwards-compatible interface for very old applications. Make it possible to be disabled. This also creates a convenient config #define to guard any accesses to the systemcfg page. Signed-off-by: Thomas Weißschuh --- arch/powerpc/Kconfig

Re: [PATCH 1/2] powerpc/vdso: Add a page for non-time data

2024-10-02 Thread Thomas Weißschuh
Hi Christophe, On Wed, Oct 02, 2024 at 10:39:28AM GMT, Christophe Leroy wrote: > The page containing VDSO time data is swapped with the one containing > TIME namespace data when a process uses a non-root time namespace. > For other data like powerpc specific data and RNG data, it means > tracking

Re: [PATCH 1/2] powerpc/vdso: Add a page for non-time data

2024-10-02 Thread Thomas Weißschuh
Hi Christophe, On Wed, Oct 02, 2024 at 12:10:08PM GMT, Christophe Leroy wrote: > Le 02/10/2024 à 10:54, Thomas Weißschuh a écrit : > > On Wed, Oct 02, 2024 at 10:39:28AM GMT, Christophe Leroy wrote: > > > The page containing VDSO time data is swapped with the one containing &g

Re: [PATCH 2/2] powerpc/vdso: Implement __arch_get_vdso_rng_data()

2024-10-10 Thread Thomas Weißschuh
On Thu, Oct 10, 2024 at 11:00:15AM +0200, Christophe Leroy wrote: > Hi Thomas, > > Le 10/10/2024 à 10:20, Thomas Weißschuh a écrit : > > On Wed, Oct 02, 2024 at 10:39:29AM +0200, Christophe Leroy wrote: > > > VDSO time functions do not call any other function, so they

Re: [PATCH 2/2] powerpc/vdso: Implement __arch_get_vdso_rng_data()

2024-10-10 Thread Thomas Weißschuh
On Wed, Oct 02, 2024 at 10:39:29AM +0200, Christophe Leroy wrote: > VDSO time functions do not call any other function, so they don't > need to save/restore LR. However, retrieving the address of VDSO data > page requires using LR hence saving then restoring it, which can be > heavy on some CPUs. O

[PATCH 2/9] arm: vdso: Remove timekeeper includes

2024-10-10 Thread Thomas Weißschuh
Since the generic VDSO clock mode storage is used, this header file is unused and can be removed. This avoids including a non-VDSO header while building the VDSO, which can lead to compilation errors. Also drop the comment which is out of date and in the wrong place. Signed-off-by: Thomas

[PATCH 5/9] riscv: vdso: Remove timekeeper include

2024-10-10 Thread Thomas Weißschuh
Since the generic VDSO clock mode storage is used, this header file is unused and can be removed. This avoids including a non-VDSO header while building the VDSO, which can lead to compilation errors. Also drop the comment which is out of date and in the wrong place. Signed-off-by: Thomas

[PATCH 0/9] vdso: Remove timekeeper argument and includes

2024-10-10 Thread Thomas Weißschuh
. Remove all of them. These patches are intended to be merged via the tip tree, so following patches can be based on a unified base. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (9): vdso: Remove timekeeper argument of __arch_update_vsyscall() arm: vdso: Remove timekeeper

[PATCH 1/9] vdso: Remove timekeeper argument of __arch_update_vsyscall()

2024-10-10 Thread Thomas Weißschuh
No implementation of this hook uses the passed in timekeeper anymore. This avoids including a non-VDSO header while building the VDSO, which can lead to compilation errors. Signed-off-by: Thomas Weißschuh --- arch/arm64/include/asm/vdso/vsyscall.h | 3 +-- include/asm-generic/vdso/vsyscall.h

[PATCH 8/9] LoongArch: vdso: Remove timekeeper includes

2024-10-10 Thread Thomas Weißschuh
Since the generic VDSO clock mode storage is used, this header file is unused and can be removed. This avoids including a non-VDSO header while building the VDSO, which can lead to compilation errors. Also drop the comment which is out of date and in the wrong place. Signed-off-by: Thomas

[PATCH 6/9] s390/vdso: Remove timekeeper includes

2024-10-10 Thread Thomas Weißschuh
Since the generic VDSO clock mode storage is used, this header file is unused and can be removed. This avoids including a non-VDSO header while building the VDSO, which can lead to compilation errors. Also drop the comment which is out of date and in the wrong place. Signed-off-by: Thomas

[PATCH 7/9] x86/vdso: Remove timekeeper include

2024-10-10 Thread Thomas Weißschuh
Since the generic VDSO clock mode storage is used, this header file is unused and can be removed. This avoids including a non-VDSO header while building the VDSO, which can lead to compilation errors. Signed-off-by: Thomas Weißschuh --- arch/x86/include/asm/vdso/vsyscall.h | 1 - 1 file

[PATCH 9/9] MIPS: vdso: Remove timekeeper includes

2024-10-10 Thread Thomas Weißschuh
Since the generic VDSO clock mode storage is used, this header file is unused and can be removed. This avoids including a non-VDSO header while building the VDSO, which can lead to compilation errors. Signed-off-by: Thomas Weißschuh --- arch/mips/include/asm/vdso/vsyscall.h | 1 - arch/mips

[PATCH 4/9] powerpc/vdso: Remove timekeeper includes

2024-10-10 Thread Thomas Weißschuh
Since the generic VDSO clock mode storage is used, this header file is unused and can be removed. This avoids including a non-VDSO header while building the VDSO, which can lead to compilation errors. Also drop the comment which is out of date and in the wrong place. Signed-off-by: Thomas

[PATCH 3/9] arm64: vdso: Remove timekeeper include

2024-10-10 Thread Thomas Weißschuh
Since the generic VDSO clock mode storage is used, this header file is unused and can be removed. Signed-off-by: Thomas Weißschuh --- arch/arm64/kernel/vdso.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index

[PATCH v2 00/10] sysfs: constify struct bin_attribute (Part 1)

2024-11-03 Thread Thomas Weißschuh
ibutes. This series is intended to be merged through the driver core tree. Signed-off-by: Thomas Weißschuh --- Changes in v2: - Drop RFC state - Refuse registration of attributes with both read/read_new or write/write_new - Remove don't drop llseek() callback, as it is actually used. I

[PATCH v2 08/10] sysfs: implement all BIN_ATTR_* macros in terms of __BIN_ATTR()

2024-11-03 Thread Thomas Weißschuh
The preparations for the upcoming constification of struct bin_attribute requires some logic in the structure definition macros. To avoid duplication of that logic in multiple macros, reimplement all other macros in terms of __BIN_ATTR(). Signed-off-by: Thomas Weißschuh --- include/linux

[PATCH v2 05/10] sysfs: treewide: constify attribute callback of bin_is_visible()

2024-11-03 Thread Thomas Weißschuh
The is_bin_visible() callbacks should not modify the struct bin_attribute passed as argument. Enforce this by marking the argument as const. As there are not many callback implementers perform this change throughout the tree at once. Signed-off-by: Thomas Weißschuh --- drivers/cxl/port.c

[PATCH v2 09/10] sysfs: bin_attribute: add const read/write callback variants

2024-11-03 Thread Thomas Weißschuh
churn during the transition. As soon as all handlers are switch to the const variant, the non-const one can be removed together with the transition machinery. Signed-off-by: Thomas Weißschuh --- fs/sysfs/file.c | 22 +- include/linux/sysfs.h | 25 +++-- 2

[PATCH v2 01/10] sysfs: explicitly pass size to sysfs_add_bin_file_mode_ns()

2024-11-03 Thread Thomas Weißschuh
Upcoming changes to the sysfs core require the size of the created file to be overridable by the caller. Add a parameter to enable this. For now keep using attr->size in all cases. Signed-off-by: Thomas Weißschuh --- fs/sysfs/file.c | 8 fs/sysfs/group.c | 3 ++- fs/sysfs/sysfs.h

[PATCH v2 06/10] sysfs: treewide: constify attribute callback of bin_attribute::mmap()

2024-11-03 Thread Thomas Weißschuh
The mmap() callbacks should not modify the struct bin_attribute passed as argument. Enforce this by marking the argument as const. As there are not many callback implementers perform this change throughout the tree at once. Signed-off-by: Thomas Weißschuh --- arch/alpha/kernel/pci-sysfs.c

[PATCH v2 03/10] PCI/sysfs: Calculate bin_attribute size through bin_size()

2024-11-03 Thread Thomas Weißschuh
Stop abusing the is_bin_visible() callback to calculate the attribute size. Instead use the new, dedicated bin_size() one. Signed-off-by: Thomas Weißschuh --- drivers/pci/pci-sysfs.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/pci

[PATCH v2 10/10] driver core: Constify attribute arguments of binary attributes

2024-11-03 Thread Thomas Weißschuh
As preparation for the constification of struct bin_attribute, constify the arguments of the read and write callbacks. Signed-off-by: Thomas Weißschuh --- drivers/base/node.c | 4 ++-- drivers/base/topology.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH v2 02/10] sysfs: introduce callback attribute_group::bin_size

2024-11-03 Thread Thomas Weißschuh
ize field. * It prevents the structure to be moved to read-only memory. Introduce a new dedicated callback to calculate the size of the attribute. Signed-off-by: Thomas Weißschuh --- fs/sysfs/group.c | 2 ++ include/linux/sysfs.h | 8 2 files changed, 10 insertions(+) diff --git a

[PATCH v2 07/10] sysfs: treewide: constify attribute callback of bin_attribute::llseek()

2024-11-03 Thread Thomas Weißschuh
The llseek() callbacks should not modify the struct bin_attribute passed as argument. Enforce this by marking the argument as const. As there are not many callback implementers perform this change throughout the tree at once. Signed-off-by: Thomas Weißschuh --- drivers/pci/pci-sysfs.c | 2

[PATCH v2 04/10] nvmem: core: calculate bin_attribute size through bin_size()

2024-11-03 Thread Thomas Weißschuh
Stop abusing the is_bin_visible() callback to calculate the attribute size. Instead use the new, dedicated bin_size() one. Signed-off-by: Thomas Weißschuh --- drivers/nvmem/core.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/nvmem/core.c b/drivers

[PATCH] powerpc/vdso: Remove unused clockmode asm offsets

2024-11-13 Thread Thomas Weißschuh
These offsets are not used anymore, delete them. Fixes: c39b1dcf055d ("powerpc/vdso: Add a page for non-time data") Signed-off-by: Thomas Weißschuh --- This is based on powerpc/topic/vdso. Feel free to fold this change into the original commit. --- arch/powerpc/kernel/asm-offsets.c

Re: [PATCH] powerpc/vdso: Remove unused clockmode asm offsets

2024-11-19 Thread Thomas Weißschuh
On Tue, Nov 19, 2024 at 02:26:22PM +1100, Michael Ellerman wrote: > Thomas Weißschuh writes: > > Hi Michael, > > > > On Sun, Nov 17, 2024 at 11:09:57PM +1100, Michael Ellerman wrote: > >> On Wed, 13 Nov 2024 09:06:58 +0100, Thomas Weißschuh wrote: > >> >

Re: [PATCH] powerpc/vdso: Remove unused clockmode asm offsets

2024-11-17 Thread Thomas Weißschuh
Hi Michael, On Sun, Nov 17, 2024 at 11:09:57PM +1100, Michael Ellerman wrote: > On Wed, 13 Nov 2024 09:06:58 +0100, Thomas Weißschuh wrote: > > These offsets are not used anymore, delete them. > > > > > > Applied to powerpc/next. > > [1/1] powerpc/vdso: Re

[PATCH 5/5] scsi: arcmsr: Use BIN_ATTR_ADMIN_WO() for bin_attribute definitions

2024-12-02 Thread Thomas Weißschuh
Using the macro saves some lines of code and prepares the attributes for the general constifications of struct bin_attributes. While at it also constify the callback parameters. Signed-off-by: Thomas Weißschuh --- drivers/scsi/arcmsr/arcmsr_attr.c | 73

[PATCH 3/5] powerpc/powernv/flash: Use BIN_ATTR_ADMIN_WO() for bin_attribute definition

2024-12-02 Thread Thomas Weißschuh
Using the macro saves some lines of code and prepares the attribute for the general constifications of struct bin_attributes. While at it also constify the callback parameter. Signed-off-by: Thomas Weißschuh --- arch/powerpc/platforms/powernv/opal-flash.c | 14 +- 1 file changed, 5

[PATCH 1/5] sysfs: add macro BIN_ATTR_ADMIN_WO()

2024-12-02 Thread Thomas Weißschuh
The macros BIN_ATTR_RO/BIN_ATTR_WO/BIN_ATTR_WR and BIN_ATTR_ADMIN_RO/BIN_ATTR_ADMIN_RW already exist. To complete the collection also add BIN_ATTR_ADMIN_WO. Signed-off-by: Thomas Weißschuh --- include/linux/sysfs.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/sysfs.h

[PATCH 2/5] s390/sclp_config: use BIN_ATTR_ADMIN_WO() for bin_attribute definition

2024-12-02 Thread Thomas Weißschuh
Using the macro saves some lines of code and prepares the attribute for the general constifications of struct bin_attributes. While at it also constify the callback parameter. Signed-off-by: Thomas Weißschuh --- drivers/s390/char/sclp_config.c | 16 +--- 1 file changed, 5

[PATCH 0/5] sysfs: introduce and use macro BIN_ATTR_ADMIN_WO()

2024-12-02 Thread Thomas Weißschuh
tree. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (5): sysfs: add macro BIN_ATTR_ADMIN_WO() s390/sclp_config: use BIN_ATTR_ADMIN_WO() for bin_attribute definition powerpc/powernv/flash: Use BIN_ATTR_ADMIN_WO() for bin_attribute definition firmware: google: gsmi: Use

[PATCH 4/5] firmware: google: gsmi: Use BIN_ATTR_ADMIN_WO() for bin_attribute definition

2024-12-02 Thread Thomas Weißschuh
Using the macro saves some lines of code and prepares the attribute for the general constifications of struct bin_attributes. While at it also constify the callback parameter. Signed-off-by: Thomas Weißschuh --- drivers/firmware/google/gsmi.c | 17 +++-- 1 file changed, 7

  1   2   3   >