25.02.2017 02:21, Vladimir 'phcoder' Serbinenko пишет: > On Fri, Feb 24, 2017, 09:47 Andrei Borzenkov <arvidj...@gmail.com> wrote: > >> UEFI 2.6 9.3.6.4 File Path Media Device Path says that Path Name is >> "A NULL-terminated Path string including directory and file names". >> >> Strip final NULL from Path Name in each File Path node when constructing >> full path. To be on safe side, strip all of them. >> >> Fixes failure chainloading grub from grub, when loaded grub truncates >> image path and does not find its grub.cfg. >> >> https://bugzilla.opensuse.org/show_bug.cgi?id=1026344 >> >> This was triggered by commit ce95549cc54b5d6f494608a7c390dba3aab4fba7; >> before it we built Path Name without trailing NULL, and apparently all >> other bootloaders use single File Path node, thus not exposing this bug. >> >> --- >> @Vladimir, @Daniel - this fixes regression in rc1 and is real fix for >> the mentioned problem (previous patch only fixed the case of grub - grub >> chainloading, this patch should properly parse image path also when called >> from other EFI application). >> > I'm OK with this patch. Especially that it's unlikely to break anything. Is
Committed. > the other patch still needed? If other loaders do it with a single path > element we should probably too, to avoid this kind of bugs. Question is > mostly whether it's rc1 material. > It is not needed. I would still consider it long term - it makes code less confusing and avoids probably less-utilized code paths elsewhere. It also demonstrates that we desperately need EFI boot tests. Much thanks to SUSE for setting up comprehensive test suite! _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel