* [PATCH] sysctl: update comments to new registration APIs
@ 2024-08-10 17:00 Thomas Weißschuh
2024-08-12 18:11 ` Kees Cook
2024-10-23 13:32 ` Joel Granados
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Weißschuh @ 2024-08-10 17:00 UTC (permalink / raw)
To: Luis Chamberlain, Kees Cook, Joel Granados
Cc: linux-kernel, linux-fsdevel, Thomas Weißschuh
The sysctl registration APIs do not need a terminating table entry
anymore and with commit acc154691fc7 ("sysctl: Warn on an empty procname element")
even emit warnings if such a sentinel entry is supplied.
While at it also remove the mention of "table->de" which was removed in
commit 3fbfa98112fc ("[PATCH] sysctl: remove the proc_dir_entry member for the sysctl tables")
back in 2007.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
| 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--git a/include/linux/sysctl.h b/include/linux/sysctl.h
index aa4c6d44aaa0..47ca2536865b 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -90,9 +90,7 @@ int proc_do_static_key(const struct ctl_table *table, int write, void *buffer,
/*
* Register a set of sysctl names by calling register_sysctl
- * with an initialised array of struct ctl_table's. An entry with
- * NULL procname terminates the table. table->de will be
- * set up by the registration and need not be initialised in advance.
+ * with an initialised array of struct ctl_table's.
*
* sysctl names can be mirrored automatically under /proc/sys. The
* procname supplied controls /proc naming.
@@ -133,7 +131,7 @@ static inline void *proc_sys_poll_event(struct ctl_table_poll *poll)
/* A sysctl table is an array of struct ctl_table: */
struct ctl_table {
- const char *procname; /* Text ID for /proc/sys, or zero */
+ const char *procname; /* Text ID for /proc/sys */
void *data;
int maxlen;
umode_t mode;
---
base-commit: 34ac1e82e5a78d5ed7f647766f5b1b51ca4d983a
change-id: 20240810-sysctl-procname-null-comment-80160bd4089f
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sysctl: update comments to new registration APIs
2024-08-10 17:00 [PATCH] sysctl: update comments to new registration APIs Thomas Weißschuh
@ 2024-08-12 18:11 ` Kees Cook
2024-10-23 13:32 ` Joel Granados
1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2024-08-12 18:11 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Luis Chamberlain, Joel Granados, linux-kernel, linux-fsdevel
On Sat, Aug 10, 2024 at 07:00:35PM +0200, Thomas Weißschuh wrote:
> The sysctl registration APIs do not need a terminating table entry
> anymore and with commit acc154691fc7 ("sysctl: Warn on an empty procname element")
> even emit warnings if such a sentinel entry is supplied.
>
> While at it also remove the mention of "table->de" which was removed in
> commit 3fbfa98112fc ("[PATCH] sysctl: remove the proc_dir_entry member for the sysctl tables")
> back in 2007.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Thanks!
Reviewed-by: Kees Cook <kees@kernel.org>
If you're already poking around at these things, it might also be nice
to add full kern-doc for these APIs and structs.
--
Kees Cook
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sysctl: update comments to new registration APIs
2024-08-10 17:00 [PATCH] sysctl: update comments to new registration APIs Thomas Weißschuh
2024-08-12 18:11 ` Kees Cook
@ 2024-10-23 13:32 ` Joel Granados
1 sibling, 0 replies; 3+ messages in thread
From: Joel Granados @ 2024-10-23 13:32 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Luis Chamberlain, Kees Cook, Joel Granados, linux-kernel,
linux-fsdevel
On Sat, Aug 10, 2024 at 07:00:35PM +0200, Thomas Weißschuh wrote:
> The sysctl registration APIs do not need a terminating table entry
> anymore and with commit acc154691fc7 ("sysctl: Warn on an empty procname element")
> even emit warnings if such a sentinel entry is supplied.
>
> While at it also remove the mention of "table->de" which was removed in
> commit 3fbfa98112fc ("[PATCH] sysctl: remove the proc_dir_entry member for the sysctl tables")
> back in 2007.
I queued this for next release with a slight change in the line lengths
to make checkpatch happy. Try to make the paragraphs up to 75 chars next
time
Thx
--
Joel Granados
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-23 13:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-10 17:00 [PATCH] sysctl: update comments to new registration APIs Thomas Weißschuh
2024-08-12 18:11 ` Kees Cook
2024-10-23 13:32 ` Joel Granados
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).