Luciano Miguel Ferreira Rocha
2009-Feb-12 17:37 UTC
[syslinux] bug in ifcpu64 if !pae and only two options?
Hello, ifcpu64.c has the following comment: * append boot_kernel_64 [-- boot_kernel_32pae] -- boot_kernel_32 Also in NEWS: (and optionally 32-bit kernels with or without PAE.) However, if one doesn't specify boot_kernel_32pae but only boot_kernel_64 and boot_kernel_32, and if the CPU doesn't have support for PAE, args[2] will be executed unconditionally, with no check for if it is defined. Maybe replace boot_args(...: args[2]); with: boot_args(...: args[2] ? args[2] : args[1]); Or maybe some other construct so that the ?: isn't used so many times in a row... Regards, Luciano Rocha -- lfr 0/0 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://www.zytor.com/pipermail/syslinux/attachments/20090212/e17ffc65/attachment.sig>
H. Peter Anvin
2009-Feb-12 18:57 UTC
[syslinux] bug in ifcpu64 if !pae and only two options?
Luciano Miguel Ferreira Rocha wrote:> Hello, > > ifcpu64.c has the following comment: > * append boot_kernel_64 [-- boot_kernel_32pae] -- boot_kernel_32 > > Also in NEWS: > (and optionally 32-bit kernels with or without PAE.) > > However, if one doesn't specify boot_kernel_32pae but only boot_kernel_64 > and boot_kernel_32, and if the CPU doesn't have support for PAE, args[2] > will be executed unconditionally, with no check for if it is defined. > > Maybe replace boot_args(...: args[2]); with: > boot_args(...: args[2] ? args[2] : args[1]); > > Or maybe some other construct so that the ?: isn't used so many times in > a row... >Does this patch work for you (sorry, don't have time to test myself right now... have to run out the door...) -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff URL: <http://www.zytor.com/pipermail/syslinux/attachments/20090212/6226a883/attachment.ksh>
Possibly Parallel Threads
- [PATCH] ifplop.c32: Detect if PLoP USB/CD INT13h hook is enabled/disabled
- [PATCH] ifcpuXX: Support multiple parameters with labels
- whichsys.c32: execute specific command, based on Syslinux bootloader variant
- [PATCH] ifgpxe.c32
- [PATCH] ifmemdsk.c32: Allow boot options based on presence of MEMDISK