EFI urgent fixes
Folks,
Please consider pulling the following fixes.
The first two are releated to the bug report I got from Linus and Josh Boyer, whereby Fedora20 + grub2 systems were no longer booting. Linus reverted the offending commit that broke grub2 boot, but that left us in a state where Macbooks still didn't boot with EFI. This is fixed with the below revert and I'm dropping a noisey boot time efi_printk() based on Josh's request and Linus' OK.
The third patch fixes a 32-bit EFI boot stub bug where garbled text is displayed on the screen if any of the efi_printk() statements run.
The following changes since commit 3eddc69ffeba092d288c386646bfa5ec0fce25fd:
x86 early_ioremap: Increase FIX_BTMAPS_SLOTS to 8 (2014-09-14 15:24:31 +0100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent
for you to fetch changes up to 115c6628a59044958c205f8468a1b3ba3d539e61:
x86/efi: Truncate 64-bit values when calling 32-bit OutputString() (2014-09-24 21:56:46 +0100)
----------------------------------------------------------------
* Revert the static library changes from the merge window since they're causing issues for Macbooks and Fedora + Grub2 - Matt Fleming
* Delete the misleading "setup_efi_pci() failed!" message which some people are seeing when booting EFI - Matt Fleming
* Fix printing strings from the 32-bit EFI boot stub by only passing 32-bit addresses to the firmware - Matt Fleming
----------------------------------------------------------------
Matt Fleming (3):
Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>" x86/efi: Delete misleading efi_printk() error message x86/efi: Truncate 64-bit values when calling 32-bit OutputString()
arch/x86/boot/compressed/Makefile | 3 +-- arch/x86/boot/compressed/eboot.c | 44 +++++++++++++++++++++++---------------- arch/x86/boot/compressed/eboot.h | 16 ++++++++++++++ arch/x86/include/asm/efi.h | 24 --------------------- drivers/firmware/efi/Makefile | 2 +- 5 files changed, 44 insertions(+), 45 deletions(-)
Signature · 1 line
Matt Fleming, Intel Open Source Technology Center
Quoted 42 lines · Matt Fleming
Folks,
Please consider pulling the following fixes.
The first two are releated to the bug report I got from Linus and Josh Boyer, whereby Fedora20 + grub2 systems were no longer booting. Linus reverted the offending commit that broke grub2 boot, but that left us in a state where Macbooks still didn't boot with EFI. This is fixed with the below revert and I'm dropping a noisey boot time
efi_printk()based on Josh's request and Linus' OK.The third patch fixes a 32-bit EFI boot stub bug where garbled text is displayed on the screen if any of the
efi_printk()statements run.The following changes since commit
3eddc69ffeba092d288c386646bfa5ec0fce25fd:x86
early_ioremap: IncreaseFIX_BTMAPS_SLOTSto 8 (2014-09-14 15:24:31 +0100)are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.gittags/efi-urgentfor you to fetch changes up to
115c6628a59044958c205f8468a1b3ba3d539e61:x86/efi: Truncate 64-bit values when calling 32-bit
OutputString()(2014-09-24 21:56:46 +0100)----------------------------------------------------------------
* Revert the static library changes from the merge window since they're causing issues for Macbooks and Fedora + Grub2 - Matt Fleming* Delete the misleading "
setup_efi_pci()failed!" message which some people are seeing when booting EFI - Matt Fleming* Fix printing strings from the 32-bit EFI boot stub by only passing 32-bit addresses to the firmware - Matt Fleming
----------------------------------------------------------------
Matt Fleming (3):
Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>" x86/efi: Delete misleadingefi_printk()error message x86/efi: Truncate 64-bit values when calling 32-bitOutputString()
Quoted 9 lines
arch/x86/boot/compressed/Makefile | 3 +-- arch/x86/boot/compressed/eboot.c | 44 +++++++++++++++++++++++---------------- arch/x86/boot/compressed/eboot.h | 16 ++++++++++++++ arch/x86/include/asm/efi.h | 24 --------------------- drivers/firmware/efi/Makefile | 2 +- 5 files changed, 44 insertions(+), 45 deletions(-)Signature · 1 line
Matt Fleming, Intel Open Source Technology Center
Pulled, thanks Matt!
I'll give it some testing and then send it to Linus with other x86 fixes.
Thanks,
Ingo
Quoted 5 lines · Ingo Molnar
Pulled, thanks Matt!
I'll give it some testing and then send it to Linus with other x86 fixes.
Thanks! I noticed that the 0day bot isn't working properly at the moment (at least for me), so additional testing is most welcome.
Signature · 1 line
Matt Fleming, Intel Open Source Technology Center
Quoted 44 lines · Ingo Molnar
Quoted 42 lines · Matt Fleming
Folks,
Please consider pulling the following fixes.
The first two are releated to the bug report I got from Linus and Josh Boyer, whereby Fedora20 + grub2 systems were no longer booting. Linus reverted the offending commit that broke grub2 boot, but that left us in a state where Macbooks still didn't boot with EFI. This is fixed with the below revert and I'm dropping a noisey boot time
efi_printk()based on Josh's request and Linus' OK.The third patch fixes a 32-bit EFI boot stub bug where garbled text is displayed on the screen if any of the
efi_printk()statements run.The following changes since commit
3eddc69ffeba092d288c386646bfa5ec0fce25fd:x86
early_ioremap: IncreaseFIX_BTMAPS_SLOTSto 8 (2014-09-14 15:24:31 +0100)are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.gittags/efi-urgentfor you to fetch changes up to
115c6628a59044958c205f8468a1b3ba3d539e61:x86/efi: Truncate 64-bit values when calling 32-bit
OutputString()(2014-09-24 21:56:46 +0100)----------------------------------------------------------------
* Revert the static library changes from the merge window since they're causing issues for Macbooks and Fedora + Grub2 - Matt Fleming* Delete the misleading "
setup_efi_pci()failed!" message which some people are seeing when booting EFI - Matt Fleming* Fix printing strings from the 32-bit EFI boot stub by only passing 32-bit addresses to the firmware - Matt Fleming
----------------------------------------------------------------
Matt Fleming (3):
Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>" x86/efi: Delete misleadingefi_printk()error message x86/efi: Truncate 64-bit values when calling 32-bitOutputString()
Quoted 5 lines
Quoted 5 lines
arch/x86/boot/compressed/Makefile | 3 +-- arch/x86/boot/compressed/eboot.c | 44 +++++++++++++++++++++++---------------- arch/x86/boot/compressed/eboot.h | 16 ++++++++++++++ arch/x86/include/asm/efi.h | 24 --------------------- drivers/firmware/efi/Makefile | 2 +-
This Makefile was changed in the first patch. That became 84be880560fb ("Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>""), which just landed in next-20140926.
It appears to have introduced a typo, because:
CONFIG_EFI_ARM_STUB
should probably have been:
CONFIG_EFI_ARMSTUB
Quoted 9 lines
Quoted 4 lines
5 files changed, 44 insertions(+), 45 deletions(-)Signature · 1 line
Matt Fleming, Intel Open Source Technology CenterPulled, thanks Matt!
I'll give it some testing and then send it to Linus with other x86 fixes.
Paul Bolle
Quoted 55 lines · Paul Bolle
Quoted 44 lines · Ingo Molnar
Quoted 42 lines · Matt Fleming
Folks,
Please consider pulling the following fixes.
The first two are releated to the bug report I got from Linus and Josh Boyer, whereby Fedora20 + grub2 systems were no longer booting. Linus reverted the offending commit that broke grub2 boot, but that left us in a state where Macbooks still didn't boot with EFI. This is fixed with the below revert and I'm dropping a noisey boot time
efi_printk()based on Josh's request and Linus' OK.The third patch fixes a 32-bit EFI boot stub bug where garbled text is displayed on the screen if any of the
efi_printk()statements run.The following changes since commit
3eddc69ffeba092d288c386646bfa5ec0fce25fd:x86
early_ioremap: IncreaseFIX_BTMAPS_SLOTSto 8 (2014-09-14 15:24:31 +0100)are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.gittags/efi-urgentfor you to fetch changes up to
115c6628a59044958c205f8468a1b3ba3d539e61:x86/efi: Truncate 64-bit values when calling 32-bit
OutputString()(2014-09-24 21:56:46 +0100)----------------------------------------------------------------
* Revert the static library changes from the merge window since they're causing issues for Macbooks and Fedora + Grub2 - Matt Fleming* Delete the misleading "
setup_efi_pci()failed!" message which some people are seeing when booting EFI - Matt Fleming* Fix printing strings from the 32-bit EFI boot stub by only passing 32-bit addresses to the firmware - Matt Fleming
----------------------------------------------------------------
Matt Fleming (3):
Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>" x86/efi: Delete misleadingefi_printk()error message x86/efi: Truncate 64-bit values when calling 32-bitOutputString()Quoted 5 lines
Quoted 5 lines
arch/x86/boot/compressed/Makefile | 3 +-- arch/x86/boot/compressed/eboot.c | 44 +++++++++++++++++++++++---------------- arch/x86/boot/compressed/eboot.h | 16 ++++++++++++++ arch/x86/include/asm/efi.h | 24 --------------------- drivers/firmware/efi/Makefile | 2 +-This
Makefilewas changed in the first patch. That became84be880560fb("Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>""), which just landed in next-20140926.
Quoted 5 lines
It appears to have introduced a typo, because:
CONFIG_EFI_ARM_STUBshould probably have been:
CONFIG_EFI_ARMSTUB
A delta fix would be nice at this point, I've got the x86 side tested and besides this build bug it's ready to go to Linus.
Thanks,
Ingo
Quoted 10 lines · Paul Bolle
This
Makefilewas changed in the first patch. That became84be880560fb("Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>""), which just landed in next-20140926.It appears to have introduced a typo, because:
CONFIG_EFI_ARM_STUBshould probably have been:
CONFIG_EFI_ARMSTUB
Crap. Thanks for catching that Paul. I'm wondering how this slipped through because that commit has an explicit Tested-by from Leif.
Hell, even I built an arm64 EFI kernel before sending that commit.
Ohh.. I see why no one caught this. From arch/arm64/Makefile,
libs-$(CONFIG_EFI_STUB) += drivers/firmware/efi/libstub/
so libstub will be built for arm64 regardless of the broken logic in drivers/firmware/efi/Makefile.
Paul, how did you notice the typo? Did you hit an explicit build failure? It's definitely wrong and I'm trying to figure out whether I need to add some more testing to my build infrastructure to catch this kind of problem in the future.
The next question is: should we fix this up at this point in the merge cycle? It's basically just dead code.
Signature · 1 line
Matt Fleming, Intel Open Source Technology Center
Quoted 21 lines · Matt Fleming
Quoted 10 lines · Paul Bolle
This
Makefilewas changed in the first patch. That became84be880560fb("Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>""), which just landed in next-20140926.It appears to have introduced a typo, because:
CONFIG_EFI_ARM_STUBshould probably have been:
CONFIG_EFI_ARMSTUBCrap. Thanks for catching that Paul. I'm wondering how this slipped through because that commit has an explicit Tested-by from Leif.
Hell, even I built an arm64 EFI kernel before sending that commit.
Ohh.. I see why no one caught this. From
arch/arm64/Makefile,libs-$(CONFIG_EFI_STUB) += drivers/firmware/efi/libstub/
Quoted 7 lines
so libstub will be built for arm64 regardless of the broken logic in
drivers/firmware/efi/Makefile.Paul, how did you notice the typo? Did you hit an explicit build failure? It's definitely wrong and I'm trying to figure out whether I need to add some more testing to my build infrastructure to catch this kind of problem in the future.
I have a 800 line perl monster that checks for stuff like this. It's not very sophisticated but smart enough to spot typos like this one. I try to have it check each linux-next (and mainline) release.
(I think Valentin Rothberg is trying to automate this properly. See
http://www.linuxplumbersconf.org/2014/ocw/sessions/1863 .)
Quoted 2 lines
The next question is: should we fix this up at this point in the merge cycle? It's basically just dead code.
Paul Bolle
Quoted 3 lines · Ingo Molnar
A delta fix would be nice at this point, I've got the x86 side tested and besides this build bug it's ready to go to Linus.
Given that the typo doesn't result in an actual build failure, do you still want the following delta fix?
---
Quoted 1 line
From
7d4354dc767ba11d1555d27596a3dd3426eb3354Mon Sep 17 00:00:00 2001
From: Matt Fleming <[email protected]>
Date: Fri, 26 Sep 2014 13:11:05 +0100
Subject: [PATCH] efi: Fix CONFIG_EFI_ARMSTUB typo for building libstub
commit 84be880560fb ("Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>"") introduced a typo into drivers/firmware/efi/Makefile where CONFIG_EFI_ARM_STUB should instead be CONFIG_EFI_ARMSTUB.
The typo doesn't result in an actual build failure and was found with Paul's "800 line perl monster" in linux-next.
The reason that we don't see a build failure is because arm64 (which is now the only user of libstub) already includes logic to build libstub from arch/arm64/Makefile.
Correct the typo anyway.
--- drivers/firmware/efi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/Makefile +1 -1
@@ -7,4 +7,4 @@ obj-$(CONFIG_EFI_VARS_PSTORE) += efi-pstore.o obj-$(CONFIG_UEFI_CPER) += cper.o obj-$(CONFIG_EFI_RUNTIME_MAP) += runtime-map.o obj-$(CONFIG_EFI_RUNTIME_WRAPPERS) += runtime-wrappers.o -obj-$(CONFIG_EFI_ARM_STUB) += libstub/ +obj-$(CONFIG_EFI_ARMSTUB) += libstub/
Signature · 4 lines
1.9.3 -- Matt Fleming, Intel Open Source Technology Center
Quoted 4 lines · Paul Bolle
I have a 800 line perl monster that checks for stuff like this. It's not very sophisticated but smart enough to spot typos like this one. I try to have it check each linux-next (and mainline) release.
Very cool.
Quoted 2 lines
(I think Valentin Rothberg is trying to automate this properly. See
http://www.linuxplumbersconf.org/2014/ocw/sessions/1863 .)
Have either of you guys thought about asking for this to be included with the 0-day kbuild bot or submitted under scripts/?
It certainly seems like a useful bit of functionality.
Fengguang, the interesting bits of this thread start here,
https://lkml.kernel.org/r/1411730854.7866.10.camel@x220
Signature · 1 line
Matt Fleming, Intel Open Source Technology Center
Quoted 7 lines · Matt Fleming
Quoted 4 lines · Paul Bolle
I have a 800 line perl monster that checks for stuff like this. It's not very sophisticated but smart enough to spot typos like this one. I try to have it check each linux-next (and mainline) release.
Very cool.
Thanks.
Quoted 7 lines
Quoted 2 lines
(I think Valentin Rothberg is trying to automate this properly. See
http://www.linuxplumbersconf.org/2014/ocw/sessions/1863 .)Have either of you guys thought about asking for this to be included with the 0-day kbuild bot or submitted under
scripts/?It certainly seems like a useful bit of functionality.
I've been testing things locally for three months now. People must have noticed an uptick in messages I send on this topic. (And, related, a decrease in the numbers of cleanup patches I send myself.) I've not been shouted at very often, so the signal to noise ratio is probably cool.
This is about the third time I've written a monster like that. (I first started checking for Kconfig related defects in, I think, 2011.)
About the only thing I'm happy with in this attempt is that it parses blobs separately. Ie, every release it checks for previously unseen blobs, parses those, and saves each blob level parse as a git note to that blob. Then it collects all relevant blob level notes, does the aggregate analysis and reports the issues it identifies. That report is saved away again as a note on the tag I'm checking. (I have not bothered to automate that last step.) The neat thing is, I think, that each release touches only a minority of files so parsing the tree is mostly a one time cost (encountered on the very first run).
But, anyhow, I'm pretty sure Valentin is onto something much more sophisticated.
Quoted 3 lines
Fengguang, the interesting bits of this thread start here,
Paul Bolle
Quoted 7 lines · Matt Fleming
Quoted 3 lines · Ingo Molnar
A delta fix would be nice at this point, I've got the x86 side tested and besides this build bug it's ready to go to Linus.
Given that the typo doesn't result in an actual build failure, do you still want the following delta fix?
Ok, this one can indeed wait for the merge window - I'll send the other bits to Linus in a minute.
Thanks,
Ingo
Quoted 8 lines · Matt Fleming
Quoted 4 lines · Paul Bolle
I have a 800 line perl monster that checks for stuff like this. It's not very sophisticated but smart enough to spot typos like this one. I try to have it check each linux-next (and mainline) release.
Very cool.
Quoted 7 lines
Quoted 2 lines
(I think Valentin Rothberg is trying to automate this properly. See
http://www.linuxplumbersconf.org/2014/ocw/sessions/1863 .)Have either of you guys thought about asking for this to be included with the 0-day kbuild bot or submitted under
scripts/?It certainly seems like a useful bit of functionality.
Yes, I was talking with Greg about including the tool in the 0-day testing. In addition, I am working on a patch to change the scripts/checkkconfigsymbols script
(https://lkml.org/lkml/2014/9/22/336).
The mayor difference between my tool and the script is that the script can only find bugs on a symbolic level (i.e., a reference on an feature that is not defined in Kconfig). The tool that I will present at the Plumbers Conference is additionally able to detect issue on the logic level, for instance an #ifdef block that can never be compiled as its precondition is contradictory. I will send some patches the next weeks to show which bugs can be detected with the tool.
Quoted 6 lines
Fengguang, the interesting bits of this thread start here,
https://lkml.kernel.org/r/1411730854.7866.10.camel@x220
--
Matt Fleming, Intel Open Source Technology Center
Quoted 2 lines · Valentin Rothberg
I will send some patches the
next weeks to show which bugs can be detected with the tool.
Looking forward to those patches. If you do send them would you mind CC-ing me?
Thanks,
Paul Bolle