aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_prog_array_init.c
diff options
context:
space:
mode:
authorRandy Dunlap <[email protected]>2022-02-22 13:45:18 -0800
committerMimi Zohar <[email protected]>2022-02-22 18:11:33 -0500
commitf2544f5e6c691679d56bb38637d2f347075b36fa (patch)
tree4464c55205df89d88f3b3f4abcdbdcad67686b03 /tools/testing/selftests/bpf/progs/test_prog_array_init.c
parentcd3bc044af483422cc81a93f23c78c20c978b17c (diff)
EVM: fix the evm= __setup handler return value
__setup() handlers should return 1 if the parameter is handled. Returning 0 causes the entire string to be added to init's environment strings (limited to 32 strings), unnecessarily polluting it. Using the documented string "evm=fix" causes an Unknown parameter message: Unknown kernel command line parameters "BOOT_IMAGE=/boot/bzImage-517rc5 evm=fix", will be passed to user space. and that string is added to init's environment string space: Run /sbin/init as init process with arguments: /sbin/init with environment: HOME=/ TERM=linux BOOT_IMAGE=/boot/bzImage-517rc5 evm=fix With this change, using "evm=fix" acts as expected and an invalid option ("evm=evm") causes a warning to be printed: evm: invalid "evm" mode but init's environment is not polluted with this string, as expected. Fixes: 7102ebcd65c1 ("evm: permit only valid security.evm xattrs to be updated") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: Igor Zhbanov <[email protected]> Link: lore.kernel.org/r/[email protected] Signed-off-by: Mimi Zohar <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_prog_array_init.c')
0 files changed, 0 insertions, 0 deletions