]> xenbits.xensource.com Git - xen.git/commit
x86/PVH: account for module command line length
authorJan Beulich <jbeulich@suse.com>
Thu, 27 Mar 2025 14:26:37 +0000 (15:26 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 27 Mar 2025 14:26:37 +0000 (15:26 +0100)
commita2a336fbc95a26f1a6ce1e2e77cd18e0eb48d8c5
tree5382205ca19f8e909dae8c375ab2881f8621beba
parent74071cb36ddeddddeecb23400ce67d5bd94c7208
x86/PVH: account for module command line length

As per observation in practice, initrd->cmdline_pa is not normally zero.
Hence so far we always appended at least one byte. That alone may
already render insufficient the "allocation" made by find_memory().
Things would be worse when there's actually a (perhaps long) command
line.

Skip setup when the command line is empty. Amend the "allocation" size
by padding and actual size of module command line. Along these lines
also skip initrd setup when the initrd is zero size.

Fixes: 0ecb8eb09f9f ("x86/pvh: pass module command line to dom0")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
master commit: 989584e532c9517a0f789e993f5f6744beaebe3e
master date: 2025-03-27 12:21:08 +0100
xen/arch/x86/hvm/dom0_build.c