On 23/05/25 22:22, Shreenidhi Shedi wrote:
On 20/05/25 19:15, Daniel Kiper wrote:
On Mon, May 19, 2025 at 11:49:55PM +0530, Shreenidhi Shedi wrote:
From: Shreenidhi Shedi <shreenidhi.sh...@broadcom.com>
Previously, the command line construction function
(grub_create_loader_cmdline) escaped single and double quotes, which is
unnecessary and potentially problematic since the kernel command line
handler does not support escaped quotes. This patch removes the escaping
of these characters, ensuring that the constructed command line is
passed to the kernel as intended.
For example:
In /boot/grub/grub.cfg
...
set user_cmdline="dyndbg='+p; func smp_callin -p'"
...
menuentry "Photon" {
linux /boot/$photon_linux root=$rootpartition $photon_cmdline
$systemd_cmdline $user_cmdline
if [ -f /boot/$photon_initrd ]; then
initrd /boot/$photon_initrd
fi
}
...
Post reboot,
$ cat /proc/cmdline
... dyndbg=\'+p; func smp_callin -p\'
AFIACT Vladimir has more complete fix for this issue. I asked him to
post it once again...
Daniel
Hi Daniel,
Can you please add Vladimir to this thread? This is a regression and if
we can get a better fix, I can test it and provide an update.
Hi Daniel and Vladimir,
I tested the Vladimir's patch which he gave at
https://lists.gnu.org/archive/html/grub-devel/2025-05/msg00182.html
I managed to get it working with few tweaks. I introduced a special arg
'noescape' to set noescape argument to 1 while calling
'grub_create_loader_cmdline' function. In the given patch it is hard
coded to 0. Is there any other way to set it to 1?
I have a question, what is the significance of escaping the quotes while
creating kernel command line args while Linux kernel doesn't support
escape sequences in command line args?
--
Shedi
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel