* [pve-devel] [PATCH installer 0/2] properly filter out all installer-related kernel arguments
@ 2024-08-09 11:51 Christoph Heiss
2024-08-09 11:51 ` [pve-devel] [PATCH installer 1/2] low level: config: filter out kernel cmdline on word boundaries Christoph Heiss
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Christoph Heiss @ 2024-08-09 11:51 UTC (permalink / raw)
To: pve-devel
Friedrich recently reported that when installing using the
auto-installer, the kernel commandline does not get cleaned up properly.
For building/testing on current master, [0] needs to be applied
beforehand to fix a test failure.
[0] https://lists.proxmox.com/pipermail/pve-devel/2024-July/064815.html
Christoph Heiss (2):
low level: config: filter out kernel cmdline on word boundaries
low level: config: filter out all installer-related kernel arguments
Proxmox/Install/Config.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--
2.45.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [pve-devel] [PATCH installer 1/2] low level: config: filter out kernel cmdline on word boundaries
2024-08-09 11:51 [pve-devel] [PATCH installer 0/2] properly filter out all installer-related kernel arguments Christoph Heiss
@ 2024-08-09 11:51 ` Christoph Heiss
2024-08-14 10:51 ` Alexander Zeidler
2024-08-09 11:51 ` [pve-devel] [PATCH installer 2/2] low level: config: filter out all installer-related kernel arguments Christoph Heiss
2024-08-21 13:24 ` [pve-devel] [PATCH installer 0/2] properly " Christoph Heiss
2 siblings, 1 reply; 6+ messages in thread
From: Christoph Heiss @ 2024-08-09 11:51 UTC (permalink / raw)
To: pve-devel
Otherwise, substrings might get replaced, e.g. the replacement
`proxmox-start-auto-installer` -> `pxmox-start-auto-installer` would be
done.
Fixes: a02a78a ("fix #4747: pass kernel cmdline parameters to target system")
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Proxmox/Install/Config.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Proxmox/Install/Config.pm b/Proxmox/Install/Config.pm
index ae70093..6b064b1 100644
--- a/Proxmox/Install/Config.pm
+++ b/Proxmox/Install/Config.pm
@@ -43,8 +43,8 @@ my sub parse_kernel_cmdline {
}
}
- $cmdline =~ s/(?:BOOT_IMAGE|root|ramdisk_size|splash|vga)=\S+\s?//gi;
- $cmdline =~ s/ro|rw|quiet|proxdebug|proxtui|nomodeset//gi;
+ $cmdline =~ s/\b(?:BOOT_IMAGE|root|ramdisk_size|splash|vga)=\S+\s?\b//gi;
+ $cmdline =~ s/\bro|rw|quiet|proxdebug|proxtui|nomodeset\b//gi;
$cfg->{target_cmdline}= $cmdline;
--
2.45.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pve-devel] [PATCH installer 1/2] low level: config: filter out kernel cmdline on word boundaries
2024-08-09 11:51 ` [pve-devel] [PATCH installer 1/2] low level: config: filter out kernel cmdline on word boundaries Christoph Heiss
@ 2024-08-14 10:51 ` Alexander Zeidler
2024-08-21 9:35 ` Christoph Heiss
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Zeidler @ 2024-08-14 10:51 UTC (permalink / raw)
To: Proxmox VE development discussion
On Fri Aug 9, 2024 at 1:51 PM CEST, Christoph Heiss wrote:
> Otherwise, substrings might get replaced, e.g. the replacement
> `proxmox-start-auto-installer` -> `pxmox-start-auto-installer` would be
> done.
>
> Fixes: a02a78a ("fix #4747: pass kernel cmdline parameters to target system")
> Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
> Proxmox/Install/Config.pm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Proxmox/Install/Config.pm b/Proxmox/Install/Config.pm
> index ae70093..6b064b1 100644
> --- a/Proxmox/Install/Config.pm
> +++ b/Proxmox/Install/Config.pm
> @@ -43,8 +43,8 @@ my sub parse_kernel_cmdline {
> }
> }
>
> - $cmdline =~ s/(?:BOOT_IMAGE|root|ramdisk_size|splash|vga)=\S+\s?//gi;
> - $cmdline =~ s/ro|rw|quiet|proxdebug|proxtui|nomodeset//gi;
> + $cmdline =~ s/\b(?:BOOT_IMAGE|root|ramdisk_size|splash|vga)=\S+\s?\b//gi;
> + $cmdline =~ s/\bro|rw|quiet|proxdebug|proxtui|nomodeset\b//gi;
There are parentheses missing next to \b .
The current implementation seems not to be strict enough when dealing
with variables. For example, the variable regex would not match
something like 'apic=quiet', but then the second regex matches wrongly
'quiet'.
>
> $cfg->{target_cmdline}= $cmdline;
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pve-devel] [PATCH installer 1/2] low level: config: filter out kernel cmdline on word boundaries
2024-08-14 10:51 ` Alexander Zeidler
@ 2024-08-21 9:35 ` Christoph Heiss
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Heiss @ 2024-08-21 9:35 UTC (permalink / raw)
To: Alexander Zeidler; +Cc: Proxmox VE development discussion
Thanks for the review!
On Wed, Aug 14, 2024 at 12:51:27PM GMT, Alexander Zeidler wrote:
> On Fri Aug 9, 2024 at 1:51 PM CEST, Christoph Heiss wrote:
> > [..]
> > diff --git a/Proxmox/Install/Config.pm b/Proxmox/Install/Config.pm
> > index ae70093..6b064b1 100644
> > --- a/Proxmox/Install/Config.pm
> > +++ b/Proxmox/Install/Config.pm
> > @@ -43,8 +43,8 @@ my sub parse_kernel_cmdline {
> > }
> > }
> >
> > - $cmdline =~ s/(?:BOOT_IMAGE|root|ramdisk_size|splash|vga)=\S+\s?//gi;
> > - $cmdline =~ s/ro|rw|quiet|proxdebug|proxtui|nomodeset//gi;
> > + $cmdline =~ s/\b(?:BOOT_IMAGE|root|ramdisk_size|splash|vga)=\S+\s?\b//gi;
>
> > + $cmdline =~ s/\bro|rw|quiet|proxdebug|proxtui|nomodeset\b//gi;
> There are parentheses missing next to \b .
>
> The current implementation seems not to be strict enough when dealing
> with variables. For example, the variable regex would not match
> something like 'apic=quiet', but then the second regex matches wrongly
> 'quiet'.
Good catch! There are indeed some parentheses missing here :^)
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [pve-devel] [PATCH installer 2/2] low level: config: filter out all installer-related kernel arguments
2024-08-09 11:51 [pve-devel] [PATCH installer 0/2] properly filter out all installer-related kernel arguments Christoph Heiss
2024-08-09 11:51 ` [pve-devel] [PATCH installer 1/2] low level: config: filter out kernel cmdline on word boundaries Christoph Heiss
@ 2024-08-09 11:51 ` Christoph Heiss
2024-08-21 13:24 ` [pve-devel] [PATCH installer 0/2] properly " Christoph Heiss
2 siblings, 0 replies; 6+ messages in thread
From: Christoph Heiss @ 2024-08-09 11:51 UTC (permalink / raw)
To: pve-devel
For one, include the auto-installer arguments, which weren't filtered
out before. Secondely, include the aliases as introduced in [0].
[0] de7f779 ("unconfigured: accept more telling boot cmdline option names")
Reported-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Proxmox/Install/Config.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Proxmox/Install/Config.pm b/Proxmox/Install/Config.pm
index 6b064b1..976f7a1 100644
--- a/Proxmox/Install/Config.pm
+++ b/Proxmox/Install/Config.pm
@@ -44,7 +44,8 @@ my sub parse_kernel_cmdline {
}
$cmdline =~ s/\b(?:BOOT_IMAGE|root|ramdisk_size|splash|vga)=\S+\s?\b//gi;
- $cmdline =~ s/\bro|rw|quiet|proxdebug|proxtui|nomodeset\b//gi;
+ $cmdline =~ s/\bro|rw|quiet|nomodeset\b//gi;
+ $cmdline =~ s/\bprox(debug|tui|auto)|proxmox-\S+\b//gi;
$cfg->{target_cmdline}= $cmdline;
--
2.45.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pve-devel] [PATCH installer 0/2] properly filter out all installer-related kernel arguments
2024-08-09 11:51 [pve-devel] [PATCH installer 0/2] properly filter out all installer-related kernel arguments Christoph Heiss
2024-08-09 11:51 ` [pve-devel] [PATCH installer 1/2] low level: config: filter out kernel cmdline on word boundaries Christoph Heiss
2024-08-09 11:51 ` [pve-devel] [PATCH installer 2/2] low level: config: filter out all installer-related kernel arguments Christoph Heiss
@ 2024-08-21 13:24 ` Christoph Heiss
2 siblings, 0 replies; 6+ messages in thread
From: Christoph Heiss @ 2024-08-21 13:24 UTC (permalink / raw)
To: Proxmox VE development discussion
v2 out: https://lists.proxmox.com/pipermail/pve-devel/2024-August/065186.html
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-08-21 13:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-09 11:51 [pve-devel] [PATCH installer 0/2] properly filter out all installer-related kernel arguments Christoph Heiss
2024-08-09 11:51 ` [pve-devel] [PATCH installer 1/2] low level: config: filter out kernel cmdline on word boundaries Christoph Heiss
2024-08-14 10:51 ` Alexander Zeidler
2024-08-21 9:35 ` Christoph Heiss
2024-08-09 11:51 ` [pve-devel] [PATCH installer 2/2] low level: config: filter out all installer-related kernel arguments Christoph Heiss
2024-08-21 13:24 ` [pve-devel] [PATCH installer 0/2] properly " Christoph Heiss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox