From: Tyler Hicks <tyhicks@linux.microsoft.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: Pavel Tatashin <pasha.tatashin@soleen.com>, Rob Herring <robh+dt@kernel.org>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] arm64: Implement CONFIG_CMDLINE_EXTEND Date: Mon, 21 Sep 2020 14:15:55 -0500 [thread overview] Message-ID: <20200921191557.350256-1-tyhicks@linux.microsoft.com> (raw) Provide the CONFIG_CMDLINE_EXTEND config option for arm64 kernels. This config option can be used to extend the kernel command line parameters, specified by the bootloader, with additional command line parameters specified in the kernel configuration. This option addresses the following use cases: 1) Switching between stable and development kernel versions, where one of the versions benefits from additional command line parameters, such as debugging options. 2) Specifying additional command line parameters, for additional tuning or debugging, when the bootloader does not offer an interactive mode. After implementing these patches, I noticed that a previous attempt has been made to upstream CONFIG_CMDLINE_EXTEND support in arm64: https://lore.kernel.org/linux-arm-kernel/1447838885-9888-1-git-send-email-p.fedin@samsung.com/ I don't believe that the previous objection still holds as the generic command line parsing series hasn't been revised in over a year. This series is based on commit f322010a08da ("Merge branch 'for-next/mte' into for-next/core") of the for-next/core branch of the arm64 tree. Below is a summary of testing that I performed. Upgrade testing: * CONFIG_CMDLINE unset - oldconfig target doesn't prompt, * CONFIG_CMDLINE set, CONFIG_CMDLINE_FORCE unset - oldconfig target prompts for command line type with default choice set to CONFIG_CMDLINE_FROM_BOOTLOADER * CONFIG_CMDLINE set, CONFIG_CMDLINE_FORCE set - oldconfig target prompts for command line type with default choice set to CONFIG_CMDLINE_FORCE Functional testing: * Set CONFIG_CMDLINE="nokaslr apparmor=0" and CONFIG_CMDLINE_EXTEND=y to test early init parsing and regular parsing - /proc/cmdline shows that "nokaslr apparmor=0" was appended to the end of the bootloader supplied command line - "KASLR disabled on command line" found in dmesg - AppArmor is disabled. /sys/kernel/security/apparmor does not exist and aa-status prints: apparmor module is loaded. apparmor filesystem is not mounted. * Set CONFIG_CMDLINE="nokaslr apparmor=0", CONFIG_CMDLINE_FROM_BOOTLOADER=y, and have the bootloader specify a command line without those options - The bootloader's command line is used and does not contain CONFIG_CMDLINE's value - AppArmor and KASLR are enabled * Set CONFIG_CMDLINE="nokaslr apparmor=0" and CONFIG_CMDLINE_FORCE=y - The CONFIG_CMDLINE value is used and does not contain the bootloader's command line - AppArmor and KASLR are disabled Tyler Tyler Hicks (2): arm64: kaslr: Refactor early init command line parsing arm64: Extend the kernel command line from the bootloader arch/arm64/Kconfig | 23 ++++++++++++++++++++++- arch/arm64/kernel/kaslr.c | 26 ++++++++++++++++++-------- 2 files changed, 40 insertions(+), 9 deletions(-) -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Tyler Hicks <tyhicks@linux.microsoft.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: Rob Herring <robh+dt@kernel.org>, Pavel Tatashin <pasha.tatashin@soleen.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] arm64: Implement CONFIG_CMDLINE_EXTEND Date: Mon, 21 Sep 2020 14:15:55 -0500 [thread overview] Message-ID: <20200921191557.350256-1-tyhicks@linux.microsoft.com> (raw) Provide the CONFIG_CMDLINE_EXTEND config option for arm64 kernels. This config option can be used to extend the kernel command line parameters, specified by the bootloader, with additional command line parameters specified in the kernel configuration. This option addresses the following use cases: 1) Switching between stable and development kernel versions, where one of the versions benefits from additional command line parameters, such as debugging options. 2) Specifying additional command line parameters, for additional tuning or debugging, when the bootloader does not offer an interactive mode. After implementing these patches, I noticed that a previous attempt has been made to upstream CONFIG_CMDLINE_EXTEND support in arm64: https://lore.kernel.org/linux-arm-kernel/1447838885-9888-1-git-send-email-p.fedin@samsung.com/ I don't believe that the previous objection still holds as the generic command line parsing series hasn't been revised in over a year. This series is based on commit f322010a08da ("Merge branch 'for-next/mte' into for-next/core") of the for-next/core branch of the arm64 tree. Below is a summary of testing that I performed. Upgrade testing: * CONFIG_CMDLINE unset - oldconfig target doesn't prompt, * CONFIG_CMDLINE set, CONFIG_CMDLINE_FORCE unset - oldconfig target prompts for command line type with default choice set to CONFIG_CMDLINE_FROM_BOOTLOADER * CONFIG_CMDLINE set, CONFIG_CMDLINE_FORCE set - oldconfig target prompts for command line type with default choice set to CONFIG_CMDLINE_FORCE Functional testing: * Set CONFIG_CMDLINE="nokaslr apparmor=0" and CONFIG_CMDLINE_EXTEND=y to test early init parsing and regular parsing - /proc/cmdline shows that "nokaslr apparmor=0" was appended to the end of the bootloader supplied command line - "KASLR disabled on command line" found in dmesg - AppArmor is disabled. /sys/kernel/security/apparmor does not exist and aa-status prints: apparmor module is loaded. apparmor filesystem is not mounted. * Set CONFIG_CMDLINE="nokaslr apparmor=0", CONFIG_CMDLINE_FROM_BOOTLOADER=y, and have the bootloader specify a command line without those options - The bootloader's command line is used and does not contain CONFIG_CMDLINE's value - AppArmor and KASLR are enabled * Set CONFIG_CMDLINE="nokaslr apparmor=0" and CONFIG_CMDLINE_FORCE=y - The CONFIG_CMDLINE value is used and does not contain the bootloader's command line - AppArmor and KASLR are disabled Tyler Tyler Hicks (2): arm64: kaslr: Refactor early init command line parsing arm64: Extend the kernel command line from the bootloader arch/arm64/Kconfig | 23 ++++++++++++++++++++++- arch/arm64/kernel/kaslr.c | 26 ++++++++++++++++++-------- 2 files changed, 40 insertions(+), 9 deletions(-) -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2020-09-21 19:16 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-21 19:15 Tyler Hicks [this message] 2020-09-21 19:15 ` [PATCH 0/2] arm64: Implement CONFIG_CMDLINE_EXTEND Tyler Hicks 2020-09-21 19:15 ` [PATCH 1/2] arm64: kaslr: Refactor early init command line parsing Tyler Hicks 2020-09-21 19:15 ` Tyler Hicks 2020-09-21 19:15 ` [PATCH 2/2] arm64: Extend the kernel command line from the bootloader Tyler Hicks 2020-09-21 19:15 ` Tyler Hicks 2020-11-03 15:59 ` [PATCH 0/2] arm64: Implement CONFIG_CMDLINE_EXTEND Tyler Hicks 2020-11-03 15:59 ` Tyler Hicks 2020-11-04 12:08 ` Will Deacon 2020-11-04 12:08 ` Will Deacon 2020-11-05 5:40 ` Tyler Hicks 2020-11-05 5:40 ` Tyler Hicks 2020-11-05 9:58 ` Will Deacon 2020-11-05 9:58 ` Will Deacon 2020-11-05 15:28 ` Tyler Hicks 2020-11-05 15:28 ` Tyler Hicks 2020-11-19 16:56 ` Tyler Hicks 2020-11-19 16:56 ` Tyler Hicks 2020-11-19 19:25 ` Will Deacon 2020-11-19 19:25 ` Will Deacon 2020-11-20 13:50 ` Rob Herring 2020-11-20 13:50 ` Rob Herring 2020-11-27 19:12 ` Catalin Marinas 2020-11-27 19:12 ` Catalin Marinas
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200921191557.350256-1-tyhicks@linux.microsoft.com \ --to=tyhicks@linux.microsoft.com \ --cc=catalin.marinas@arm.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=pasha.tatashin@soleen.com \ --cc=robh+dt@kernel.org \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.