Re: [PATCH] vmcore: replace strncpy with strtomem

2024-03-27 Thread Baoquan He
32 n_type; /* NT_VMCOREDD */ > - __u8 name[8]; /* LINUX\0\0\0 */ > - __u8 dump_name[VMCOREDD_MAX_NAME_BYTES]; /* Device dump's name */ > + __u8 name[8] __nonstring; /* LINUX\0\0\0 */ > + __u8 dump_name[VMCOREDD_MAX_NAME_BYTES] __nonstring; /* Device dump's > name */ > }; > > #endif /* _UAPI_VMCORE_H */ > > --- > base-commit: 928a87efa42302a23bb9554be081a28058495f22 > change-id: 20240327-strncpy-fs-proc-vmcore-c-b18d761feaef > > Best regards, > -- > Justin Stitt >

[PATCH] vmcore: replace strncpy with strtomem

2024-03-27 Thread Justin Stitt
's name */ + __u8 name[8] __nonstring; /* LINUX\0\0\0 */ + __u8 dump_name[VMCOREDD_MAX_NAME_BYTES] __nonstring; /* Device dump's name */ }; #endif /* _UAPI_VMCORE_H */ --- base-commit: 928a87efa42302a23bb9554be081a28058495f22 change-id: 20240327-strncpy-fs-proc-vmcore-c-b18d761feaef Best regards, -- Justin Stitt

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

2024-03-27 Thread Dave Chinner
On Fri, Mar 15, 2024 at 09:48:09PM +0100, Thomas Weißschuh wrote: > Adapt the proc_hander function signature to make it clear that handlers > are not supposed to modify their ctl_table argument. > > This is a prerequisite to moving the static ctl_table structs into > .rodata. > By migrating all

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

2024-03-27 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_sysctl.c

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

2024-03-27 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-27 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/addrconf.c

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

2024-03-27 Thread Thomas Weißschuh
* Patch 1 is a bugfix for the stack_erasing sysctl handler * Patches 2-10 change various helper functions throughout the kernel to be able to handle 'const ctl_table'. * Patch 11 changes the signatures of all proc handlers through the tree. Some other signatures are also adapted, for details

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

2024-03-27 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/hugetlb.c

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

2024-03-27 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 01/11] stackleak: don't modify ctl_table argument

2024-03-27 Thread Thomas Weißschuh
In a future commit the proc_handlers will change to "const struct ctl_table". As a preparation for that adapt the logic to work with a temporary variable, similar to how it is done in other parts of the kernel. Fixes: 964c9dff0091 ("stackleak: Allow runtime disabling of kernel stack erasing")

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

2024-03-27 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

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

2024-03-27 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/neighbour.c

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

2024-03-27 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 --git

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

2024-03-27 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 insertions(+),