aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-debug.h
diff options
context:
space:
mode:
authorEric Sandeen <[email protected]>2019-05-14 15:45:10 -0700
committerLinus Torvalds <[email protected]>2019-05-14 19:52:51 -0700
commit2ea622b887e74497ce5aac5bfe247502b5786f56 (patch)
tree3c17e664a47816f15b10e73a4c31a3dbc6e81b47 /drivers/usb/cdns3/cdns3-debug.h
parenta0edef79685c508fde517e6defac23b3ba60c422 (diff)
tools/testing/selftests/sysctl/sysctl.sh: add proc_do_large_bitmap() test case
The kernel has only two users of proc_do_large_bitmap(), the kernel CPU watchdog, and the ip_local_reserved_ports. Refer to watchdog_cpumask and ip_local_reserved_ports in Documentation for further details on these. When you input a large buffer into these, when it is larger than PAGE_SIZE- 1, the input data gets misparsed, and the user get incorrectly informed that the desired input value was set. This commit implements a test which mimics and exploits that use case, it uses a bitmap size, as in the watchdog case. The bitmap is used to test the bitmap proc handler, proc_do_large_bitmap(). The next commit fixes this issue. [[email protected]: move proc_do_large_bitmap() export to EOF] [[email protected]: use new target description for backward compatibility] [[email protected]: augment test number to 50, ran into issues with bash string comparisons when testing up to 50 cases.] [[email protected]: introduce and use verify_diff_proc_file() to use diff] [[email protected]: use mktemp for tmp file] [[email protected]: merge shell test and C code] [[email protected]: commit log love] [[email protected]: export proc_do_large_bitmap() to allow for the test [[email protected]: check for the return value when writing to the proc file] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]> Acked-by: Kees Cook <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions