Skip to contentSkip to conversation

sysctl-move-maxolduid-as-a-sysctl-specific-const.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jan 23, 2022

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: sysctl: move maxolduid as a sysctl specific const
has been removed from the -mm tree. Its filename was
sysctl-move-maxolduid-as-a-sysctl-specific-const.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Luis Chamberlain <[email protected]>
Subject: sysctl: move maxolduid as a sysctl specific const

The maxolduid value is only shared for sysctl purposes for use on a max range. Just stuff this into our shared const array.

[[email protected]: fix sysctl_vals[], per Mickaël]
Cc Al Viro <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Antti Palosaari <[email protected]>
Cc Eric Biederman <[email protected]>
Cc Iurii Zaikin <[email protected]>
Cc "J. Bruce Fields" <[email protected]>
Cc Jeff Layton <[email protected]>
Cc Kees Cook <[email protected]>
Cc Lukas Middendorf <[email protected]>
Cc Stephen Kitt <[email protected]>
Cc Xiaoming Ni <[email protected]>

---

 fs/proc/proc_sysctl.c  |    2 +-
 include/linux/sysctl.h |    3 +++
 kernel/sysctl.c        |   12 ++++--------
 3 files changed, 8 insertions(+), 9 deletions(-)
fs/proc/proc_sysctl.c renamed from fs/proc/proc_sysctl.c~sysctl-move-maxolduid-as-a-sysctl-specific-const +1 -1
@@ -26,7 +26,7 @@ static const struct file_operations proc
 static const struct inode_operations proc_sys_dir_operations;
 
 /* shared constants to be used in various sysctls */
-const int sysctl_vals[] = { -1, 0, 1, 2, 4, 100, 200, 1000, 3000, INT_MAX };
+const int sysctl_vals[] = { -1, 0, 1, 2, 4, 100, 200, 1000, 3000, INT_MAX, 65535 };
 EXPORT_SYMBOL(sysctl_vals);
 
 const unsigned long sysctl_long_vals[] = { 0, 1, LONG_MAX };
include/linux/sysctl.h renamed from include/linux/sysctl.h~sysctl-move-maxolduid-as-a-sysctl-specific-const +3 -0
@@ -49,6 +49,9 @@ struct ctl_dir;
 #define SYSCTL_THREE_THOUSAND		((void *)&sysctl_vals[8])
 #define SYSCTL_INT_MAX			((void *)&sysctl_vals[9])
 
+/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
+#define SYSCTL_MAXOLDUID		((void *)&sysctl_vals[10])
+
 extern const int sysctl_vals[];
 
 #define SYSCTL_LONG_ZERO	((void *)&sysctl_long_vals[0])
kernel/sysctl.c renamed from kernel/sysctl.c~sysctl-move-maxolduid-as-a-sysctl-specific-const +4 -8
@@ -110,10 +110,6 @@ static const int six_hundred_forty_kb =
 /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */
 static const unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
 
-/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
-static const int maxolduid = 65535;
-/* minolduid is SYSCTL_ZERO */
-
 static const int ngroups_max = NGROUPS_MAX;
 static const int cap_last_cap = CAP_LAST_CAP;
 
@@ -2127,7 +2123,7 @@ static struct ctl_table kern_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_minmax,
 		.extra1		= SYSCTL_ZERO,
-		.extra2		= (void *)&maxolduid,
+		.extra2		= SYSCTL_MAXOLDUID,
 	},
 	{
 		.procname	= "overflowgid",
@@ -2136,7 +2132,7 @@ static struct ctl_table kern_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_minmax,
 		.extra1		= SYSCTL_ZERO,
-		.extra2		= (void *)&maxolduid,
+		.extra2		= SYSCTL_MAXOLDUID,
 	},
 #ifdef CONFIG_S390
 	{
@@ -2908,7 +2904,7 @@ static struct ctl_table fs_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_minmax,
 		.extra1		= SYSCTL_ZERO,
-		.extra2		= (void *)&maxolduid,
+		.extra2		= SYSCTL_MAXOLDUID,
 	},
 	{
 		.procname	= "overflowgid",
@@ -2917,7 +2913,7 @@ static struct ctl_table fs_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_minmax,
 		.extra1		= SYSCTL_ZERO,
-		.extra2		= (void *)&maxolduid,
+		.extra2		= SYSCTL_MAXOLDUID,
 	},
 #ifdef CONFIG_FILE_LOCKING
 	{

_

Patches currently in -mm which might be from [email protected] are