aboutsummaryrefslogtreecommitdiff
path: root/mm/swap_state.c
diff options
context:
space:
mode:
authorRandy Dunlap <[email protected]>2022-02-28 20:18:51 -0800
committerArd Biesheuvel <[email protected]>2022-03-01 09:02:21 +0100
commit9feaf8b387ee0ece9c1d7add308776b502a35d0c (patch)
tree096ead760a47ed23f2408da1b04a08310b251c72 /mm/swap_state.c
parent258dd902022cb10c83671176688074879517fd21 (diff)
efi: fix return value of __setup handlers
When "dump_apple_properties" is used on the kernel boot command line, it causes an Unknown parameter message and the string is added to init's argument strings: Unknown kernel command line parameters "dump_apple_properties BOOT_IMAGE=/boot/bzImage-517rc6 efivar_ssdt=newcpu_ssdt", will be passed to user space. Run /sbin/init as init process with arguments: /sbin/init dump_apple_properties with environment: HOME=/ TERM=linux BOOT_IMAGE=/boot/bzImage-517rc6 efivar_ssdt=newcpu_ssdt Similarly when "efivar_ssdt=somestring" is used, it is added to the Unknown parameter message and to init's environment strings, polluting them (see examples above). Change the return value of the __setup functions to 1 to indicate that the __setup options have been handled. Fixes: 58c5475aba67 ("x86/efi: Retrieve and assign Apple device properties") Fixes: 475fb4e8b2f4 ("efi / ACPI: load SSTDs from EFI variables") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: Igor Zhbanov <[email protected]> Link: lore.kernel.org/r/[email protected] Cc: Ard Biesheuvel <[email protected]> Cc: [email protected] Cc: Lukas Wunner <[email protected]> Cc: Octavian Purdila <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Matt Fleming <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ard Biesheuvel <[email protected]>
Diffstat (limited to 'mm/swap_state.c')
0 files changed, 0 insertions, 0 deletions