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
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
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 -
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
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_
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
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
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
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/
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
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
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
-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
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
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
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_
-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
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 -
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
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
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/
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
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
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
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
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
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].
> > &
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
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
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].
> > &
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
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*
>>
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
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
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 |
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
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.
>
>
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
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
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
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
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
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 +
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
> >> >
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
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
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
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
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
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
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 - 100 of 236 matches
Mail list logo