This all came up in the context of increasing COMMAND_LINE_SIZE in the
RISC-V port. In theory that's a UABI break, as COMMAND_LINE_SIZE is the
maximum length of /proc/cmdline and userspace could staticly rely on
that to be correct.
Usually I wouldn't mess around with changing this sort of thing, but
PowerPC increased it with a5980d064fe2 ("powerpc: Bump COMMAND_LINE_SIZE
to 2048"). There are also a handful of examples of COMMAND_LINE_SIZE
increasing, but they're from before the UAPI split so I'm not quite sure
what that means: e5a6a1c90948 ("powerpc: derive COMMAND_LINE_SIZE from
asm-generic"), 684d2fd48e71 ("[S390] kernel: Append scpdata to kernel
boot command line"), 22242681cff5 ("MIPS: Extend COMMAND_LINE_SIZE"),
and 2b74b85693c7 ("sh: Derive COMMAND_LINE_SIZE from
asm-generic/setup.h.").
It seems to me like COMMAND_LINE_SIZE really just shouldn't have been
part of the uapi to begin with, and userspace should be able to handle
/proc/cmdline of whatever length it turns out to be. I don't see any
references to COMMAND_LINE_SIZE anywhere but Linux via a quick Google
search, but that's not really enough to consider it unused on my end.
The feedback on the v1 seemed to indicate that COMMAND_LINE_SIZE really
shouldn't be part of uapi, so this now touches all the ports. I've
tried to split this all out and leave it bisectable, but I haven't
tested it all that aggressively.
Changes since v1 <https://lore.kernel.org/all/[email protected]/>:
* Touches every arch.
Signed-off-by: Palmer Dabbelt <[email protected]>
---
arch/alpha/include/uapi/asm/setup.h | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 arch/alpha/include/uapi/asm/setup.h
diff --git a/arch/alpha/include/uapi/asm/setup.h b/arch/alpha/include/uapi/asm/setup.h
deleted file mode 100644
index 9b3b5ba39b1d..000000000000
--- a/arch/alpha/include/uapi/asm/setup.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _UAPI__ALPHA_SETUP_H
-#define _UAPI__ALPHA_SETUP_H
-
-#endif /* _UAPI__ALPHA_SETUP_H */
--
2.38.1
Signed-off-by: Palmer Dabbelt <[email protected]>
---
arch/sparc/include/uapi/asm/setup.h | 9 ---------
1 file changed, 9 deletions(-)
delete mode 100644 arch/sparc/include/uapi/asm/setup.h
diff --git a/arch/sparc/include/uapi/asm/setup.h b/arch/sparc/include/uapi/asm/setup.h
deleted file mode 100644
index c3cf1b0d30b3..000000000000
--- a/arch/sparc/include/uapi/asm/setup.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Just a place holder.
- */
-
-#ifndef _UAPI_SPARC_SETUP_H
-#define _UAPI_SPARC_SETUP_H
-
-#endif /* _UAPI_SPARC_SETUP_H */
--
2.38.1
As far as I can tell this is not used by userspace and thus should not
be part of the user-visible API.
Signed-off-by: Palmer Dabbelt <[email protected]>
---
This leaves an empty <uapi/asm/setup.h>, which will soon be cleaned up.
---
arch/powerpc/include/asm/setup.h | 2 +-
arch/powerpc/include/uapi/asm/setup.h | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h
index e29e83f8a89c..31786d1db2ef 100644
--- a/arch/powerpc/include/asm/setup.h
+++ b/arch/powerpc/include/asm/setup.h
@@ -2,7 +2,7 @@
#ifndef _ASM_POWERPC_SETUP_H
#define _ASM_POWERPC_SETUP_H
-#include <uapi/asm/setup.h>
+#define COMMAND_LINE_SIZE 2048
#ifndef __ASSEMBLY__
extern void ppc_printk_progress(char *s, unsigned short hex);
diff --git a/arch/powerpc/include/uapi/asm/setup.h b/arch/powerpc/include/uapi/asm/setup.h
index c54940b09d06..f2ca747aa45b 100644
--- a/arch/powerpc/include/uapi/asm/setup.h
+++ b/arch/powerpc/include/uapi/asm/setup.h
@@ -2,6 +2,4 @@
#ifndef _UAPI_ASM_POWERPC_SETUP_H
#define _UAPI_ASM_POWERPC_SETUP_H
-#define COMMAND_LINE_SIZE 2048
-
#endif /* _UAPI_ASM_POWERPC_SETUP_H */
--
2.38.1
Signed-off-by: Palmer Dabbelt <[email protected]>
---
arch/parisc/include/uapi/asm/setup.h | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 arch/parisc/include/uapi/asm/setup.h
diff --git a/arch/parisc/include/uapi/asm/setup.h b/arch/parisc/include/uapi/asm/setup.h
deleted file mode 100644
index bfad89428e47..000000000000
--- a/arch/parisc/include/uapi/asm/setup.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _PARISC_SETUP_H
-#define _PARISC_SETUP_H
-
-#endif /* _PARISC_SETUP_H */
--
2.38.1
As far as I can tell this is not used by userspace and thus should not
be part of the user-visible API.
Signed-off-by: Palmer Dabbelt <[email protected]>
---
This leaves an empty <uapi/asm/setup.h>, which will soon be cleaned up.
---
arch/xtensa/include/asm/setup.h | 17 +++++++++++++++++
arch/xtensa/include/uapi/asm/setup.h | 2 --
2 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 arch/xtensa/include/asm/setup.h
diff --git a/arch/xtensa/include/asm/setup.h b/arch/xtensa/include/asm/setup.h
new file mode 100644
index 000000000000..5356a5fd4d17
--- /dev/null
+++ b/arch/xtensa/include/asm/setup.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * include/asm-xtensa/setup.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 - 2005 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_SETUP_H
+#define _XTENSA_SETUP_H
+
+#define COMMAND_LINE_SIZE 256
+
+#endif
diff --git a/arch/xtensa/include/uapi/asm/setup.h b/arch/xtensa/include/uapi/asm/setup.h
index 5356a5fd4d17..6f982394684a 100644
--- a/arch/xtensa/include/uapi/asm/setup.h
+++ b/arch/xtensa/include/uapi/asm/setup.h
@@ -12,6 +12,4 @@
#ifndef _XTENSA_SETUP_H
#define _XTENSA_SETUP_H
-#define COMMAND_LINE_SIZE 256
-
#endif
--
2.38.1
Signed-off-by: Palmer Dabbelt <[email protected]>
---
arch/microblaze/include/uapi/asm/setup.h | 18 ------------------
1 file changed, 18 deletions(-)
delete mode 100644 arch/microblaze/include/uapi/asm/setup.h
diff --git a/arch/microblaze/include/uapi/asm/setup.h b/arch/microblaze/include/uapi/asm/setup.h
deleted file mode 100644
index 51aed65880e7..000000000000
--- a/arch/microblaze/include/uapi/asm/setup.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Copyright (C) 2007-2009 Michal Simek <[email protected]>
- * Copyright (C) 2007-2009 PetaLogix
- * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-
-#ifndef _UAPI_ASM_MICROBLAZE_SETUP_H
-#define _UAPI_ASM_MICROBLAZE_SETUP_H
-
-# ifndef __ASSEMBLY__
-
-# endif /* __ASSEMBLY__ */
-#endif /* _UAPI_ASM_MICROBLAZE_SETUP_H */
--
2.38.1
Signed-off-by: Palmer Dabbelt <[email protected]>
---
arch/m68k/include/uapi/asm/setup.h | 15 ---------------
1 file changed, 15 deletions(-)
delete mode 100644 arch/m68k/include/uapi/asm/setup.h
diff --git a/arch/m68k/include/uapi/asm/setup.h b/arch/m68k/include/uapi/asm/setup.h
deleted file mode 100644
index 005593acc7d8..000000000000
--- a/arch/m68k/include/uapi/asm/setup.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
-** asm/setup.h -- Definition of the Linux/m68k setup information
-**
-** Copyright 1992 by Greg Harp
-**
-** This file is subject to the terms and conditions of the GNU General Public
-** License. See the file COPYING in the main directory of this archive
-** for more details.
-*/
-
-#ifndef _UAPI_M68K_SETUP_H
-#define _UAPI_M68K_SETUP_H
-
-#endif /* _UAPI_M68K_SETUP_H */
--
2.38.1
Signed-off-by: Palmer Dabbelt <[email protected]>
---
arch/arm64/include/uapi/asm/setup.h | 25 -------------------------
1 file changed, 25 deletions(-)
delete mode 100644 arch/arm64/include/uapi/asm/setup.h
diff --git a/arch/arm64/include/uapi/asm/setup.h b/arch/arm64/include/uapi/asm/setup.h
deleted file mode 100644
index f9f51e5925aa..000000000000
--- a/arch/arm64/include/uapi/asm/setup.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Based on arch/arm/include/asm/setup.h
- *
- * Copyright (C) 1997-1999 Russell King
- * Copyright (C) 2012 ARM Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef __ASM_SETUP_H
-#define __ASM_SETUP_H
-
-#include <linux/types.h>
-
-#endif
--
2.38.1
As far as I can tell this is not used by userspace and thus should not
be part of the user-visible API.
Signed-off-by: Palmer Dabbelt <[email protected]>
---
This leaves an empty <uapi/asm/setup.h>, which will soon be cleaned up.
---
arch/sparc/include/asm/setup.h | 6 +++++-
arch/sparc/include/uapi/asm/setup.h | 7 -------
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h
index 72205684e51e..d1384ed92547 100644
--- a/arch/sparc/include/asm/setup.h
+++ b/arch/sparc/include/asm/setup.h
@@ -7,7 +7,11 @@
#include <linux/interrupt.h>
-#include <uapi/asm/setup.h>
+#if defined(__sparc__) && defined(__arch64__)
+# define COMMAND_LINE_SIZE 2048
+#else
+# define COMMAND_LINE_SIZE 256
+#endif
extern char reboot_command[];
diff --git a/arch/sparc/include/uapi/asm/setup.h b/arch/sparc/include/uapi/asm/setup.h
index 3c208a4dd464..c3cf1b0d30b3 100644
--- a/arch/sparc/include/uapi/asm/setup.h
+++ b/arch/sparc/include/uapi/asm/setup.h
@@ -6,11 +6,4 @@
#ifndef _UAPI_SPARC_SETUP_H
#define _UAPI_SPARC_SETUP_H
-#if defined(__sparc__) && defined(__arch64__)
-# define COMMAND_LINE_SIZE 2048
-#else
-# define COMMAND_LINE_SIZE 256
-#endif
-
-
#endif /* _UAPI_SPARC_SETUP_H */
--
2.38.1
Signed-off-by: Palmer Dabbelt <[email protected]>
---
arch/s390/include/asm/setup.h | 1 -
arch/s390/include/uapi/asm/setup.h | 1 -
2 files changed, 2 deletions(-)
delete mode 100644 arch/s390/include/uapi/asm/setup.h
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h
index 77e6506898f5..e41611c98825 100644
--- a/arch/s390/include/asm/setup.h
+++ b/arch/s390/include/asm/setup.h
@@ -7,7 +7,6 @@
#define _ASM_S390_SETUP_H
#include <linux/bits.h>
-#include <uapi/asm/setup.h>
#include <linux/build_bug.h>
#define PARMAREA 0x10400
diff --git a/arch/s390/include/uapi/asm/setup.h b/arch/s390/include/uapi/asm/setup.h
deleted file mode 100644
index 598d769e76df..000000000000
--- a/arch/s390/include/uapi/asm/setup.h
+++ /dev/null
@@ -1 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
--
2.38.1
CC linux-m68k
On Sun, Dec 11, 2022 at 7:20 AM Palmer Dabbelt <[email protected]> wrote:
>
> Signed-off-by: Palmer Dabbelt <[email protected]>
> ---
> arch/m68k/include/uapi/asm/setup.h | 15 ---------------
> 1 file changed, 15 deletions(-)
> delete mode 100644 arch/m68k/include/uapi/asm/setup.h
>
> diff --git a/arch/m68k/include/uapi/asm/setup.h b/arch/m68k/include/uapi/asm/setup.h
> deleted file mode 100644
> index 005593acc7d8..000000000000
> --- a/arch/m68k/include/uapi/asm/setup.h
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> -/*
> -** asm/setup.h -- Definition of the Linux/m68k setup information
> -**
> -** Copyright 1992 by Greg Harp
> -**
> -** This file is subject to the terms and conditions of the GNU General Public
> -** License. See the file COPYING in the main directory of this archive
> -** for more details.
> -*/
> -
> -#ifndef _UAPI_M68K_SETUP_H
> -#define _UAPI_M68K_SETUP_H
> -
> -#endif /* _UAPI_M68K_SETUP_H */
> --
> 2.38.1
Hi,
On 12/11/22 07:13, Palmer Dabbelt wrote:
> This all came up in the context of increasing COMMAND_LINE_SIZE in the
> RISC-V port. In theory that's a UABI break, as COMMAND_LINE_SIZE is the
> maximum length of /proc/cmdline and userspace could staticly rely on
> that to be correct.
>
> Usually I wouldn't mess around with changing this sort of thing, but
> PowerPC increased it with a5980d064fe2 ("powerpc: Bump COMMAND_LINE_SIZE
> to 2048"). There are also a handful of examples of COMMAND_LINE_SIZE
> increasing, but they're from before the UAPI split so I'm not quite sure
> what that means: e5a6a1c90948 ("powerpc: derive COMMAND_LINE_SIZE from
> asm-generic"), 684d2fd48e71 ("[S390] kernel: Append scpdata to kernel
> boot command line"), 22242681cff5 ("MIPS: Extend COMMAND_LINE_SIZE"),
> and 2b74b85693c7 ("sh: Derive COMMAND_LINE_SIZE from
> asm-generic/setup.h.").
>
> It seems to me like COMMAND_LINE_SIZE really just shouldn't have been
> part of the uapi to begin with, and userspace should be able to handle
> /proc/cmdline of whatever length it turns out to be. I don't see any
> references to COMMAND_LINE_SIZE anywhere but Linux via a quick Google
> search, but that's not really enough to consider it unused on my end.
>
> The feedback on the v1 seemed to indicate that COMMAND_LINE_SIZE really
> shouldn't be part of uapi, so this now touches all the ports. I've
> tried to split this all out and leave it bisectable, but I haven't
> tested it all that aggressively.
>
> Changes since v1 <https://lore.kernel.org/all/[email protected]/>:
> * Touches every arch.
>
>
The command line size is still an issue on riscv, any comment on this so
we can make progress?
Thanks,
Alex
On Fri, Feb 10, 2023, at 18:10, Alexandre Ghiti wrote:
> On 12/11/22 07:13, Palmer Dabbelt wrote:
>> This all came up in the context of increasing COMMAND_LINE_SIZE in the
>> RISC-V port. In theory that's a UABI break, as COMMAND_LINE_SIZE is the
>> maximum length of /proc/cmdline and userspace could staticly rely on
>> that to be correct.
>>
>> Usually I wouldn't mess around with changing this sort of thing, but
>> PowerPC increased it with a5980d064fe2 ("powerpc: Bump COMMAND_LINE_SIZE
>> to 2048"). There are also a handful of examples of COMMAND_LINE_SIZE
>> increasing, but they're from before the UAPI split so I'm not quite sure
>> what that means: e5a6a1c90948 ("powerpc: derive COMMAND_LINE_SIZE from
>> asm-generic"), 684d2fd48e71 ("[S390] kernel: Append scpdata to kernel
>> boot command line"), 22242681cff5 ("MIPS: Extend COMMAND_LINE_SIZE"),
>> and 2b74b85693c7 ("sh: Derive COMMAND_LINE_SIZE from
>> asm-generic/setup.h.").
>>
>> It seems to me like COMMAND_LINE_SIZE really just shouldn't have been
>> part of the uapi to begin with, and userspace should be able to handle
>> /proc/cmdline of whatever length it turns out to be. I don't see any
>> references to COMMAND_LINE_SIZE anywhere but Linux via a quick Google
>> search, but that's not really enough to consider it unused on my end.
>>
>> The feedback on the v1 seemed to indicate that COMMAND_LINE_SIZE really
>> shouldn't be part of uapi, so this now touches all the ports. I've
>> tried to split this all out and leave it bisectable, but I haven't
>> tested it all that aggressively.
>>
>> Changes since v1 <https://lore.kernel.org/all/[email protected]/>:
>> * Touches every arch.
>>
>>
>
> The command line size is still an issue on riscv, any comment on this so
> we can make progress?
I think this makes sense overall, but I see there were a couple
of architecture specific regressions introduced in v2 that should
be resolved, see
https://lore.kernel.org/all/[email protected]/
for the archive of this thread.
Arnd
On 2/10/23 20:37, Arnd Bergmann wrote:
> On Fri, Feb 10, 2023, at 18:10, Alexandre Ghiti wrote:
>> On 12/11/22 07:13, Palmer Dabbelt wrote:
>>> This all came up in the context of increasing COMMAND_LINE_SIZE in the
>>> RISC-V port. In theory that's a UABI break, as COMMAND_LINE_SIZE is the
>>> maximum length of /proc/cmdline and userspace could staticly rely on
>>> that to be correct.
>>>
>>> Usually I wouldn't mess around with changing this sort of thing, but
>>> PowerPC increased it with a5980d064fe2 ("powerpc: Bump COMMAND_LINE_SIZE
>>> to 2048"). There are also a handful of examples of COMMAND_LINE_SIZE
>>> increasing, but they're from before the UAPI split so I'm not quite sure
>>> what that means: e5a6a1c90948 ("powerpc: derive COMMAND_LINE_SIZE from
>>> asm-generic"), 684d2fd48e71 ("[S390] kernel: Append scpdata to kernel
>>> boot command line"), 22242681cff5 ("MIPS: Extend COMMAND_LINE_SIZE"),
>>> and 2b74b85693c7 ("sh: Derive COMMAND_LINE_SIZE from
>>> asm-generic/setup.h.").
>>>
>>> It seems to me like COMMAND_LINE_SIZE really just shouldn't have been
>>> part of the uapi to begin with, and userspace should be able to handle
>>> /proc/cmdline of whatever length it turns out to be. I don't see any
>>> references to COMMAND_LINE_SIZE anywhere but Linux via a quick Google
>>> search, but that's not really enough to consider it unused on my end.
>>>
>>> The feedback on the v1 seemed to indicate that COMMAND_LINE_SIZE really
>>> shouldn't be part of uapi, so this now touches all the ports. I've
>>> tried to split this all out and leave it bisectable, but I haven't
>>> tested it all that aggressively.
>>>
>>> Changes since v1 <https://lore.kernel.org/all/[email protected]/>:
>>> * Touches every arch.
>>>
>>>
>> The command line size is still an issue on riscv, any comment on this so
>> we can make progress?
> I think this makes sense overall, but I see there were a couple
> of architecture specific regressions introduced in v2 that should
> be resolved, see
>
> https://lore.kernel.org/all/[email protected]/
Thanks, I had not noticed those failures. I'll take over and send a v3
that fixes that,
Thanks again,
Alex
>
> for the archive of this thread.
>
> Arnd