Regression. -6.3.X Good. -6.4-rcY Bad.
Subsystems (3)
Hi,
I notice a simple build-time regression on Bugzilla [1]. Quoting from it:
Quoted 43 lines
This is a very simple to see regression.
On arm64 hardware, take any one of the -6.4-rcY tarballs created by Linus. Extract the contents of the tarball and cd to the linux-6.4-rcY directory. Issue a "make clean" or a "make mrproper" or a "make distclean" command. Look at the output (there should not be any). In every case, the output is --
nm: 'vmlinux': No such file
A bisection of Linus' full tree was performed specifying v6.4-rc1 as bad and v6.3 as good. Here is the result --
git bisect start
# status: waiting for both good and bad commits
# bad: [ac9a78681b921877518763ba0e89202254349d1b] Linux 6.4-rc1
git bisect badac9a78681b921877518763ba0e89202254349d1b
# status: waiting for good commit(s), bad commit known
# good: [457391b0380335d5e9a5babdec90ac53928b23b4] Linux 6.3
git bisect good457391b0380335d5e9a5babdec90ac53928b23b4
# good: [6e98b09da931a00bf4e0477d0fa52748bf28fcce] Merge tag 'net-next-6.4' ofgit://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
git bisect good6e98b09da931a00bf4e0477d0fa52748bf28fcce
# good: [70cc1b5307e8ee3076fdf2ecbeb89eb973aa0ff7] Merge tag 'powerpc-6.4-1' ofgit://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good70cc1b5307e8ee3076fdf2ecbeb89eb973aa0ff7
# bad: [865fdb08197e657c59e74a35fa32362b12397f58] Merge tag 'input-for-v6.4-rc0' ofgit://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
git bisect bad865fdb08197e657c59e74a35fa32362b12397f58
# good: [e81507acdc19d91df4121f409871f3e4e055f6c2] Merge tag 'clk-for-linus' ofgit://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
git bisect goode81507acdc19d91df4121f409871f3e4e055f6c2
# bad: [26c009dffca89b0f8fe7facc41d1ccf88a66825a] Merge tag '6.4-rc-smb3-client-fixes-part1' ofgit://git.samba.org/sfrench/cifs-2.6
git bisect bad26c009dffca89b0f8fe7facc41d1ccf88a66825a
# bad: [10de638d8ea57ebab4231ea077bed01d9bade775] Merge tag 's390-6.4-1' ofgit://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
git bisect bad10de638d8ea57ebab4231ea077bed01d9bade775
# good: [680957b3b8b0b2e8697592fcb77369d4f643908a] s390/relocate_kernel: use SYM* macros instead ofENTRY(), etc.
git bisect good680957b3b8b0b2e8697592fcb77369d4f643908a
# good: [ea76e08f4d901a450619831a255e9e0a4c0ed162] rust: ioctl: Add ioctl number manipulation functions
git bisect goodea76e08f4d901a450619831a255e9e0a4c0ed162
# bad: [825a0714d2b3883d4f8ff64f6933fb73ee3f1834] Merge tag 'efi-next-for-v6.4' ofgit://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
git bisect bad825a0714d2b3883d4f8ff64f6933fb73ee3f1834
# good: [9489d1bdb763a3dd954e61522043190a9fd1cb4c] power: supply: generic-adc-battery: simplifyread_channellogic git bisect good9489d1bdb763a3dd954e61522043190a9fd1cb4c
# good: [528bd42615f4bb564613cc76dead90d7fbae76ba] power: supply: rk817: Drop unneeded debugging code
git bisect good528bd42615f4bb564613cc76dead90d7fbae76ba
# good: [538bc0f40b364f2c7b81f11aa163f723b138b40f] efi/zboot: Set forward edge CFI compat header flag if supported git bisect good538bc0f40b364f2c7b81f11aa163f723b138b40f
# bad: [026b85796ab4d52af56f8a1c60d2613983ecd845] efi/zboot: arm64: Grab code size from ELF symbol in payload
git bisect bad026b85796ab4d52af56f8a1c60d2613983ecd845
# bad: [45dd403da851124412d32e3193c21de4a51d29da] efi/zboot: arm64: Inject kernel code size symbol into the zboot payload git bisect bad45dd403da851124412d32e3193c21de4a51d29da
Quoted 3 lines
# first bad commit: [45dd403da851124412d32e3193c21de4a51d29da] efi/zboot: arm64: Inject kernel code size symbol into the zboot payloadReverting the commit
45dd403da851124412d32e3193c21de4a51d29daresolves the problem.
The regression looks like arm-specific, but the first bad commit IMO isn't related to kbuild system.
Anyway, I'm adding it to regzbot:
#regzbot introduced: 45dd403da85112 https://bugzilla.kernel.org/show_bug.cgi?id=217468
#regzbot title: nm vmlinux ENOENT when "make mrproper" on arm64
Thanks.
[1]: https://bugzilla.kernel.org/show_bug.cgi?id=217468
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 52 lines · Bagas Sanjaya
Hi,
I notice a simple build-time regression on Bugzilla [1]. Quoting from it:
Quoted 43 lines
This is a very simple to see regression.
On arm64 hardware, take any one of the -6.4-rcY tarballs created by Linus. Extract the contents of the tarball and cd to the linux-6.4-rcY directory. Issue a "make clean" or a "make mrproper" or a "make distclean" command. Look at the output (there should not be any). In every case, the output is --
nm: 'vmlinux': No such file
A bisection of Linus' full tree was performed specifying v6.4-rc1 as bad and v6.3 as good. Here is the result --
git bisect start
# status: waiting for both good and bad commits
# bad: [ac9a78681b921877518763ba0e89202254349d1b] Linux 6.4-rc1
git bisect badac9a78681b921877518763ba0e89202254349d1b
# status: waiting for good commit(s), bad commit known
# good: [457391b0380335d5e9a5babdec90ac53928b23b4] Linux 6.3
git bisect good457391b0380335d5e9a5babdec90ac53928b23b4
# good: [6e98b09da931a00bf4e0477d0fa52748bf28fcce] Merge tag 'net-next-6.4' ofgit://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
git bisect good6e98b09da931a00bf4e0477d0fa52748bf28fcce
# good: [70cc1b5307e8ee3076fdf2ecbeb89eb973aa0ff7] Merge tag 'powerpc-6.4-1' ofgit://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good70cc1b5307e8ee3076fdf2ecbeb89eb973aa0ff7
# bad: [865fdb08197e657c59e74a35fa32362b12397f58] Merge tag 'input-for-v6.4-rc0' ofgit://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
git bisect bad865fdb08197e657c59e74a35fa32362b12397f58
# good: [e81507acdc19d91df4121f409871f3e4e055f6c2] Merge tag 'clk-for-linus' ofgit://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
git bisect goode81507acdc19d91df4121f409871f3e4e055f6c2
# bad: [26c009dffca89b0f8fe7facc41d1ccf88a66825a] Merge tag '6.4-rc-smb3-client-fixes-part1' ofgit://git.samba.org/sfrench/cifs-2.6
git bisect bad26c009dffca89b0f8fe7facc41d1ccf88a66825a
# bad: [10de638d8ea57ebab4231ea077bed01d9bade775] Merge tag 's390-6.4-1' ofgit://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
git bisect bad10de638d8ea57ebab4231ea077bed01d9bade775
# good: [680957b3b8b0b2e8697592fcb77369d4f643908a] s390/relocate_kernel: use SYM* macros instead ofENTRY(), etc.
git bisect good680957b3b8b0b2e8697592fcb77369d4f643908a
# good: [ea76e08f4d901a450619831a255e9e0a4c0ed162] rust: ioctl: Add ioctl number manipulation functions
git bisect goodea76e08f4d901a450619831a255e9e0a4c0ed162
# bad: [825a0714d2b3883d4f8ff64f6933fb73ee3f1834] Merge tag 'efi-next-for-v6.4' ofgit://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
git bisect bad825a0714d2b3883d4f8ff64f6933fb73ee3f1834
# good: [9489d1bdb763a3dd954e61522043190a9fd1cb4c] power: supply: generic-adc-battery: simplifyread_channellogic git bisect good9489d1bdb763a3dd954e61522043190a9fd1cb4c
# good: [528bd42615f4bb564613cc76dead90d7fbae76ba] power: supply: rk817: Drop unneeded debugging code
git bisect good528bd42615f4bb564613cc76dead90d7fbae76ba
# good: [538bc0f40b364f2c7b81f11aa163f723b138b40f] efi/zboot: Set forward edge CFI compat header flag if supported git bisect good538bc0f40b364f2c7b81f11aa163f723b138b40f
# bad: [026b85796ab4d52af56f8a1c60d2613983ecd845] efi/zboot: arm64: Grab code size from ELF symbol in payload
git bisect bad026b85796ab4d52af56f8a1c60d2613983ecd845
# bad: [45dd403da851124412d32e3193c21de4a51d29da] efi/zboot: arm64: Inject kernel code size symbol into the zboot payload git bisect bad45dd403da851124412d32e3193c21de4a51d29daQuoted 3 lines
# first bad commit: [45dd403da851124412d32e3193c21de4a51d29da] efi/zboot: arm64: Inject kernel code size symbol into the zboot payloadReverting the commit
45dd403da851124412d32e3193c21de4a51d29daresolves the problem.
Quoted 7 lines
The regression looks like arm-specific, but the first bad commit IMO isn't related to kbuild system.
Anyway, I'm adding it to regzbot:
#regzbot introduced:
45dd403da85112https://bugzilla.kernel.org/show_bug.cgi?id=217468
#regzbot title: nm vmlinux ENOENT when "make mrproper" on arm64
I was able to track down the issue.
In line 47, arch/arm64/boot/Makefile, a variable (that gets expanded on use, hence = and not :=) gets defined, that requires vmlinux to exist (see the $(shell) invocation). drivers/firmware/efi/libstub/Makefile.zboot then defines a variable with :=, which expands on site and not when it actually needs to be used. This expands EFI_ZBOOT_OBJCOPY_FLAGS without vmlinux existing, which ENOENTs.
The below patch should fix it. I'm not submitting an actual patch because I simply don't know if there are any possible side effects here (although it frankly seems unlikely).
(quoted diff) +0 -0
b/drivers/firmware/efi/libstub/Makefile.zboot
index 89ef820f3b3..3fb39dea114 100644
drivers/firmware/efi/libstub/Makefile.zboot +0 -1
@@ -32,7 +32,7 @@ zboot-size-len-$(CONFIG_KERNEL_GZIP) := 0 $(obj)/vmlinuz: $(obj)/vmlinux.bin FORCE $(call if_changed,$(zboot-method-y)) -OBJCOPYFLAGS_vmlinuz.o := -I binary -O $(EFI_ZBOOT_BFD_TARGET)
$(EFI_ZBOOT_OBJCOPY_FLAGS) \
+OBJCOPYFLAGS_vmlinuz.o = -I binary -O $(EFI_ZBOOT_BFD_TARGET) $(EFI_ZBOOT_OBJCOPY_FLAGS) \
--rename-section
.data=.gzdata,load,alloc,readonly,contents
$(obj)/vmlinuz.o: $(obj)/vmlinuz FORCE
$(call if_changed,objcopy)
Signature · 1 line
Pedro
Ard Biesheuvel
maintainerQuoted 13 lines · Pedro Falcato
Quoted 11 lines · Bagas Sanjaya
Hi,
I notice a simple build-time regression on Bugzilla [1]. Quoting from it:
Quoted 6 lines
This is a very simple to see regression.
On arm64 hardware, take any one of the -6.4-rcY tarballs created by Linus. Extract the contents of the tarball and cd to the linux-6.4-rcY directory. Issue a "make clean" or a "make mrproper" or a "make distclean" command. Look at the output (there should not be any). In every case, the output is --
nm: 'vmlinux': No such file
...
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
# first bad commit: [45dd403da851124412d32e3193c21de4a51d29da] efi/zboot: arm64: Inject kernel code size symbol into the zboot payloadReverting the commit
45dd403da851124412d32e3193c21de4a51d29daresolves the problem.
Quoted 8 lines
Quoted 7 lines
The regression looks like arm-specific, but the first bad commit IMO isn't related to kbuild system.
Anyway, I'm adding it to regzbot:
#regzbot introduced:
45dd403da85112https://bugzilla.kernel.org/show_bug.cgi?id=217468
#regzbot title: nm vmlinux ENOENT when "make mrproper" on arm64
How on earth is this a regression? It is not even a build error, only a warning, with no adverse impact whatsoever on the resulting binaries.
Could we stop being so trigger happy when calling things regressions, please?
Quoted 29 lines
I was able to track down the issue.
In line 47,arch/arm64/boot/Makefile, a variable (that gets expanded on use, hence = and not :=) gets defined, that requires vmlinux to exist (see the $(shell) invocation).drivers/firmware/efi/libstub/Makefile.zbootthen defines a variable with :=, which expands on site and not when it actually needs to be used. This expandsEFI_ZBOOT_OBJCOPY_FLAGSwithout vmlinux existing, which ENOENTs.The below patch should fix it. I'm not submitting an actual patch because I simply don't know if there are any possible side effects here (although it frankly seems unlikely).
drivers/firmware/efi/libstub/Makefile.zboot +1
-1@@ -32,7 +32,7 @@ zboot-size-len-$(CONFIG_KERNEL_GZIP) := 0 $(obj)/vmlinuz: $(obj)/vmlinux.bin FORCE $(call if_changed,$(zboot-method-y)) -OBJCOPYFLAGS_vmlinuz.o := -I binary -O $(EFI_ZBOOT_BFD_TARGET) $(EFI_ZBOOT_OBJCOPY_FLAGS) \ +OBJCOPYFLAGS_vmlinuz.o = -I binary -O $(EFI_ZBOOT_BFD_TARGET) $(EFI_ZBOOT_OBJCOPY_FLAGS) \ --rename-section.data=.gzdata,load,alloc,readonly,contents
$(obj)/vmlinuz.o: $(obj)/vmlinuz FORCE
Quoted 2 lines
$(call if_changed,objcopy)
Thanks for the fix. So the reason I used = and not := in the first place in the assignment of EFI_ZBOOT_OBJCOPY_FLAGS was to ensure that it will not be evaluated eagerly, but obviously, forcing the eager evaluation further down defeats that.
I've sent this out as a patch and queued it up as a EFI fix. Thanks!
Quoted 1 line · Ard Biesheuvel
I've sent this out as a patch and queued it up as a EFI fix. Thanks!
Telling regzbot about the fix since Ard forgot to add required tags:
#regzbot fix: 3610dc36f4fd76
Thanks.
Signature · 1 line
An old man doll... just what I always wanted! - Clara