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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed,  7 Mar 2018 15:34:29 -0500
From:   Waiman Long <longman@...hat.com>
To:     "Luis R. Rodriguez" <mcgrof@...nel.org>,
        Kees Cook <keescook@...omium.org>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Matthew Wilcox <willy@...radead.org>,
        Waiman Long <longman@...hat.com>
Subject: [PATCH 5/5] ipc: Show ranges of msgmni and shmmni with CTL_FLAGS_SHOW_RANGE

The CTL_FLAGS_SHOW_RANGE flag is added to the msgmni and shmmni
ctl_table entries to show their ranges. Two range table entries are
reserved for the new *_range sysctl parameters.

Signed-off-by: Waiman Long <longman@...hat.com>
---
 ipc/ipc_sysctl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 2c03f57..3b4d7cd 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -143,7 +143,7 @@ static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
 		.proc_handler	= proc_ipc_dointvec_minmax,
 		.extra1		= &zero,
 		.extra2		= &ipc_mni,
-		.flags		= CTL_FLAGS_CLAMP_RANGE,
+		.flags		= CTL_FLAGS_CLAMP_RANGE|CTL_FLAGS_SHOW_RANGE,
 	},
 	{
 		.procname	= "shm_rmid_forced",
@@ -171,7 +171,7 @@ static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
 		.proc_handler	= proc_ipc_dointvec_minmax,
 		.extra1		= &zero,
 		.extra2		= &ipc_mni,
-		.flags		= CTL_FLAGS_CLAMP_RANGE,
+		.flags		= CTL_FLAGS_CLAMP_RANGE|CTL_FLAGS_SHOW_RANGE,
 	},
 	{
 		.procname	= "auto_msgmni",
@@ -228,6 +228,7 @@ static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
 		.extra2		= &int_max,
 	},
 #endif
+	CTL_RESERVE_RANGES(2)
 	{}
 };
 
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ