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>] [day] [month] [year] [list]
Date:   Wed, 22 Dec 2021 11:51:35 +0000
From:   cgel.zte@...il.com
To:     mcgrof@...nel.org
Cc:     keescook@...omium.org, yzaikin@...gle.com,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        xu xin <xu.xin16@....com.cn>, Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] sysctl: add comments to make the code more clear

From: xu xin <xu.xin16@....com.cn>

Adding some comments for ctl_table is more clear.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: xu xin <xu.xin16@....com.cn>
---
 include/linux/sysctl.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 180adf7da785..105b18a290c4 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -131,14 +131,14 @@ 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 */
-	void *data;
-	int maxlen;
-	umode_t mode;
+	void *data;			/* a pointer to data for use by proc_handler */
+	int maxlen;			/* the maximum size in bytes of the data */
+	umode_t mode;			/* the file permissions for the /proc/sys file */
 	struct ctl_table *child;	/* Deprecated */
 	proc_handler *proc_handler;	/* Callback for text formatting */
-	struct ctl_table_poll *poll;
+	struct ctl_table_poll *poll;	/* Support for userspace poll() to watch for changes */
 	void *extra1;
-	void *extra2;
+	void *extra2;			/* extra pointers usually as minimum and maximum of data */
 } __randomize_layout;
 
 struct ctl_node {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ