[to-be-updated] proc-sysctl-check-for-invalid-flags-bits.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: fs/proc/proc_sysctl.c: check for invalid flags bits
has been removed from the -mm tree.  Its filename was
     proc-sysctl-check-for-invalid-flags-bits.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Waiman Long <longman@xxxxxxxxxx>
Subject: fs/proc/proc_sysctl.c: check for invalid flags bits

Checking code is added to check for invalid flags in the ctl_table and
return error if an unknown flag is used.

Link: http://lkml.kernel.org/r/1520885744-1546-3-git-send-email-longman@xxxxxxxxxx
Signed-off-by: Waiman Long <longman@xxxxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Davidlohr Bueso <dave@xxxxxxxxxxxx>
Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>
Cc: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/proc/proc_sysctl.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff -puN fs/proc/proc_sysctl.c~proc-sysctl-check-for-invalid-flags-bits fs/proc/proc_sysctl.c
--- a/fs/proc/proc_sysctl.c~proc-sysctl-check-for-invalid-flags-bits
+++ a/fs/proc/proc_sysctl.c
@@ -1092,6 +1092,16 @@ static int sysctl_check_table_array(cons
 	return err;
 }
 
+static int sysctl_check_flags(const char *path, struct ctl_table *table)
+{
+	int err = 0;
+
+	if (table->flags & ~CTL_TABLE_FLAGS_ALL)
+		err = sysctl_err(path, table, "invalid flags");
+
+	return err;
+}
+
 static int sysctl_check_table(const char *path, struct ctl_table *table)
 {
 	int err = 0;
@@ -1111,6 +1121,8 @@ static int sysctl_check_table(const char
 		    (table->proc_handler == proc_doulongvec_ms_jiffies_minmax)) {
 			if (!table->data)
 				err |= sysctl_err(path, table, "No data");
+			if (table->flags)
+				err |= sysctl_check_flags(path, table);
 			if (!table->maxlen)
 				err |= sysctl_err(path, table, "No maxlen");
 			else
_

Patches currently in -mm which might be from longman@xxxxxxxxxx are

list_lru-prefetch-neighboring-list-entries-before-acquiring-lock.patch
proc-sysctl-fix-typo-in-sysctl_check_table_array.patch
sysctl-add-kdoc-comments-to-do_proc_douintvec_minmax_conv_param.patch
sysctl-warn-when-a-clamped-sysctl-parameter-is-set-out-of-range.patch
ipc-clamp-msgmni-and-shmmni-to-the-real-ipcmni-limit.patch
ipc-clamp-semmni-to-the-real-ipcmni-limit.patch
test_sysctl-add-range-clamping-test.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux