[pve-devel] [PATCH installer 1/2] low level: config: filter out kernel cmdline on word boundaries

Christoph Heiss c.heiss at proxmox.com
Wed Aug 21 11:35:19 CEST 2024


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 :^)




More information about the pve-devel mailing list