* [PATCH 0/8] generic command line v4
@ 2021-04-16 4:09 Daniel Walker
2021-04-16 4:09 ` [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol Daniel Walker
2022-09-22 20:45 ` [PATCH 0/8] generic command line v4 Sean Anderson
0 siblings, 2 replies; 13+ messages in thread
From: Daniel Walker @ 2021-04-16 4:09 UTC (permalink / raw)
To: Will Deacon, Christophe Leroy, Rob Herring, Daniel Gimpelevich,
Andrew Morton, x86, linux-mips, linuxppc-dev, H. Peter Anvin,
linux-arm-kernel, linux-kernel, devicetree, linux-kbuild
Cc: linux-efi
v4 release changes
* Updated insert-sys-cert tool to change command line symbols after
compilation.
This tool is used to release binary kernels internally to companies
and then later insert certificates for each product by consumers of
the binary kernel. Cisco uses this tool for this purpose.
Cisco has a similar need for the command line to be modified on a
binary released kernels similar to how certificates are setup.
* Added global symbols to hold append and prepend values.
These changes follow the system certificate code to allow the
insert-sys-cert tool to be used.
* Added a test case to confirm functionality.
Seemed sensible to add this to make sure everything is working.
* Dropped powerpc changes
Christophe Leroy has reservations about the features for powerpc. I
don't think his reservations are founded, and these changes should
fully work on powerpc. However, I dropped these changes so Christophe
can have more time to get comfortable with the changes.
Enjoy!
Daniel Walker (8):
CMDLINE: add generic builtin command line
scripts: insert-sys-cert: add command line insert capability
scripts: insert-sys-cert: change name to insert-symbol
CMDLINE: mips: convert to generic builtin command line
drivers: firmware: efi: libstub: enable generic commandline
CMDLINE: x86: convert to generic builtin command line
of: allow sending a NULL value to early_init_dt_scan_chosen
CMDLINE: arm64: convert to generic builtin command line
arch/arm64/Kconfig | 33 +--
arch/arm64/include/asm/setup.h | 2 +
arch/arm64/kernel/idreg-override.c | 9 +-
arch/mips/Kconfig | 4 +-
arch/mips/Kconfig.debug | 44 ----
arch/mips/configs/ar7_defconfig | 9 +-
arch/mips/configs/bcm47xx_defconfig | 8 +-
arch/mips/configs/bcm63xx_defconfig | 15 +-
arch/mips/configs/bmips_be_defconfig | 11 +-
arch/mips/configs/bmips_stb_defconfig | 11 +-
arch/mips/configs/capcella_defconfig | 11 +-
arch/mips/configs/ci20_defconfig | 10 +-
arch/mips/configs/cu1000-neo_defconfig | 10 +-
arch/mips/configs/cu1830-neo_defconfig | 10 +-
arch/mips/configs/e55_defconfig | 4 +-
arch/mips/configs/generic_defconfig | 6 +-
arch/mips/configs/gpr_defconfig | 18 +-
arch/mips/configs/loongson3_defconfig | 13 +-
arch/mips/configs/mpc30x_defconfig | 7 +-
arch/mips/configs/tb0219_defconfig | 7 +-
arch/mips/configs/tb0226_defconfig | 7 +-
arch/mips/configs/tb0287_defconfig | 7 +-
arch/mips/configs/workpad_defconfig | 11 +-
arch/mips/include/asm/setup.h | 2 +
arch/mips/kernel/relocate.c | 17 +-
arch/mips/kernel/setup.c | 36 +--
arch/mips/pic32/pic32mzda/early_console.c | 2 +-
arch/mips/pic32/pic32mzda/init.c | 3 +-
arch/x86/Kconfig | 44 +---
arch/x86/kernel/setup.c | 18 +-
.../firmware/efi/libstub/efi-stub-helper.c | 29 +++
drivers/firmware/efi/libstub/efi-stub.c | 9 +
drivers/firmware/efi/libstub/efistub.h | 1 +
drivers/firmware/efi/libstub/x86-stub.c | 13 +-
drivers/of/fdt.c | 44 ++--
include/linux/cmdline.h | 103 ++++++++
init/Kconfig | 78 ++++++
lib/Kconfig | 4 +
lib/Makefile | 3 +
lib/generic_cmdline.S | 53 ++++
lib/test_cmdline1.c | 139 ++++++++++
scripts/Makefile | 2 +-
.../{insert-sys-cert.c => insert-symbol.c} | 243 ++++++++++++------
43 files changed, 716 insertions(+), 394 deletions(-)
create mode 100644 include/linux/cmdline.h
create mode 100644 lib/generic_cmdline.S
create mode 100644 lib/test_cmdline1.c
rename scripts/{insert-sys-cert.c => insert-symbol.c} (72%)
--
2.25.1
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol
2021-04-16 4:09 [PATCH 0/8] generic command line v4 Daniel Walker
@ 2021-04-16 4:09 ` Daniel Walker
2022-09-22 20:45 ` [PATCH 0/8] generic command line v4 Sean Anderson
1 sibling, 0 replies; 13+ messages in thread
From: Daniel Walker @ 2021-04-16 4:09 UTC (permalink / raw)
To: Will Deacon, Christophe Leroy, Rob Herring, Daniel Gimpelevich,
Andrew Morton, x86, linux-mips, linuxppc-dev, Masahiro Yamada,
Michal Marek
Cc: xe-linux-external, linux-kbuild, linux-kernel
Since the tool is used to update the command line and/or
to update the certificates, I think it makes sense to
changes the name of this tool.
Update the name of the tool to better reflect it's new use.
Cc: xe-linux-external@cisco.com
Signed-off-by: Daniel Walker <danielwa@cisco.com>
---
scripts/Makefile | 2 +-
scripts/{insert-sys-cert.c => insert-symbol.c} | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename scripts/{insert-sys-cert.c => insert-symbol.c} (99%)
diff --git a/scripts/Makefile b/scripts/Makefile
index c36106bce80e..ed6b9f8f91fa 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -13,7 +13,7 @@ hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable
hostprogs-always-$(CONFIG_ASN1) += asn1_compiler
hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
hostprogs-always-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
-hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
+hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-symbol
HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
diff --git a/scripts/insert-sys-cert.c b/scripts/insert-symbol.c
similarity index 99%
rename from scripts/insert-sys-cert.c
rename to scripts/insert-symbol.c
index 77d3306cfbfb..6866e3a84974 100644
--- a/scripts/insert-sys-cert.c
+++ b/scripts/insert-symbol.c
@@ -7,7 +7,7 @@
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
- * Usage: insert-sys-cert [-s <System.map> -b <vmlinux> -c <certfile>
+ * Usage: insert-symbol [-s <System.map> -b <vmlinux> -c <certfile>
*/
#define _GNU_SOURCE
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 0/8] generic command line v4
2021-04-16 4:09 [PATCH 0/8] generic command line v4 Daniel Walker
2021-04-16 4:09 ` [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol Daniel Walker
@ 2022-09-22 20:45 ` Sean Anderson
2022-09-22 20:53 ` Daniel Walker
1 sibling, 1 reply; 13+ messages in thread
From: Sean Anderson @ 2022-09-22 20:45 UTC (permalink / raw)
To: Daniel Walker, Will Deacon, Christophe Leroy, Rob Herring,
Daniel Gimpelevich, Andrew Morton, x86, linux-mips, linuxppc-dev,
H. Peter Anvin, linux-arm-kernel, linux-kernel, devicetree,
linux-kbuild
Cc: linux-efi
On 4/16/21 12:09 AM, Daniel Walker wrote:
>
> v4 release changes
>
> * Updated insert-sys-cert tool to change command line symbols after
> compilation.
>
> This tool is used to release binary kernels internally to companies
> and then later insert certificates for each product by consumers of
> the binary kernel. Cisco uses this tool for this purpose.
>
> Cisco has a similar need for the command line to be modified on a
> binary released kernels similar to how certificates are setup.
>
> * Added global symbols to hold append and prepend values.
>
> These changes follow the system certificate code to allow the
> insert-sys-cert tool to be used.
>
> * Added a test case to confirm functionality.
>
> Seemed sensible to add this to make sure everything is working.
>
> * Dropped powerpc changes
>
> Christophe Leroy has reservations about the features for powerpc. I
> don't think his reservations are founded, and these changes should
> fully work on powerpc. However, I dropped these changes so Christophe
> can have more time to get comfortable with the changes.
>
>
> Enjoy!
>
>
> Daniel Walker (8):
> CMDLINE: add generic builtin command line
> scripts: insert-sys-cert: add command line insert capability
> scripts: insert-sys-cert: change name to insert-symbol
> CMDLINE: mips: convert to generic builtin command line
> drivers: firmware: efi: libstub: enable generic commandline
> CMDLINE: x86: convert to generic builtin command line
> of: allow sending a NULL value to early_init_dt_scan_chosen
> CMDLINE: arm64: convert to generic builtin command line
>
> arch/arm64/Kconfig | 33 +--
> arch/arm64/include/asm/setup.h | 2 +
> arch/arm64/kernel/idreg-override.c | 9 +-
> arch/mips/Kconfig | 4 +-
> arch/mips/Kconfig.debug | 44 ----
> arch/mips/configs/ar7_defconfig | 9 +-
> arch/mips/configs/bcm47xx_defconfig | 8 +-
> arch/mips/configs/bcm63xx_defconfig | 15 +-
> arch/mips/configs/bmips_be_defconfig | 11 +-
> arch/mips/configs/bmips_stb_defconfig | 11 +-
> arch/mips/configs/capcella_defconfig | 11 +-
> arch/mips/configs/ci20_defconfig | 10 +-
> arch/mips/configs/cu1000-neo_defconfig | 10 +-
> arch/mips/configs/cu1830-neo_defconfig | 10 +-
> arch/mips/configs/e55_defconfig | 4 +-
> arch/mips/configs/generic_defconfig | 6 +-
> arch/mips/configs/gpr_defconfig | 18 +-
> arch/mips/configs/loongson3_defconfig | 13 +-
> arch/mips/configs/mpc30x_defconfig | 7 +-
> arch/mips/configs/tb0219_defconfig | 7 +-
> arch/mips/configs/tb0226_defconfig | 7 +-
> arch/mips/configs/tb0287_defconfig | 7 +-
> arch/mips/configs/workpad_defconfig | 11 +-
> arch/mips/include/asm/setup.h | 2 +
> arch/mips/kernel/relocate.c | 17 +-
> arch/mips/kernel/setup.c | 36 +--
> arch/mips/pic32/pic32mzda/early_console.c | 2 +-
> arch/mips/pic32/pic32mzda/init.c | 3 +-
> arch/x86/Kconfig | 44 +---
> arch/x86/kernel/setup.c | 18 +-
> .../firmware/efi/libstub/efi-stub-helper.c | 29 +++
> drivers/firmware/efi/libstub/efi-stub.c | 9 +
> drivers/firmware/efi/libstub/efistub.h | 1 +
> drivers/firmware/efi/libstub/x86-stub.c | 13 +-
> drivers/of/fdt.c | 44 ++--
> include/linux/cmdline.h | 103 ++++++++
> init/Kconfig | 78 ++++++
> lib/Kconfig | 4 +
> lib/Makefile | 3 +
> lib/generic_cmdline.S | 53 ++++
> lib/test_cmdline1.c | 139 ++++++++++
> scripts/Makefile | 2 +-
> .../{insert-sys-cert.c => insert-symbol.c} | 243 ++++++++++++------
> 43 files changed, 716 insertions(+), 394 deletions(-)
> create mode 100644 include/linux/cmdline.h
> create mode 100644 lib/generic_cmdline.S
> create mode 100644 lib/test_cmdline1.c
> rename scripts/{insert-sys-cert.c => insert-symbol.c} (72%)
>
For an arm64 platform (after rebasing):
Tested-by: Sean Anderson <sean.anderson@seco.com>
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 0/8] generic command line v4
2022-09-22 20:45 ` [PATCH 0/8] generic command line v4 Sean Anderson
@ 2022-09-22 20:53 ` Daniel Walker
2022-09-22 21:03 ` Sean Anderson
0 siblings, 1 reply; 13+ messages in thread
From: Daniel Walker @ 2022-09-22 20:53 UTC (permalink / raw)
To: Sean Anderson
Cc: Will Deacon, Christophe Leroy, Rob Herring, Daniel Gimpelevich,
Andrew Morton, x86, linux-mips, linuxppc-dev, H. Peter Anvin,
linux-arm-kernel, linux-kernel, devicetree, linux-kbuild,
linux-efi
On Thu, Sep 22, 2022 at 04:45:01PM -0400, Sean Anderson wrote:
>
>
>
> For an arm64 platform (after rebasing):
>
> Tested-by: Sean Anderson <sean.anderson@seco.com>
Maybe I'll re-submit it.
Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] generic command line v4
2022-09-22 20:53 ` Daniel Walker
@ 2022-09-22 21:03 ` Sean Anderson
2022-09-22 21:10 ` Daniel Walker
0 siblings, 1 reply; 13+ messages in thread
From: Sean Anderson @ 2022-09-22 21:03 UTC (permalink / raw)
To: Daniel Walker
Cc: Will Deacon, Christophe Leroy, Rob Herring, Daniel Gimpelevich,
Andrew Morton, x86, linux-mips, linuxppc-dev, H. Peter Anvin,
linux-arm-kernel, linux-kernel, devicetree, linux-kbuild,
linux-efi
On 9/22/22 4:53 PM, Daniel Walker wrote:
> On Thu, Sep 22, 2022 at 04:45:01PM -0400, Sean Anderson wrote:
>>
>>
>>
>> For an arm64 platform (after rebasing):
>>
>> Tested-by: Sean Anderson <sean.anderson@seco.com>
>
> Maybe I'll re-submit it.
>
> Daniel
>
There's still no way to extend the command line on ARM64, since the
existing method was removed in anticipation that your series would be
added.
As recently as last month, someone's patch to add such support was
rejected for this reason [1].
--Sean
[1] https://lore.kernel.org/linux-arm-kernel/20220812084613.GA3107@willie-the-truck/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] generic command line v4
2022-09-22 21:03 ` Sean Anderson
@ 2022-09-22 21:10 ` Daniel Walker
2022-09-22 21:15 ` Daniel Gimpelevich
0 siblings, 1 reply; 13+ messages in thread
From: Daniel Walker @ 2022-09-22 21:10 UTC (permalink / raw)
To: Sean Anderson
Cc: Will Deacon, Christophe Leroy, Rob Herring, Daniel Gimpelevich,
Andrew Morton, x86, linux-mips, linuxppc-dev, H. Peter Anvin,
linux-arm-kernel, linux-kernel, devicetree, linux-kbuild,
linux-efi
On Thu, Sep 22, 2022 at 05:03:46PM -0400, Sean Anderson wrote:
>
>
>
> On 9/22/22 4:53 PM, Daniel Walker wrote:
> > On Thu, Sep 22, 2022 at 04:45:01PM -0400, Sean Anderson wrote:
> >>
> >>
> >>
> >> For an arm64 platform (after rebasing):
> >>
> >> Tested-by: Sean Anderson <sean.anderson@seco.com>
> >
> > Maybe I'll re-submit it.
> >
> > Daniel
> >
>
> There's still no way to extend the command line on ARM64, since the
> existing method was removed in anticipation that your series would be
> added.
>
> As recently as last month, someone's patch to add such support was
> rejected for this reason [1].
>
> --Sean
>
> [1] https://lore.kernel.org/linux-arm-kernel/20220812084613.GA3107@willie-the-truck/
I had no idea.. Thanks for pointing that out. I guess I will re-submit in that
case.
Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] generic command line v4
2022-09-22 21:10 ` Daniel Walker
@ 2022-09-22 21:15 ` Daniel Gimpelevich
2022-09-26 22:52 ` Rob Herring
2022-09-26 22:59 ` Daniel Walker
0 siblings, 2 replies; 13+ messages in thread
From: Daniel Gimpelevich @ 2022-09-22 21:15 UTC (permalink / raw)
To: Daniel Walker
Cc: Sean Anderson, Will Deacon, Christophe Leroy, Rob Herring,
Andrew Morton, x86, linux-mips, linuxppc-dev, H. Peter Anvin,
linux-arm-kernel, linux-kernel, devicetree, linux-kbuild,
linux-efi
On Thu, 2022-09-22 at 14:10 -0700, Daniel Walker wrote:
> On Thu, Sep 22, 2022 at 05:03:46PM -0400, Sean Anderson wrote:
[snip]
> > As recently as last month, someone's patch to add such support was
> > rejected for this reason [1].
> >
> > --Sean
> >
> > [1] https://lore.kernel.org/linux-arm-kernel/20220812084613.GA3107@willie-the-truck/
>
>
> I had no idea.. Thanks for pointing that out. I guess I will re-submit in that
> case.
>
> Daniel
This has been happening repeatedly since circa 2014, on multiple
architectures. It's quite frustrating, really.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] generic command line v4
2022-09-22 21:15 ` Daniel Gimpelevich
@ 2022-09-26 22:52 ` Rob Herring
2022-09-26 23:03 ` Daniel Walker
2022-09-26 22:59 ` Daniel Walker
1 sibling, 1 reply; 13+ messages in thread
From: Rob Herring @ 2022-09-26 22:52 UTC (permalink / raw)
To: Daniel Gimpelevich, Daniel Walker
Cc: Sean Anderson, Will Deacon, Christophe Leroy, Andrew Morton, x86,
linux-mips, linuxppc-dev, H. Peter Anvin, linux-arm-kernel,
linux-kernel, devicetree, linux-kbuild, linux-efi
On Thu, Sep 22, 2022 at 4:15 PM Daniel Gimpelevich
<daniel@gimpelevich.san-francisco.ca.us> wrote:
>
> On Thu, 2022-09-22 at 14:10 -0700, Daniel Walker wrote:
> > On Thu, Sep 22, 2022 at 05:03:46PM -0400, Sean Anderson wrote:
> [snip]
> > > As recently as last month, someone's patch to add such support was
> > > rejected for this reason [1].
> > >
> > > --Sean
> > >
> > > [1] https://lore.kernel.org/linux-arm-kernel/20220812084613.GA3107@willie-the-truck/
> >
> >
> > I had no idea.. Thanks for pointing that out. I guess I will re-submit in that
> > case.
> >
> > Daniel
>
> This has been happening repeatedly since circa 2014, on multiple
> architectures. It's quite frustrating, really.
It must not be that important. From the last time, IMO Christophe's
version was much closer to being merged than this series. This is not
how you get things upstream:
> * Dropped powerpc changes
> Christophe Leroy has reservations about the features for powerpc. I
> don't think his reservations are founded, and these changes should
> fully work on powerpc. However, I dropped these changes so Christophe
> can have more time to get comfortable with the changes.
Rob
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] generic command line v4
2022-09-26 22:52 ` Rob Herring
@ 2022-09-26 23:03 ` Daniel Walker
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Walker @ 2022-09-26 23:03 UTC (permalink / raw)
To: Rob Herring
Cc: Daniel Gimpelevich, Sean Anderson, Will Deacon, Christophe Leroy,
Andrew Morton, x86, linux-mips, linuxppc-dev, H. Peter Anvin,
linux-arm-kernel, linux-kernel, devicetree, linux-kbuild,
linux-efi
On Mon, Sep 26, 2022 at 05:52:18PM -0500, Rob Herring wrote:
> On Thu, Sep 22, 2022 at 4:15 PM Daniel Gimpelevich
> <daniel@gimpelevich.san-francisco.ca.us> wrote:
> >
> > On Thu, 2022-09-22 at 14:10 -0700, Daniel Walker wrote:
> > > On Thu, Sep 22, 2022 at 05:03:46PM -0400, Sean Anderson wrote:
> > [snip]
> > > > As recently as last month, someone's patch to add such support was
> > > > rejected for this reason [1].
> > > >
> > > > --Sean
> > > >
> > > > [1] https://lore.kernel.org/linux-arm-kernel/20220812084613.GA3107@willie-the-truck/
> > >
> > >
> > > I had no idea.. Thanks for pointing that out. I guess I will re-submit in that
> > > case.
> > >
> > > Daniel
> >
> > This has been happening repeatedly since circa 2014, on multiple
> > architectures. It's quite frustrating, really.
>
> It must not be that important. From the last time, IMO Christophe's
> version was much closer to being merged than this series. This is not
> how you get things upstream:
>
> > * Dropped powerpc changes
> > Christophe Leroy has reservations about the features for powerpc. I
> > don't think his reservations are founded, and these changes should
> > fully work on powerpc. However, I dropped these changes so Christophe
> > can have more time to get comfortable with the changes.
>
> Rob
I don't submit often enough, that's true. However, I figured maintainers don't
want the changes. This is a common occurrence in industry, people may submit
once or twice, no traction and they give up. I suppose it's a combination of
problems.
Christophe's don't have the same features, so they are really totally different
but conflicting.
Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/8] generic command line v4
2022-09-22 21:15 ` Daniel Gimpelevich
2022-09-26 22:52 ` Rob Herring
@ 2022-09-26 22:59 ` Daniel Walker
1 sibling, 0 replies; 13+ messages in thread
From: Daniel Walker @ 2022-09-26 22:59 UTC (permalink / raw)
To: Daniel Gimpelevich
Cc: Sean Anderson, Will Deacon, Christophe Leroy, Rob Herring,
Andrew Morton, x86, linux-mips, linuxppc-dev, H. Peter Anvin,
linux-arm-kernel, linux-kernel, devicetree, linux-kbuild,
linux-efi
On Thu, Sep 22, 2022 at 02:15:44PM -0700, Daniel Gimpelevich wrote:
> On Thu, 2022-09-22 at 14:10 -0700, Daniel Walker wrote:
> > On Thu, Sep 22, 2022 at 05:03:46PM -0400, Sean Anderson wrote:
> [snip]
> > > As recently as last month, someone's patch to add such support was
> > > rejected for this reason [1].
> > >
> > > --Sean
> > >
> > > [1] https://lore.kernel.org/linux-arm-kernel/20220812084613.GA3107@willie-the-truck/
> >
> >
> > I had no idea.. Thanks for pointing that out. I guess I will re-submit in that
> > case.
> >
> > Daniel
>
> This has been happening repeatedly since circa 2014, on multiple
> architectures. It's quite frustrating, really.
I'm not sure I'm following your comments. What's frustrating exactly ?
Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 0/8] generic command line v5
@ 2022-09-29 2:32 Daniel Walker
2022-09-29 2:32 ` [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol Daniel Walker
0 siblings, 1 reply; 13+ messages in thread
From: Daniel Walker @ 2022-09-29 2:32 UTC (permalink / raw)
To: Will Deacon, Christophe Leroy, Rob Herring, Daniel Gimpelevich,
Andrew Morton, Sean Anderson, H. Peter Anvin, Nick Desaulniers,
linux-arm-kernel, linux-mips, linux-kernel, devicetree,
linux-kbuild
Cc: xe-linux-external, linux-efi
v5 release changes. Generally a rebase from v4.
* Modified OF changes to move the ugly code into the cmdline.h
* Minor compliation update in arm64. Added ifndef __ASSEMBLY__ in
a few places.
* Worked around arm64 kaslr_early.c.
This code needs some additional review and consideration.
It appears this code is missing the opposite option to nokaslr
which is kaslr.disabled=1/0 which would allow kaslr to be turn
back on later in the command line. For example,
console=ttyS0 nokaslr root=/dev/ram0 nosmp kaslr.disabled=0 loglevel=7
On arm64 in arch/arm64/kernel/idreg-override.c this is parsed correctly
to turn on kaslr, but the kaslr_early.c is missing this logic.
Doing this results in kaslr getting disabled with the following message,
KASLR disabled due to lack of seed
Even when there is a seed in the device tree.
So change to the generic command line would leave built in command
lines with nokaslr with no option to re-enable kaslr in in the bootloader
arguments.
Daniel Walker (8):
CMDLINE: add generic builtin command line
scripts: insert-sys-cert: add command line insert capability
scripts: insert-sys-cert: change name to insert-symbol
CMDLINE: mips: convert to generic builtin command line
drivers: firmware: efi: libstub: enable generic commandline
CMDLINE: x86: convert to generic builtin command line
of: replace command line handling
CMDLINE: arm64: convert to generic builtin command line
arch/arm64/Kconfig | 33 +--
arch/arm64/include/asm/setup.h | 4 +
arch/arm64/include/uapi/asm/setup.h | 2 +
arch/arm64/kernel/idreg-override.c | 9 +-
arch/arm64/kernel/pi/kaslr_early.c | 14 +-
arch/mips/Kconfig | 4 +-
arch/mips/Kconfig.debug | 44 ----
arch/mips/configs/ar7_defconfig | 9 +-
arch/mips/configs/bcm47xx_defconfig | 8 +-
arch/mips/configs/bcm63xx_defconfig | 15 +-
arch/mips/configs/bmips_be_defconfig | 11 +-
arch/mips/configs/bmips_stb_defconfig | 6 +-
arch/mips/configs/ci20_defconfig | 9 +-
arch/mips/configs/cu1000-neo_defconfig | 10 +-
arch/mips/configs/cu1830-neo_defconfig | 10 +-
arch/mips/configs/generic_defconfig | 6 +-
arch/mips/configs/gpr_defconfig | 18 +-
arch/mips/configs/loongson3_defconfig | 12 +-
arch/mips/include/asm/setup.h | 2 +
arch/mips/kernel/relocate.c | 17 +-
arch/mips/kernel/setup.c | 36 +--
arch/mips/pic32/pic32mzda/early_console.c | 2 +-
arch/mips/pic32/pic32mzda/init.c | 3 +-
arch/x86/Kconfig | 44 +---
arch/x86/kernel/setup.c | 18 +-
.../firmware/efi/libstub/efi-stub-helper.c | 29 +++
drivers/firmware/efi/libstub/efi-stub.c | 9 +
drivers/firmware/efi/libstub/efistub.h | 1 +
drivers/firmware/efi/libstub/x86-stub.c | 13 +-
drivers/of/fdt.c | 22 +-
include/linux/cmdline.h | 137 ++++++++++
init/Kconfig | 78 ++++++
lib/Kconfig | 4 +
lib/Makefile | 3 +
lib/generic_cmdline.S | 53 ++++
lib/test_cmdline1.c | 139 ++++++++++
scripts/Makefile | 2 +-
.../{insert-sys-cert.c => insert-symbol.c} | 243 ++++++++++++------
38 files changed, 724 insertions(+), 355 deletions(-)
create mode 100644 include/linux/cmdline.h
create mode 100644 lib/generic_cmdline.S
create mode 100644 lib/test_cmdline1.c
rename scripts/{insert-sys-cert.c => insert-symbol.c} (72%)
--
2.25.1
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol
2022-09-29 2:32 [PATCH 0/8] generic command line v5 Daniel Walker
@ 2022-09-29 2:32 ` Daniel Walker
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Walker @ 2022-09-29 2:32 UTC (permalink / raw)
To: Will Deacon, Christophe Leroy, Rob Herring, Daniel Gimpelevich,
Andrew Morton, Sean Anderson, Masahiro Yamada, Michal Marek,
Nick Desaulniers
Cc: xe-linux-external, linux-kbuild, linux-kernel
Since the tool is used to update the command line and/or
to update the certificates, I think it makes sense to
changes the name of this tool.
Update the name of the tool to better reflect it's new use.
Cc: xe-linux-external@cisco.com
Signed-off-by: Daniel Walker <danielwa@cisco.com>
---
scripts/Makefile | 2 +-
scripts/{insert-sys-cert.c => insert-symbol.c} | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename scripts/{insert-sys-cert.c => insert-symbol.c} (99%)
diff --git a/scripts/Makefile b/scripts/Makefile
index f084f08ed176..57a02ccce92c 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -9,7 +9,7 @@ hostprogs-always-$(BUILD_C_RECORDMCOUNT) += recordmcount
hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable
hostprogs-always-$(CONFIG_ASN1) += asn1_compiler
hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
-hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
+hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-symbol
HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
HOSTLDLIBS_sorttable = -lpthread
diff --git a/scripts/insert-sys-cert.c b/scripts/insert-symbol.c
similarity index 99%
rename from scripts/insert-sys-cert.c
rename to scripts/insert-symbol.c
index 77d3306cfbfb..6866e3a84974 100644
--- a/scripts/insert-sys-cert.c
+++ b/scripts/insert-symbol.c
@@ -7,7 +7,7 @@
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
- * Usage: insert-sys-cert [-s <System.map> -b <vmlinux> -c <certfile>
+ * Usage: insert-symbol [-s <System.map> -b <vmlinux> -c <certfile>
*/
#define _GNU_SOURCE
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 0/8] generic command line v6
@ 2023-11-10 1:38 Daniel Walker
2023-11-10 1:38 ` [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol Daniel Walker
0 siblings, 1 reply; 13+ messages in thread
From: Daniel Walker @ 2023-11-10 1:38 UTC (permalink / raw)
To: Will Deacon, Christophe Leroy, Rob Herring, Daniel Gimpelevich,
Andrew Morton, Pratyush Brahma, Tomas Mudrunka, Sean Anderson,
x86, linux-mips, linuxppc-dev, H. Peter Anvin, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier, linux-arm-kernel, linux-kernel,
devicetree, linux-kbuild
Cc: linux-efi
This release is an up-rev of the v5 patches. No additional features have
been added. Some changes were mode to function names and some changes to
Kconfig dependencies. Also updated the config conversion for mips.
There are a number of people who have expressed interest in these
patches either by asking for them to be merge or testing them. If
people are so inclined please continue to request them to be merge
or to ask the status of the next release. It's helpful to motivate me to
release them again and for the maintainers to see the interest
generated.
These patches have been used by Cisco Systems, Inc. on millions of
released products to great effect. Hopefully they can be used by the
entire Linux eco system.
My apologies on the length between releases. I will try to release more
often.
Daniel Walker (8):
CMDLINE: add generic builtin command line
scripts: insert-sys-cert: add command line insert capability
scripts: insert-sys-cert: change name to insert-symbol
CMDLINE: mips: convert to generic builtin command line
drivers: firmware: efi: libstub: enable generic commandline
CMDLINE: x86: convert to generic builtin command line
of: replace command line handling
CMDLINE: arm64: convert to generic builtin command line
arch/arm64/Kconfig | 33 +--
arch/arm64/include/asm/setup.h | 4 +
arch/arm64/include/uapi/asm/setup.h | 2 +
arch/arm64/kernel/idreg-override.c | 9 +-
arch/arm64/kernel/pi/kaslr_early.c | 14 +-
arch/mips/Kconfig | 4 +-
arch/mips/Kconfig.debug | 44 ----
arch/mips/configs/ar7_defconfig | 12 +-
arch/mips/configs/bcm47xx_defconfig | 10 +-
arch/mips/configs/bcm63xx_defconfig | 21 +-
arch/mips/configs/bmips_be_defconfig | 17 +-
arch/mips/configs/bmips_stb_defconfig | 139 ++++------
arch/mips/configs/ci20_defconfig | 8 +-
arch/mips/configs/cu1000-neo_defconfig | 19 +-
arch/mips/configs/cu1830-neo_defconfig | 19 +-
arch/mips/configs/generic_defconfig | 15 +-
arch/mips/configs/gpr_defconfig | 33 +--
arch/mips/configs/loongson3_defconfig | 29 +--
arch/mips/include/asm/setup.h | 2 +
arch/mips/kernel/relocate.c | 17 +-
arch/mips/kernel/setup.c | 36 +--
arch/mips/pic32/pic32mzda/early_console.c | 2 +-
arch/mips/pic32/pic32mzda/init.c | 3 +-
arch/x86/Kconfig | 44 +---
arch/x86/kernel/setup.c | 18 +-
.../firmware/efi/libstub/efi-stub-helper.c | 29 +++
drivers/firmware/efi/libstub/efi-stub.c | 9 +
drivers/firmware/efi/libstub/efistub.h | 1 +
drivers/firmware/efi/libstub/x86-stub.c | 14 +-
drivers/of/fdt.c | 22 +-
include/linux/cmdline.h | 137 ++++++++++
init/Kconfig | 79 ++++++
lib/Kconfig | 4 +
lib/Makefile | 3 +
lib/generic_cmdline.S | 53 ++++
lib/test_cmdline1.c | 139 ++++++++++
scripts/Makefile | 2 +-
.../{insert-sys-cert.c => insert-symbol.c} | 243 ++++++++++++------
38 files changed, 807 insertions(+), 482 deletions(-)
create mode 100644 include/linux/cmdline.h
create mode 100644 lib/generic_cmdline.S
create mode 100644 lib/test_cmdline1.c
rename scripts/{insert-sys-cert.c => insert-symbol.c} (72%)
--
2.39.2
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol
2023-11-10 1:38 [PATCH 0/8] generic command line v6 Daniel Walker
@ 2023-11-10 1:38 ` Daniel Walker
2023-11-23 6:34 ` Christophe Leroy
0 siblings, 1 reply; 13+ messages in thread
From: Daniel Walker @ 2023-11-10 1:38 UTC (permalink / raw)
To: Will Deacon, Christophe Leroy, Rob Herring, Daniel Gimpelevich,
Andrew Morton, Pratyush Brahma, Tomas Mudrunka, Sean Anderson,
x86, linux-mips, linuxppc-dev, Masahiro Yamada, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier
Cc: xe-linux-external, linux-kbuild, linux-kernel
Since the tool is used to update the command line and/or
to update the certificates, I think it makes sense to
changes the name of this tool.
Update the name of the tool to better reflect it's new use.
Cc: xe-linux-external@cisco.com
Signed-off-by: Daniel Walker <danielwa@cisco.com>
---
scripts/Makefile | 2 +-
scripts/{insert-sys-cert.c => insert-symbol.c} | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename scripts/{insert-sys-cert.c => insert-symbol.c} (99%)
diff --git a/scripts/Makefile b/scripts/Makefile
index 576cf64be667..2d7618fa5d6b 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -8,10 +8,10 @@ hostprogs-always-$(BUILD_C_RECORDMCOUNT) += recordmcount
hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable
hostprogs-always-$(CONFIG_ASN1) += asn1_compiler
hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
-hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_builder
hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_gen
always-$(CONFIG_RUST) += target.json
+hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-symbol
filechk_rust_target = $< < include/config/auto.conf
diff --git a/scripts/insert-sys-cert.c b/scripts/insert-symbol.c
similarity index 99%
rename from scripts/insert-sys-cert.c
rename to scripts/insert-symbol.c
index 77d3306cfbfb..6866e3a84974 100644
--- a/scripts/insert-sys-cert.c
+++ b/scripts/insert-symbol.c
@@ -7,7 +7,7 @@
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
- * Usage: insert-sys-cert [-s <System.map> -b <vmlinux> -c <certfile>
+ * Usage: insert-symbol [-s <System.map> -b <vmlinux> -c <certfile>
*/
#define _GNU_SOURCE
--
2.39.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol
2023-11-10 1:38 ` [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol Daniel Walker
@ 2023-11-23 6:34 ` Christophe Leroy
0 siblings, 0 replies; 13+ messages in thread
From: Christophe Leroy @ 2023-11-23 6:34 UTC (permalink / raw)
To: Daniel Walker, Will Deacon, Rob Herring, Daniel Gimpelevich,
Andrew Morton, Pratyush Brahma, Tomas Mudrunka, Sean Anderson,
x86@kernel.org, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, Masahiro Yamada, Nathan Chancellor,
Nick Desaulniers, Nicolas Schier
Cc: xe-linux-external@cisco.com, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org
Le 10/11/2023 à 02:38, Daniel Walker a écrit :
> Since the tool is used to update the command line and/or
> to update the certificates, I think it makes sense to
> changes the name of this tool.
>
> Update the name of the tool to better reflect it's new use.
Should be squashed into previous patch.
>
> Cc: xe-linux-external@cisco.com
> Signed-off-by: Daniel Walker <danielwa@cisco.com>
> ---
> scripts/Makefile | 2 +-
> scripts/{insert-sys-cert.c => insert-symbol.c} | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
> rename scripts/{insert-sys-cert.c => insert-symbol.c} (99%)
>
> diff --git a/scripts/Makefile b/scripts/Makefile
> index 576cf64be667..2d7618fa5d6b 100644
> --- a/scripts/Makefile
> +++ b/scripts/Makefile
> @@ -8,10 +8,10 @@ hostprogs-always-$(BUILD_C_RECORDMCOUNT) += recordmcount
> hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable
> hostprogs-always-$(CONFIG_ASN1) += asn1_compiler
> hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
> -hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
> hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_builder
> hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_gen
> always-$(CONFIG_RUST) += target.json
> +hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-symbol
>
> filechk_rust_target = $< < include/config/auto.conf
>
> diff --git a/scripts/insert-sys-cert.c b/scripts/insert-symbol.c
> similarity index 99%
> rename from scripts/insert-sys-cert.c
> rename to scripts/insert-symbol.c
> index 77d3306cfbfb..6866e3a84974 100644
> --- a/scripts/insert-sys-cert.c
> +++ b/scripts/insert-symbol.c
> @@ -7,7 +7,7 @@
> * This software may be used and distributed according to the terms
> * of the GNU General Public License, incorporated herein by reference.
> *
> - * Usage: insert-sys-cert [-s <System.map> -b <vmlinux> -c <certfile>
> + * Usage: insert-symbol [-s <System.map> -b <vmlinux> -c <certfile>
> */
>
> #define _GNU_SOURCE
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-11-23 6:34 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-16 4:09 [PATCH 0/8] generic command line v4 Daniel Walker
2021-04-16 4:09 ` [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol Daniel Walker
2022-09-22 20:45 ` [PATCH 0/8] generic command line v4 Sean Anderson
2022-09-22 20:53 ` Daniel Walker
2022-09-22 21:03 ` Sean Anderson
2022-09-22 21:10 ` Daniel Walker
2022-09-22 21:15 ` Daniel Gimpelevich
2022-09-26 22:52 ` Rob Herring
2022-09-26 23:03 ` Daniel Walker
2022-09-26 22:59 ` Daniel Walker
-- strict thread matches above, loose matches on Subject: below --
2022-09-29 2:32 [PATCH 0/8] generic command line v5 Daniel Walker
2022-09-29 2:32 ` [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol Daniel Walker
2023-11-10 1:38 [PATCH 0/8] generic command line v6 Daniel Walker
2023-11-10 1:38 ` [PATCH 3/8] scripts: insert-sys-cert: change name to insert-symbol Daniel Walker
2023-11-23 6:34 ` Christophe Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox