From: Chris Packham <chris.packham@alliedtelesis.co.nz> Date: 2019-08-01 22:50:16
Bring powerpc in line with other architectures that support extending or
overriding the bootloader provided command line.
The current behaviour is most like CMDLINE_FROM_BOOTLOADER where the
bootloader command line is preferred but the kernel config can provide a
fallback so CMDLINE_FROM_BOOTLOADER is the default. CMDLINE_EXTEND can
be used to append the CMDLINE from the kernel config to the one provided
by the bootloader.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Changes in v3:
- don't use BUG_ON in prom_strlcat
- rearrange things to eliminate prom_strlcpy
Changes in v2:
- incorporate ideas from Christope's patch https://patchwork.ozlabs.org/patch/1074126/
- support CMDLINE_FORCE
arch/powerpc/Kconfig | 20 +++++++++++++++++-
arch/powerpc/kernel/prom_init.c | 36 ++++++++++++++++++++++-----------
2 files changed, 43 insertions(+), 13 deletions(-)
@@ -298,16 +298,24 @@ static char __init *prom_strstr(const char *s1, const char *s2)returnNULL;}-staticsize_t__initprom_strlcpy(char*dest,constchar*src,size_tsize)-{-size_tret=prom_strlen(src);+staticsize_t__initprom_strlcat(char*dest,constchar*src,size_tcount)+{+size_tdsize=prom_strlen(dest);+size_tlen=prom_strlen(src);+size_tres=dsize+len;++/* This would be a bug */+if(dsize>=count)+returncount;++dest+=dsize;+count-=dsize;+if(len>=count)+len=count-1;+memcpy(dest,src,len);+dest[len]=0;+returnres;-if(size){-size_tlen=(ret>=size)?size-1:ret;-memcpy(dest,src,len);-dest[len]='\0';-}-returnret;}#ifdef CONFIG_PPC_PSERIES
Bring powerpc in line with other architectures that support extending or
overriding the bootloader provided command line.
The current behaviour is most like CMDLINE_FROM_BOOTLOADER where the
bootloader command line is preferred but the kernel config can provide a
fallback so CMDLINE_FROM_BOOTLOADER is the default. CMDLINE_EXTEND can
be used to append the CMDLINE from the kernel config to the one provided
by the bootloader.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Christophe Leroy <redacted>
quoted hunk
---
Changes in v3:
- don't use BUG_ON in prom_strlcat
- rearrange things to eliminate prom_strlcpy
Changes in v2:
- incorporate ideas from Christope's patch https://patchwork.ozlabs.org/patch/1074126/
- support CMDLINE_FORCE
arch/powerpc/Kconfig | 20 +++++++++++++++++-
arch/powerpc/kernel/prom_init.c | 36 ++++++++++++++++++++++-----------
2 files changed, 43 insertions(+), 13 deletions(-)
@@ -298,16 +298,24 @@ static char __init *prom_strstr(const char *s1, const char *s2)returnNULL;}-staticsize_t__initprom_strlcpy(char*dest,constchar*src,size_tsize)-{-size_tret=prom_strlen(src);+staticsize_t__initprom_strlcat(char*dest,constchar*src,size_tcount)+{+size_tdsize=prom_strlen(dest);+size_tlen=prom_strlen(src);+size_tres=dsize+len;++/* This would be a bug */+if(dsize>=count)+returncount;++dest+=dsize;+count-=dsize;+if(len>=count)+len=count-1;+memcpy(dest,src,len);+dest[len]=0;+returnres;-if(size){-size_tlen=(ret>=size)?size-1:ret;-memcpy(dest,src,len);-dest[len]='\0';-}-returnret;}#ifdef CONFIG_PPC_PSERIES
From: Chris Packham <Chris.Packham@alliedtelesis.co.nz> Date: 2019-09-26 23:54:13
Hi All,
On Fri, 2019-08-02 at 06:40 +0200, Christophe Leroy wrote:
Le 02/08/2019 à 00:50, Chris Packham a écrit :
quoted
Bring powerpc in line with other architectures that support extending or
overriding the bootloader provided command line.
The current behaviour is most like CMDLINE_FROM_BOOTLOADER where the
bootloader command line is preferred but the kernel config can provide a
fallback so CMDLINE_FROM_BOOTLOADER is the default. CMDLINE_EXTEND can
be used to append the CMDLINE from the kernel config to the one provided
by the bootloader.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Christophe Leroy <redacted>
I see this hasn't hit Linus's tree is it waiting for me to do something
or just fallen off the radar?
quoted
---
Changes in v3:
- don't use BUG_ON in prom_strlcat
- rearrange things to eliminate prom_strlcpy
Changes in v2:
- incorporate ideas from Christope's patch https://patchwork.ozlabs.org/patch/1074126/
- support CMDLINE_FORCE
arch/powerpc/Kconfig | 20 +++++++++++++++++-
arch/powerpc/kernel/prom_init.c | 36 ++++++++++++++++++++++-----------
2 files changed, 43 insertions(+), 13 deletions(-)
@@ -298,16 +298,24 @@ static char __init *prom_strstr(const char *s1, const char *s2)returnNULL;}-staticsize_t__initprom_strlcpy(char*dest,constchar*src,size_tsize)-{-size_tret=prom_strlen(src);+staticsize_t__initprom_strlcat(char*dest,constchar*src,size_tcount)+{+size_tdsize=prom_strlen(dest);+size_tlen=prom_strlen(src);+size_tres=dsize+len;++/* This would be a bug */+if(dsize>=count)+returncount;++dest+=dsize;+count-=dsize;+if(len>=count)+len=count-1;+memcpy(dest,src,len);+dest[len]=0;+returnres;-if(size){-size_tlen=(ret>=size)?size-1:ret;-memcpy(dest,src,len);-dest[len]='\0';-}-returnret;}#ifdef CONFIG_PPC_PSERIES
From: Chris Packham <Chris.Packham@alliedtelesis.co.nz> Date: 2019-11-07 03:18:24
Hi All,
On Fri, 2019-08-02 at 06:40 +0200, Christophe Leroy wrote:
Le 02/08/2019 à 00:50, Chris Packham a écrit :
quoted
Bring powerpc in line with other architectures that support extending or
overriding the bootloader provided command line.
The current behaviour is most like CMDLINE_FROM_BOOTLOADER where the
bootloader command line is preferred but the kernel config can provide a
fallback so CMDLINE_FROM_BOOTLOADER is the default. CMDLINE_EXTEND can
be used to append the CMDLINE from the kernel config to the one provided
by the bootloader.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Christophe Leroy <redacted>
Just going over some old patches this doesn't appear to be in next. Is
there anything stopping it from being accepted?
quoted
---
Changes in v3:
- don't use BUG_ON in prom_strlcat
- rearrange things to eliminate prom_strlcpy
Changes in v2:
- incorporate ideas from Christope's patch https://patchwork.ozlabs.org/patch/1074126/
- support CMDLINE_FORCE
arch/powerpc/Kconfig | 20 +++++++++++++++++-
arch/powerpc/kernel/prom_init.c | 36 ++++++++++++++++++++++-----------
2 files changed, 43 insertions(+), 13 deletions(-)
@@ -298,16 +298,24 @@ static char __init *prom_strstr(const char *s1, const char *s2)returnNULL;}-staticsize_t__initprom_strlcpy(char*dest,constchar*src,size_tsize)-{-size_tret=prom_strlen(src);+staticsize_t__initprom_strlcat(char*dest,constchar*src,size_tcount)+{+size_tdsize=prom_strlen(dest);+size_tlen=prom_strlen(src);+size_tres=dsize+len;++/* This would be a bug */+if(dsize>=count)+returncount;++dest+=dsize;+count-=dsize;+if(len>=count)+len=count-1;+memcpy(dest,src,len);+dest[len]=0;+returnres;-if(size){-size_tlen=(ret>=size)?size-1:ret;-memcpy(dest,src,len);-dest[len]='\0';-}-returnret;}#ifdef CONFIG_PPC_PSERIES
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2019-11-07 11:21:59
Chris Packham [off-list ref] writes:
Hi All,
On Fri, 2019-08-02 at 06:40 +0200, Christophe Leroy wrote:
quoted
Le 02/08/2019 à 00:50, Chris Packham a écrit :
quoted
Bring powerpc in line with other architectures that support extending or
overriding the bootloader provided command line.
The current behaviour is most like CMDLINE_FROM_BOOTLOADER where the
bootloader command line is preferred but the kernel config can provide a
fallback so CMDLINE_FROM_BOOTLOADER is the default. CMDLINE_EXTEND can
be used to append the CMDLINE from the kernel config to the one provided
by the bootloader.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Christophe Leroy <redacted>
Just going over some old patches this doesn't appear to be in next. Is
there anything stopping it from being accepted?
Just me not being overloaded :/, sorry.
Have put it in my next-test branch, which means it should appear in next
in the next few days.
cheers
From: Michael Ellerman <hidden> Date: 2019-11-14 09:07:48
On Thu, 2019-08-01 at 22:50:06 UTC, Chris Packham wrote:
Bring powerpc in line with other architectures that support extending or
overriding the bootloader provided command line.
The current behaviour is most like CMDLINE_FROM_BOOTLOADER where the
bootloader command line is preferred but the kernel config can provide a
fallback so CMDLINE_FROM_BOOTLOADER is the default. CMDLINE_EXTEND can
be used to append the CMDLINE from the kernel config to the one provided
by the bootloader.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>