* [PATCH] sysctl: Add missing kernel-doc for proc_dointvec_conv
@ 2025-12-15 15:52 Joel Granados
2025-12-16 8:40 ` Kees Cook
0 siblings, 1 reply; 4+ messages in thread
From: Joel Granados @ 2025-12-15 15:52 UTC (permalink / raw)
To: Kees Cook; +Cc: linux-kernel, linux-fsdevel, Joel Granados
Add kernel-doc documentation for the proc_dointvec_conv function to
describe its parameters and return value.
Signed-off-by: Joel Granados <joel.granados@kernel.org>
---
kernel/sysctl.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 2cd767b9680eb696efeae06f436548777b1b6844..b589f50d62854985c4c063232c95bd7590434738 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -862,6 +862,22 @@ int proc_doulongvec_minmax(const struct ctl_table *table, int dir,
return proc_doulongvec_minmax_conv(table, dir, buffer, lenp, ppos, 1l, 1l);
}
+/**
+ * proc_dointvec_conv - read a vector of ints with a custom converter
+ * @table: the sysctl table
+ * @dir: %TRUE if this is a write to the sysctl file
+ * @buffer: the user buffer
+ * @lenp: the size of the user buffer
+ * @ppos: file position
+ * @conv: Custom converter call back
+ *
+ * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
+ * values from/to the user buffer, treated as an ASCII string. Negative
+ * strings are not allowed.
+ *
+ * Returns 0 on success
+ */
+
int proc_dointvec_conv(const struct ctl_table *table, int dir, void *buffer,
size_t *lenp, loff_t *ppos,
int (*conv)(bool *negp, unsigned long *u_ptr, int *k_ptr,
---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251215-jag-sysctl-doc-d3cb5bd14699
Best regards,
--
Joel Granados <joel.granados@kernel.org>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] sysctl: Add missing kernel-doc for proc_dointvec_conv
2025-12-15 15:52 [PATCH] sysctl: Add missing kernel-doc for proc_dointvec_conv Joel Granados
@ 2025-12-16 8:40 ` Kees Cook
2025-12-17 8:08 ` Joel Granados
2025-12-17 8:24 ` Joel Granados
0 siblings, 2 replies; 4+ messages in thread
From: Kees Cook @ 2025-12-16 8:40 UTC (permalink / raw)
To: Joel Granados; +Cc: linux-kernel, linux-fsdevel
On Mon, Dec 15, 2025 at 04:52:58PM +0100, Joel Granados wrote:
> Add kernel-doc documentation for the proc_dointvec_conv function to
> describe its parameters and return value.
>
> Signed-off-by: Joel Granados <joel.granados@kernel.org>
> ---
> kernel/sysctl.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 2cd767b9680eb696efeae06f436548777b1b6844..b589f50d62854985c4c063232c95bd7590434738 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -862,6 +862,22 @@ int proc_doulongvec_minmax(const struct ctl_table *table, int dir,
> return proc_doulongvec_minmax_conv(table, dir, buffer, lenp, ppos, 1l, 1l);
> }
>
> +/**
> + * proc_dointvec_conv - read a vector of ints with a custom converter
> + * @table: the sysctl table
> + * @dir: %TRUE if this is a write to the sysctl file
> + * @buffer: the user buffer
> + * @lenp: the size of the user buffer
> + * @ppos: file position
> + * @conv: Custom converter call back
> + *
> + * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
> + * values from/to the user buffer, treated as an ASCII string. Negative
> + * strings are not allowed.
> + *
> + * Returns 0 on success
I think kern-doc expects "Returns:" rather than "Returns". But
otherwise, yes! :)
Reviewed-by: Kees Cook <kees@kernel.org>
-Kees
> + */
> +
> int proc_dointvec_conv(const struct ctl_table *table, int dir, void *buffer,
> size_t *lenp, loff_t *ppos,
> int (*conv)(bool *negp, unsigned long *u_ptr, int *k_ptr,
>
> ---
> base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> change-id: 20251215-jag-sysctl-doc-d3cb5bd14699
>
> Best regards,
> --
> Joel Granados <joel.granados@kernel.org>
>
>
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] sysctl: Add missing kernel-doc for proc_dointvec_conv
2025-12-16 8:40 ` Kees Cook
@ 2025-12-17 8:08 ` Joel Granados
2025-12-17 8:24 ` Joel Granados
1 sibling, 0 replies; 4+ messages in thread
From: Joel Granados @ 2025-12-17 8:08 UTC (permalink / raw)
To: Kees Cook; +Cc: linux-kernel, linux-fsdevel
[-- Attachment #1: Type: text/plain, Size: 2088 bytes --]
On Tue, Dec 16, 2025 at 12:40:15AM -0800, Kees Cook wrote:
> On Mon, Dec 15, 2025 at 04:52:58PM +0100, Joel Granados wrote:
> > Add kernel-doc documentation for the proc_dointvec_conv function to
> > describe its parameters and return value.
> >
> > Signed-off-by: Joel Granados <joel.granados@kernel.org>
> > ---
> > kernel/sysctl.c | 16 ++++++++++++++++
> > 1 file changed, 16 insertions(+)
> >
> > diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> > index 2cd767b9680eb696efeae06f436548777b1b6844..b589f50d62854985c4c063232c95bd7590434738 100644
> > --- a/kernel/sysctl.c
> > +++ b/kernel/sysctl.c
> > @@ -862,6 +862,22 @@ int proc_doulongvec_minmax(const struct ctl_table *table, int dir,
> > return proc_doulongvec_minmax_conv(table, dir, buffer, lenp, ppos, 1l, 1l);
> > }
> >
> > +/**
> > + * proc_dointvec_conv - read a vector of ints with a custom converter
> > + * @table: the sysctl table
> > + * @dir: %TRUE if this is a write to the sysctl file
> > + * @buffer: the user buffer
> > + * @lenp: the size of the user buffer
> > + * @ppos: file position
> > + * @conv: Custom converter call back
> > + *
> > + * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
> > + * values from/to the user buffer, treated as an ASCII string. Negative
> > + * strings are not allowed.
> > + *
> > + * Returns 0 on success
>
> I think kern-doc expects "Returns:" rather than "Returns". But
> otherwise, yes! :)
Will change locally. I wont resend as the change is trivial.
Thx
>
> Reviewed-by: Kees Cook <kees@kernel.org>
>
> -Kees
>
> > + */
> > +
> > int proc_dointvec_conv(const struct ctl_table *table, int dir, void *buffer,
> > size_t *lenp, loff_t *ppos,
> > int (*conv)(bool *negp, unsigned long *u_ptr, int *k_ptr,
> >
> > ---
> > base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> > change-id: 20251215-jag-sysctl-doc-d3cb5bd14699
> >
> > Best regards,
> > --
> > Joel Granados <joel.granados@kernel.org>
> >
> >
>
> --
> Kees Cook
--
Joel Granados
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] sysctl: Add missing kernel-doc for proc_dointvec_conv
2025-12-16 8:40 ` Kees Cook
2025-12-17 8:08 ` Joel Granados
@ 2025-12-17 8:24 ` Joel Granados
1 sibling, 0 replies; 4+ messages in thread
From: Joel Granados @ 2025-12-17 8:24 UTC (permalink / raw)
To: Kees Cook; +Cc: linux-kernel, linux-fsdevel, linux-doc
[-- Attachment #1: Type: text/plain, Size: 2144 bytes --]
On Tue, Dec 16, 2025 at 12:40:15AM -0800, Kees Cook wrote:
> On Mon, Dec 15, 2025 at 04:52:58PM +0100, Joel Granados wrote:
> > Add kernel-doc documentation for the proc_dointvec_conv function to
> > describe its parameters and return value.
> >
> > Signed-off-by: Joel Granados <joel.granados@kernel.org>
> > ---
> > kernel/sysctl.c | 16 ++++++++++++++++
> > 1 file changed, 16 insertions(+)
> >
> > diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> > index 2cd767b9680eb696efeae06f436548777b1b6844..b589f50d62854985c4c063232c95bd7590434738 100644
> > --- a/kernel/sysctl.c
> > +++ b/kernel/sysctl.c
> > @@ -862,6 +862,22 @@ int proc_doulongvec_minmax(const struct ctl_table *table, int dir,
> > return proc_doulongvec_minmax_conv(table, dir, buffer, lenp, ppos, 1l, 1l);
> > }
> >
> > +/**
> > + * proc_dointvec_conv - read a vector of ints with a custom converter
> > + * @table: the sysctl table
> > + * @dir: %TRUE if this is a write to the sysctl file
> > + * @buffer: the user buffer
> > + * @lenp: the size of the user buffer
> > + * @ppos: file position
> > + * @conv: Custom converter call back
> > + *
> > + * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
> > + * values from/to the user buffer, treated as an ASCII string. Negative
> > + * strings are not allowed.
> > + *
> > + * Returns 0 on success
>
> I think kern-doc expects "Returns:" rather than "Returns". But
They are all like this. Forwarding to linux-doc in case someone wants to
modify all the "Returns" to "Returns:".
Best
> otherwise, yes! :)
>
> Reviewed-by: Kees Cook <kees@kernel.org>
>
> -Kees
>
> > + */
> > +
> > int proc_dointvec_conv(const struct ctl_table *table, int dir, void *buffer,
> > size_t *lenp, loff_t *ppos,
> > int (*conv)(bool *negp, unsigned long *u_ptr, int *k_ptr,
> >
> > ---
> > base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> > change-id: 20251215-jag-sysctl-doc-d3cb5bd14699
> >
> > Best regards,
> > --
> > Joel Granados <joel.granados@kernel.org>
> >
> >
>
> --
> Kees Cook
--
Joel Granados
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-17 8:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-15 15:52 [PATCH] sysctl: Add missing kernel-doc for proc_dointvec_conv Joel Granados
2025-12-16 8:40 ` Kees Cook
2025-12-17 8:08 ` Joel Granados
2025-12-17 8:24 ` Joel Granados
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.