alistair23-linux/fs/proc
Waiman Long 64a11f3dc2 fs/proc/proc_sysctl.c: fix typo in sysctl_check_table_array()
Patch series "ipc: Clamp *mni to the real IPCMNI limit", v3.

The sysctl parameters msgmni, shmmni and semmni have an inherent limit
of IPC_MNI (32k).  However, users may not be aware of that because they
can write a value much higher than that without getting any error or
notification.  Reading the parameters back will show the newly written
values which are not real.

Enforcing the limit by failing sysctl parameter write, however, can
break existing user applications.  To address this delemma, a new flags
field is introduced into the ctl_table.  The value CTL_FLAGS_CLAMP_RANGE
can be added to any ctl_table entries to enable a looser range clamping
without returning any error.  For example,

  .flags = CTL_FLAGS_CLAMP_RANGE,

This flags value are now used for the range checking of shmmni, msgmni
and semmni without breaking existing applications.  If any out of range
value is written to those sysctl parameters, the following warning will
be printed instead.

  Kernel parameter "shmmni" was set out of range [0, 32768], clamped to 32768.

Reading the values back will show 32768 instead of some fake values.

This patch (of 6):

Fix a typo.

Link: http://lkml.kernel.org/r/1519926220-7453-2-git-send-email-longman@redhat.com
Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Luis R. Rodriguez <mcgrof@kernel.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-04-11 10:28:38 -07:00
..
array.c proc: replace seq_printf by seq_put_smth to speed up /proc/pid/status 2018-04-11 10:28:33 -07:00
base.c proc: do mmput ASAP for /proc/*/map_files 2018-04-11 10:28:34 -07:00
cmdline.c proc: faster /proc/cmdline 2018-04-11 10:28:34 -07:00
consoles.c fs/proc/consoles.c: use seq_putc() in show_console_dev() 2018-02-06 18:32:44 -08:00
cpuinfo.c x86 / CPU: Always show current CPU frequency in /proc/cpuinfo 2017-11-15 19:46:50 +01:00
devices.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fd.c proc: use %u for pid printing and slightly less stack 2018-02-06 18:32:43 -08:00
fd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
generic.c proc: use slower rb_first() 2018-04-11 10:28:34 -07:00
inode.c proc: move "struct proc_dir_entry" into kmem cache 2018-04-11 10:28:34 -07:00
internal.h proc: use slower rb_first() 2018-04-11 10:28:34 -07:00
interrupts.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig fs, proc: add help for CONFIG_PROC_CHILDREN 2015-07-17 16:39:52 -07:00
kcore.c vfs/proc/kcore, x86/mm/kcore: Fix SMAP fault when dumping vsyscall user page 2018-02-13 09:15:58 +01:00
kmsg.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
loadavg.c pid: replace pid bitmap implementation with IDR API 2017-11-17 16:10:03 -08:00
Makefile proc: : uninline name_to_int() 2017-11-17 16:10:00 -08:00
meminfo.c proc: add seq_put_decimal_ull_width to speed up /proc/pid/smaps 2018-04-11 10:28:33 -07:00
namespaces.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nommu.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
page.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
proc_net.c proc: use slower rb_first() 2018-04-11 10:28:34 -07:00
proc_sysctl.c fs/proc/proc_sysctl.c: fix typo in sysctl_check_table_array() 2018-04-11 10:28:38 -07:00
proc_tty.c TTY/Serial patches for 4.15-rc1 2017-11-13 21:05:31 -08:00
root.c proc: use slower rb_first() 2018-04-11 10:28:34 -07:00
self.c fs/proc: use __ro_after_init 2018-02-06 18:32:43 -08:00
softirqs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stat.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
task_mmu.c proc: replace seq_printf on seq_putc to speed up /proc/pid/smaps 2018-04-11 10:28:33 -07:00
task_nommu.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
thread_self.c fs/proc: use __ro_after_init 2018-02-06 18:32:43 -08:00
uptime.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
util.c proc: use do-while in name_to_int() 2017-11-17 16:10:00 -08:00
version.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmcore.c fs/proc/vmcore.c: simpler /proc/vmcore cleanup 2018-02-06 18:32:43 -08:00