aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-region.c
diff options
context:
space:
mode:
authorRandy Dunlap <[email protected]>2022-03-22 14:47:52 -0700
committerLinus Torvalds <[email protected]>2022-03-22 15:57:11 -0700
commit05fe3c103f7e6b8b4fca8a7001dfc9ed4628085b (patch)
tree939f4d52d2c04a3eb05146792898c0bd78e599e6 /drivers/fpga/fpga-region.c
parentad7489d5262d2aa775b5e5a1782793925fa90065 (diff)
mm/usercopy: return 1 from hardened_usercopy __setup() handler
__setup() handlers should return 1 if the command line option is handled and 0 if not (or maybe never return 0; it just pollutes init's environment). This prevents: Unknown kernel command line parameters \ "BOOT_IMAGE=/boot/bzImage-517rc5 hardened_usercopy=off", will be \ passed to user space. Run /sbin/init as init process with arguments: /sbin/init with environment: HOME=/ TERM=linux BOOT_IMAGE=/boot/bzImage-517rc5 hardened_usercopy=off or hardened_usercopy=on but when "hardened_usercopy=foo" is used, there is no Unknown kernel command line parameter. Return 1 to indicate that the boot option has been handled. Print a warning if strtobool() returns an error on the option string, but do not mark this as in unknown command line option and do not cause init's environment to be polluted with this string. Link: https://lkml.kernel.org/r/[email protected] Link: lore.kernel.org/r/[email protected] Fixes: b5cb15d9372ab ("usercopy: Allow boot cmdline disabling of hardening") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: Igor Zhbanov <[email protected]> Acked-by: Chris von Recklinghausen <[email protected]> Cc: Kees Cook <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-region.c')
0 files changed, 0 insertions, 0 deletions