aboutsummaryrefslogtreecommitdiff
path: root/kernel/sysctl.c
Commit message (Collapse)AuthorAgeFilesLines
* kernel/sysctl.c: add missing range check in do_proc_dointvec_minmax_convZev Weiss2019-07-181-1/+10
| | | | | | | | | | | | | | | | | | | | | | | commit 8cf7630b29701d364f8df4a50e4f1f5e752b2778 upstream. This bug has apparently existed since the introduction of this function in the pre-git era (4500e91754d3 in Thomas Gleixner's history.git, "[NET]: Add proc_dointvec_userhz_jiffies, use it for proper handling of neighbour sysctls."). As a minimal fix we can simply duplicate the corresponding check in do_proc_dointvec_conv(). Change-Id: Ibf26281f3b0c0d35aacafa006341b6ff8e7e002f Link: http://lkml.kernel.org/r/20190207123426.9202-3-zev@bewilderbeest.net Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Iurii Zaikin <yzaikin@google.com> Cc: Kees Cook <keescook@chromium.org> Cc: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* ANDROID: lib: vsprintf: additional kernel pointer filtering optionsDave Weinstein2019-05-031-1/+1
| | | | | | | | | | | | | | | | | Add the kptr_restrict setting of 3 which results in both %p and %pK values being replaced by zeros. Add an additional %pP value inspired by the Grsecurity option which explicitly whitelists pointers for output. This patch is based on work by William Roberts <william.c.roberts@intel.com> [CV: fixed GCC warning on 32 bit targets] BUG: 30368199 Change-Id: Ic5cef86617f7758514271edd67199683d2c4e2bb Signed-off-by: Dave Weinstein <olorin@google.com>
* Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds2018-11-291-1/+1
| | | | | | | | | | | | | | This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Moyster <oysterized@gmail.com>
* sysctl: fix proc_doulongvec_ms_jiffies_minmax()Eric Dumazet2017-07-041-0/+1
| | | | | | | | | | | | | | | commit ff9f8a7cf935468a94d9927c68b00daae701667e upstream. We perform the conversion between kernel jiffies and ms only when exporting kernel value to user space. We need to do the opposite operation when value is written by user. Only matters when HZ != 1000 Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Willy Tarreau <w@1wt.eu>
* fs: add dirtytime_expire_seconds sysctlTheodore Ts'o2017-05-291-0/+8
| | | | | | | | Add a tuning knob so we can adjust the dirtytime expiration timeout, which is very useful for testing lazytime. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
* sysctl: fix maybe-uninitialized warningsNathan Chancellor2017-04-131-2/+2
| | | | | | | | | | | | | | | | | | | | | kernel/sysctl.c: In function '__do_proc_dointvec.isra.3': kernel/sysctl.c:2030:8: warning: 'kbuf' may be used uninitialized in this function [-Wmaybe-uninitialized] char *tmp = skip_spaces(*buf); ^~~ kernel/sysctl.c:2183:8: note: 'kbuf' was declared here char *kbuf; ^~~~ kernel/sysctl.c: In function '__do_proc_doulongvec_minmax': kernel/sysctl.c:2030:8: warning: 'kbuf' may be used uninitialized in this function [-Wmaybe-uninitialized] char *tmp = skip_spaces(*buf); ^~~ kernel/sysctl.c:2433:8: note: 'kbuf' was declared here char *kbuf; ^~~~ This will be initialized to NULL normally. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* FROMLIST: mm: mmap: Add new /proc tunable for mmap_base ASLR.dcashman2016-09-101-0/+22
| | | | | | | | | | | | | | | | | (cherry picked from commit https://lkml.org/lkml/2015/12/21/337) ASLR only uses as few as 8 bits to generate the random offset for the mmap base address on 32 bit architectures. This value was chosen to prevent a poorly chosen value from dividing the address space in such a way as to prevent large allocations. This may not be an issue on all platforms. Allow the specification of a minimum number of bits so that platforms desiring greater ASLR protection may determine where to place the trade-off. Bug: 24047224 Signed-off-by: Daniel Cashman <dcashman@android.com> Signed-off-by: Daniel Cashman <dcashman@google.com> Change-Id: I66ac01c6f4f2c8dcfc84d1f1e99490b8385b3ed4
* 3.10.102-> 3.10.103Jan Engelmohr2016-09-101-0/+14
|
* first commitMeizu OpenSource2016-08-151-0/+2720