lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202512160038.2C7DAA20@keescook>
Date: Tue, 16 Dec 2025 00:40:15 -0800
From: Kees Cook <kees@...nel.org>
To: Joel Granados <joel.granados@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] sysctl: Add missing kernel-doc for proc_dointvec_conv

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@...nel.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@...nel.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@...nel.org>
> 
> 

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ