mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/9] um: Some parameter cleanups
@ 2024-10-11  4:04 Tiwei Bie
  2024-10-11  4:04 ` [PATCH 1/9] um: Remove UML specific debug parameter Tiwei Bie
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Tiwei Bie @ 2024-10-11  4:04 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, linux-kernel, Tiwei Bie

Tiwei Bie (9):
  um: Remove UML specific debug parameter
  um: Do not propagate mem parameter to kernel
  um: Do not propagate uml_dir parameter to kernel
  um: Do not propagate dtb parameter to kernel
  um: Do not propagate noreboot parameter to kernel
  hostfs: Do not propagate hostfs parameter to kernel
  um: hostaudio: Do not propagate dsp parameter to kernel
  um: hostaudio: Do not propagate mixer parameter to kernel
  um: Do not propagate initrd parameter to kernel

 arch/um/drivers/hostaudio_kern.c |  2 ++
 arch/um/kernel/dtb.c             |  1 +
 arch/um/kernel/initrd.c          |  1 +
 arch/um/kernel/physmem.c         |  2 ++
 arch/um/kernel/um_arch.c         | 13 -------------
 arch/um/os-Linux/skas/process.c  |  1 +
 arch/um/os-Linux/umid.c          |  2 ++
 fs/hostfs/hostfs_kern.c          |  1 +
 8 files changed, 10 insertions(+), 13 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/9] um: Remove UML specific debug parameter
  2024-10-11  4:04 [PATCH 0/9] um: Some parameter cleanups Tiwei Bie
@ 2024-10-11  4:04 ` Tiwei Bie
  2024-10-11  4:04 ` [PATCH 2/9] um: Do not propagate mem parameter to kernel Tiwei Bie
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tiwei Bie @ 2024-10-11  4:04 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, linux-kernel, Tiwei Bie

It does nothing but emit a warning when 'debug' is provided in the
kernel command line. It can be a bit annoying, as 'debug' is also a
valid kernel parameter to enable kernel debugging.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
 arch/um/kernel/um_arch.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 38cbb41a64bc..6d755a37d5c4 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -167,19 +167,6 @@ __uml_setup("root=", uml_root_setup,
 "        root=/dev/ubd5\n\n"
 );
 
-static int __init no_skas_debug_setup(char *line, int *add)
-{
-	os_warn("'debug' is not necessary to gdb UML in skas mode - run\n");
-	os_warn("'gdb linux'\n");
-
-	return 0;
-}
-
-__uml_setup("debug", no_skas_debug_setup,
-"debug\n"
-"    this flag is not needed to run gdb on UML in skas mode\n\n"
-);
-
 static int __init uml_console_setup(char *line, int *add)
 {
 	have_console = 1;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/9] um: Do not propagate mem parameter to kernel
  2024-10-11  4:04 [PATCH 0/9] um: Some parameter cleanups Tiwei Bie
  2024-10-11  4:04 ` [PATCH 1/9] um: Remove UML specific debug parameter Tiwei Bie
@ 2024-10-11  4:04 ` Tiwei Bie
  2024-10-11  4:04 ` [PATCH 3/9] um: Do not propagate uml_dir " Tiwei Bie
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tiwei Bie @ 2024-10-11  4:04 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, linux-kernel, Tiwei Bie

This parameter is UML specific and is unknown to kernel. It should not
be propagated to kernel, otherwise it will be passed to user space as
an environment option by kernel with a warning like:

Unknown kernel command line parameters "mem=2G", will be passed to user space.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
 arch/um/kernel/physmem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c
index 636830fe00f2..d60df3626727 100644
--- a/arch/um/kernel/physmem.c
+++ b/arch/um/kernel/physmem.c
@@ -139,6 +139,8 @@ EXPORT_SYMBOL(phys_mapping);
 static int __init uml_mem_setup(char *line, int *add)
 {
 	char *retptr;
+
+	*add = 0;
 	physmem_size = memparse(line,&retptr);
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3/9] um: Do not propagate uml_dir parameter to kernel
  2024-10-11  4:04 [PATCH 0/9] um: Some parameter cleanups Tiwei Bie
  2024-10-11  4:04 ` [PATCH 1/9] um: Remove UML specific debug parameter Tiwei Bie
  2024-10-11  4:04 ` [PATCH 2/9] um: Do not propagate mem parameter to kernel Tiwei Bie
@ 2024-10-11  4:04 ` Tiwei Bie
  2024-10-11  4:04 ` [PATCH 4/9] um: Do not propagate dtb " Tiwei Bie
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tiwei Bie @ 2024-10-11  4:04 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, linux-kernel, Tiwei Bie

This parameter is UML specific and is unknown to kernel. It should not
be propagated to kernel, otherwise it will be passed to user space as
an environment option by kernel with a warning like:

Unknown kernel command line parameters "uml_dir=/foo", will be passed to user space.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
 arch/um/os-Linux/umid.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c
index e09d65b05d1c..eb523ab1e218 100644
--- a/arch/um/os-Linux/umid.c
+++ b/arch/um/os-Linux/umid.c
@@ -358,6 +358,8 @@ char *get_umid(void)
 
 static int __init set_uml_dir(char *name, int *add)
 {
+	*add = 0;
+
 	if (*name == '\0') {
 		os_warn("uml_dir can't be an empty string\n");
 		return 0;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 4/9] um: Do not propagate dtb parameter to kernel
  2024-10-11  4:04 [PATCH 0/9] um: Some parameter cleanups Tiwei Bie
                   ` (2 preceding siblings ...)
  2024-10-11  4:04 ` [PATCH 3/9] um: Do not propagate uml_dir " Tiwei Bie
@ 2024-10-11  4:04 ` Tiwei Bie
  2024-10-11  4:04 ` [PATCH 5/9] um: Do not propagate noreboot " Tiwei Bie
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tiwei Bie @ 2024-10-11  4:04 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, linux-kernel, Tiwei Bie

This parameter is UML specific and is unknown to kernel. It should not
be propagated to kernel, otherwise it will be passed to user space as
an environment option by kernel with a warning like:

Unknown kernel command line parameters "dtb=/foo", will be passed to user space.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
 arch/um/kernel/dtb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/um/kernel/dtb.c b/arch/um/kernel/dtb.c
index 4954188a6a09..73369446ed1e 100644
--- a/arch/um/kernel/dtb.c
+++ b/arch/um/kernel/dtb.c
@@ -31,6 +31,7 @@ void uml_dtb_init(void)
 
 static int __init uml_dtb_setup(char *line, int *add)
 {
+	*add = 0;
 	dtb = line;
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 5/9] um: Do not propagate noreboot parameter to kernel
  2024-10-11  4:04 [PATCH 0/9] um: Some parameter cleanups Tiwei Bie
                   ` (3 preceding siblings ...)
  2024-10-11  4:04 ` [PATCH 4/9] um: Do not propagate dtb " Tiwei Bie
@ 2024-10-11  4:04 ` Tiwei Bie
  2024-10-11  4:04 ` [PATCH 6/9] hostfs: Do not propagate hostfs " Tiwei Bie
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tiwei Bie @ 2024-10-11  4:04 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, linux-kernel, Tiwei Bie

This parameter is UML specific and is unknown to kernel. It should not
be propagated to kernel, otherwise it could be passed to user space as
a command line option by kernel with a warning like:

Unknown kernel command line parameters "noreboot", will be passed to user space.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
 arch/um/os-Linux/skas/process.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 2286486bb0f3..8b328eb9d1f7 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -622,6 +622,7 @@ static bool noreboot;
 
 static int __init noreboot_cmd_param(char *str, int *add)
 {
+	*add = 0;
 	noreboot = true;
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 6/9] hostfs: Do not propagate hostfs parameter to kernel
  2024-10-11  4:04 [PATCH 0/9] um: Some parameter cleanups Tiwei Bie
                   ` (4 preceding siblings ...)
  2024-10-11  4:04 ` [PATCH 5/9] um: Do not propagate noreboot " Tiwei Bie
@ 2024-10-11  4:04 ` Tiwei Bie
  2024-10-11  4:04 ` [PATCH 7/9] um: hostaudio: Do not propagate dsp " Tiwei Bie
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Tiwei Bie @ 2024-10-11  4:04 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, linux-kernel, Tiwei Bie

This parameter is UML specific and is unknown to kernel. It should not
be propagated to kernel, otherwise it will be passed to user space as
an environment option by kernel with a warning like:

Unknown kernel command line parameters "hostfs=/foo", will be passed to user space.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
 fs/hostfs/hostfs_kern.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 6d1cf2436ead..8d47c6b70c9f 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -57,6 +57,7 @@ static int __init hostfs_args(char *options, int *add)
 {
 	char *ptr;
 
+	*add = 0;
 	ptr = strchr(options, ',');
 	if (ptr != NULL)
 		*ptr++ = '\0';
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 7/9] um: hostaudio: Do not propagate dsp parameter to kernel
  2024-10-11  4:04 [PATCH 0/9] um: Some parameter cleanups Tiwei Bie
                   ` (5 preceding siblings ...)
  2024-10-11  4:04 ` [PATCH 6/9] hostfs: Do not propagate hostfs " Tiwei Bie
@ 2024-10-11  4:04 ` Tiwei Bie
  2024-10-11  4:04 ` [PATCH 8/9] um: hostaudio: Do not propagate mixer " Tiwei Bie
  2024-10-11  4:04 ` [PATCH 9/9] um: Do not propagate initrd " Tiwei Bie
  8 siblings, 0 replies; 10+ messages in thread
From: Tiwei Bie @ 2024-10-11  4:04 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, linux-kernel, Tiwei Bie

This parameter is UML specific and is unknown to kernel. It should
not be propagated to kernel, otherwise it will trigger a warning and
be passed to user space as an environment option.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
 arch/um/drivers/hostaudio_kern.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c
index 9d228878cea2..09af903b75ae 100644
--- a/arch/um/drivers/hostaudio_kern.c
+++ b/arch/um/drivers/hostaudio_kern.c
@@ -48,6 +48,7 @@ MODULE_PARM_DESC(mixer, MIXER_HELP);
 #ifndef MODULE
 static int set_dsp(char *name, int *add)
 {
+	*add = 0;
 	dsp = name;
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 8/9] um: hostaudio: Do not propagate mixer parameter to kernel
  2024-10-11  4:04 [PATCH 0/9] um: Some parameter cleanups Tiwei Bie
                   ` (6 preceding siblings ...)
  2024-10-11  4:04 ` [PATCH 7/9] um: hostaudio: Do not propagate dsp " Tiwei Bie
@ 2024-10-11  4:04 ` Tiwei Bie
  2024-10-11  4:04 ` [PATCH 9/9] um: Do not propagate initrd " Tiwei Bie
  8 siblings, 0 replies; 10+ messages in thread
From: Tiwei Bie @ 2024-10-11  4:04 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, linux-kernel, Tiwei Bie

This parameter is UML specific and is unknown to kernel. It should
not be propagated to kernel, otherwise it will trigger a warning and
be passed to user space as an environment option.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
 arch/um/drivers/hostaudio_kern.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c
index 09af903b75ae..0ac149de1ac0 100644
--- a/arch/um/drivers/hostaudio_kern.c
+++ b/arch/um/drivers/hostaudio_kern.c
@@ -57,6 +57,7 @@ __uml_setup("dsp=", set_dsp, "dsp=<dsp device>\n" DSP_HELP);
 
 static int set_mixer(char *name, int *add)
 {
+	*add = 0;
 	mixer = name;
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 9/9] um: Do not propagate initrd parameter to kernel
  2024-10-11  4:04 [PATCH 0/9] um: Some parameter cleanups Tiwei Bie
                   ` (7 preceding siblings ...)
  2024-10-11  4:04 ` [PATCH 8/9] um: hostaudio: Do not propagate mixer " Tiwei Bie
@ 2024-10-11  4:04 ` Tiwei Bie
  8 siblings, 0 replies; 10+ messages in thread
From: Tiwei Bie @ 2024-10-11  4:04 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, linux-kernel, Tiwei Bie

This parameter is UML specific. It specifies the name of the file
containing the initrd image, which is unknown to kernel.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
 arch/um/kernel/initrd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c
index 47b8cb1a1156..99dba827461c 100644
--- a/arch/um/kernel/initrd.c
+++ b/arch/um/kernel/initrd.c
@@ -34,6 +34,7 @@ int __init read_initrd(void)
 
 static int __init uml_initrd_setup(char *line, int *add)
 {
+	*add = 0;
 	initrd = line;
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-10-11  4:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-11  4:04 [PATCH 0/9] um: Some parameter cleanups Tiwei Bie
2024-10-11  4:04 ` [PATCH 1/9] um: Remove UML specific debug parameter Tiwei Bie
2024-10-11  4:04 ` [PATCH 2/9] um: Do not propagate mem parameter to kernel Tiwei Bie
2024-10-11  4:04 ` [PATCH 3/9] um: Do not propagate uml_dir " Tiwei Bie
2024-10-11  4:04 ` [PATCH 4/9] um: Do not propagate dtb " Tiwei Bie
2024-10-11  4:04 ` [PATCH 5/9] um: Do not propagate noreboot " Tiwei Bie
2024-10-11  4:04 ` [PATCH 6/9] hostfs: Do not propagate hostfs " Tiwei Bie
2024-10-11  4:04 ` [PATCH 7/9] um: hostaudio: Do not propagate dsp " Tiwei Bie
2024-10-11  4:04 ` [PATCH 8/9] um: hostaudio: Do not propagate mixer " Tiwei Bie
2024-10-11  4:04 ` [PATCH 9/9] um: Do not propagate initrd " Tiwei Bie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®