mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
@ 2023-06-28 11:58 Michal Kubecek
  2023-06-28 15:16 ` Josh Poimboeuf
  2023-07-08 13:40 ` Linux regression tracking (Thorsten Leemhuis)
  0 siblings, 2 replies; 13+ messages in thread
From: Michal Kubecek @ 2023-06-28 11:58 UTC (permalink / raw)
  To: Josh Poimboeuf; +Cc: Peter Zijlstra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]

Hello,

this morning, mainline kernel builds started to fail on my desktop like
this:

  mike@lion:~/work/git/kernel-upstream> mkdir /srv/ram/kobj
  mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj defconfig >/dev/null
  mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj all >/dev/null
  net/ipv4/netfilter/iptable_nat.o: warning: objtool: mmap fail reloc
  net/netfilter/xt_mark.o: warning: objtool: mmap fail reloc
  net/netfilter/xt_nat.o: warning: objtool: mmap fail reloc
  net/netfilter/xt_LOG.o: warning: objtool: mmap fail reloc
  net/netfilter/xt_MASQUERADE.o: warning: objtool: mmap fail reloc
  net/netfilter/nf_log_syslog.o: warning: objtool: mmap fail reloc
  net/netfilter/xt_addrtype.o: warning: objtool: mmap fail reloc
  fs/efivarfs/efivarfs.o: warning: objtool: mmap fail reloc
  drivers/thermal/intel/x86_pkg_temp_thermal.o: warning: objtool: mmap fail reloc
  vmlinux.o: warning: objtool: mmap fail reloc
  incomplete ORC unwind tables in file: vmlinux
  Failed to sort kernel tables
  make[2]: *** [/home/mike/work/git/kernel-upstream/scripts/Makefile.vmlinux:35: vmlinux] Error 1
  make[2]: *** Deleting file 'vmlinux'
  make[1]: *** [/home/mike/work/git/kernel-upstream/Makefile:1256: vmlinux] Error 2
  make: *** [Makefile:226: __sub-make] Error 2

I bisected the failure to commit

  eb0481bbc4ce ("objtool: Fix reloc_hash size")

I also tried gcc11 and building on a normal filesystem (rather than
tmpfs) but the result is still the same. Different configurations (e.g.
allmodconfig) only show more modules with "mmap fail reloc". The machine
has 64 GB of RAM and both ulimit -m and ulimit -v show "unlimited".
Anything idea what else I should try?

Michal Kubecek

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-06-28 11:58 build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size") Michal Kubecek
@ 2023-06-28 15:16 ` Josh Poimboeuf
  2023-06-28 15:44   ` Michal Kubecek
  2023-07-08 13:40 ` Linux regression tracking (Thorsten Leemhuis)
  1 sibling, 1 reply; 13+ messages in thread
From: Josh Poimboeuf @ 2023-06-28 15:16 UTC (permalink / raw)
  To: Michal Kubecek; +Cc: Peter Zijlstra, linux-kernel

On Wed, Jun 28, 2023 at 01:58:25PM +0200, Michal Kubecek wrote:
> Hello,
> 
> this morning, mainline kernel builds started to fail on my desktop like
> this:
> 
>   mike@lion:~/work/git/kernel-upstream> mkdir /srv/ram/kobj
>   mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj defconfig >/dev/null
>   mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj all >/dev/null
>   net/ipv4/netfilter/iptable_nat.o: warning: objtool: mmap fail reloc
>   net/netfilter/xt_mark.o: warning: objtool: mmap fail reloc
>   net/netfilter/xt_nat.o: warning: objtool: mmap fail reloc
>   net/netfilter/xt_LOG.o: warning: objtool: mmap fail reloc
>   net/netfilter/xt_MASQUERADE.o: warning: objtool: mmap fail reloc
>   net/netfilter/nf_log_syslog.o: warning: objtool: mmap fail reloc
>   net/netfilter/xt_addrtype.o: warning: objtool: mmap fail reloc
>   fs/efivarfs/efivarfs.o: warning: objtool: mmap fail reloc
>   drivers/thermal/intel/x86_pkg_temp_thermal.o: warning: objtool: mmap fail reloc
>   vmlinux.o: warning: objtool: mmap fail reloc
>   incomplete ORC unwind tables in file: vmlinux
>   Failed to sort kernel tables
>   make[2]: *** [/home/mike/work/git/kernel-upstream/scripts/Makefile.vmlinux:35: vmlinux] Error 1
>   make[2]: *** Deleting file 'vmlinux'
>   make[1]: *** [/home/mike/work/git/kernel-upstream/Makefile:1256: vmlinux] Error 2
>   make: *** [Makefile:226: __sub-make] Error 2
> 
> I bisected the failure to commit
> 
>   eb0481bbc4ce ("objtool: Fix reloc_hash size")
> 
> I also tried gcc11 and building on a normal filesystem (rather than
> tmpfs) but the result is still the same. Different configurations (e.g.
> allmodconfig) only show more modules with "mmap fail reloc". The machine
> has 64 GB of RAM and both ulimit -m and ulimit -v show "unlimited".
> Anything idea what else I should try?
> 
> Michal Kubecek

Interesting.  Can you add the below patch and also do:

  make net/ipv4/netfilter/iptable_nat.o OBJTOOL_ARGS="--stats"

and report the output?

---8<---

diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index d420b5d2e2b6..4d5559ab4668 100644
--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -81,7 +81,7 @@ static inline void __elf_hash_del(struct elf_hash_node *node,
 				 PROT_READ|PROT_WRITE, \
 				 MAP_PRIVATE|MAP_ANON, -1, 0); \
 	if (__elf_table(name) == (void *)-1L) { \
-		WARN("mmap fail " #name); \
+		perror("mmap " #name); \
 		__elf_table(name) = NULL; \
 	} \
 	__elf_table(name); \

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-06-28 15:16 ` Josh Poimboeuf
@ 2023-06-28 15:44   ` Michal Kubecek
  2023-06-28 16:06     ` Michal Kubecek
  0 siblings, 1 reply; 13+ messages in thread
From: Michal Kubecek @ 2023-06-28 15:44 UTC (permalink / raw)
  To: Josh Poimboeuf; +Cc: Peter Zijlstra, linux-kernel

On Wed, Jun 28, 2023 at 08:16:54AM -0700, Josh Poimboeuf wrote:
> Interesting.  Can you add the below patch and also do:
> 
>   make net/ipv4/netfilter/iptable_nat.o OBJTOOL_ARGS="--stats"
> 
> and report the output?

With these, I get

    ...
      CC [M]  net/ipv4/netfilter/iptable_nat.o
    nr_sections: 40
    section_bits: 10
    nr_symbols: 41
    symbol_bits: 10
    mmap reloc: Invalid argument
    make[1]: Leaving directory '/srv/ram/kobj'

Michal


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-06-28 15:44   ` Michal Kubecek
@ 2023-06-28 16:06     ` Michal Kubecek
  2023-06-28 16:45       ` Michal Kubecek
  0 siblings, 1 reply; 13+ messages in thread
From: Michal Kubecek @ 2023-06-28 16:06 UTC (permalink / raw)
  To: Josh Poimboeuf; +Cc: Peter Zijlstra, linux-kernel

On Wed, Jun 28, 2023 at 05:44:32PM +0200, Michal Kubecek wrote:
> On Wed, Jun 28, 2023 at 08:16:54AM -0700, Josh Poimboeuf wrote:
> > Interesting.  Can you add the below patch and also do:
> > 
> >   make net/ipv4/netfilter/iptable_nat.o OBJTOOL_ARGS="--stats"
> > 
> > and report the output?
> 
> With these, I get
> 
>     ...
>       CC [M]  net/ipv4/netfilter/iptable_nat.o
>     nr_sections: 40
>     section_bits: 10
>     nr_symbols: 41
>     symbol_bits: 10
>     mmap reloc: Invalid argument
>     make[1]: Leaving directory '/srv/ram/kobj'

Not sure if it's of any use but I also tried to run it under strace and
the failed mmap() call seems to be

  18761 mmap(NULL, 0, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 EINVAL (Invalid argument)

Perhaps the problem could be that elf->num_relocs may be zero?

Michal

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-06-28 16:06     ` Michal Kubecek
@ 2023-06-28 16:45       ` Michal Kubecek
  2023-06-28 17:05         ` Josh Poimboeuf
  0 siblings, 1 reply; 13+ messages in thread
From: Michal Kubecek @ 2023-06-28 16:45 UTC (permalink / raw)
  To: Josh Poimboeuf; +Cc: Peter Zijlstra, linux-kernel

On Wed, Jun 28, 2023 at 06:06:31PM +0200, Michal Kubecek wrote:
> On Wed, Jun 28, 2023 at 05:44:32PM +0200, Michal Kubecek wrote:
> > On Wed, Jun 28, 2023 at 08:16:54AM -0700, Josh Poimboeuf wrote:
> > > Interesting.  Can you add the below patch and also do:
> > > 
> > >   make net/ipv4/netfilter/iptable_nat.o OBJTOOL_ARGS="--stats"
> > > 
> > > and report the output?
> > 
> > With these, I get
> > 
> >     ...
> >       CC [M]  net/ipv4/netfilter/iptable_nat.o
> >     nr_sections: 40
> >     section_bits: 10
> >     nr_symbols: 41
> >     symbol_bits: 10
> >     mmap reloc: Invalid argument
> >     make[1]: Leaving directory '/srv/ram/kobj'
> 
> Not sure if it's of any use but I also tried to run it under strace and
> the failed mmap() call seems to be
> 
>   18761 mmap(NULL, 0, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 EINVAL (Invalid argument)
> 
> Perhaps the problem could be that elf->num_relocs may be zero?

I added a printf() and got

  size = -4991471925827290382 = 0xbababababababaf2

for the elf_alloc_hash() invocation resulting in failed mmap().

Michal

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-06-28 16:45       ` Michal Kubecek
@ 2023-06-28 17:05         ` Josh Poimboeuf
  2023-06-28 17:26           ` Michal Kubecek
  0 siblings, 1 reply; 13+ messages in thread
From: Josh Poimboeuf @ 2023-06-28 17:05 UTC (permalink / raw)
  To: Michal Kubecek; +Cc: Peter Zijlstra, linux-kernel

On Wed, Jun 28, 2023 at 06:45:54PM +0200, Michal Kubecek wrote:
> On Wed, Jun 28, 2023 at 06:06:31PM +0200, Michal Kubecek wrote:
> > On Wed, Jun 28, 2023 at 05:44:32PM +0200, Michal Kubecek wrote:
> > > On Wed, Jun 28, 2023 at 08:16:54AM -0700, Josh Poimboeuf wrote:
> > > > Interesting.  Can you add the below patch and also do:
> > > > 
> > > >   make net/ipv4/netfilter/iptable_nat.o OBJTOOL_ARGS="--stats"
> > > > 
> > > > and report the output?
> > > 
> > > With these, I get
> > > 
> > >     ...
> > >       CC [M]  net/ipv4/netfilter/iptable_nat.o
> > >     nr_sections: 40
> > >     section_bits: 10
> > >     nr_symbols: 41
> > >     symbol_bits: 10
> > >     mmap reloc: Invalid argument
> > >     make[1]: Leaving directory '/srv/ram/kobj'
> > 
> > Not sure if it's of any use but I also tried to run it under strace and
> > the failed mmap() call seems to be
> > 
> >   18761 mmap(NULL, 0, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 EINVAL (Invalid argument)
> > 
> > Perhaps the problem could be that elf->num_relocs may be zero?
> 
> I added a printf() and got
> 
>   size = -4991471925827290382 = 0xbababababababaf2
> 
> for the elf_alloc_hash() invocation resulting in failed mmap().

Wut.  Can you share the .o file?

-- 
Josh

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-06-28 17:05         ` Josh Poimboeuf
@ 2023-06-28 17:26           ` Michal Kubecek
  2023-06-28 18:10             ` Josh Poimboeuf
  0 siblings, 1 reply; 13+ messages in thread
From: Michal Kubecek @ 2023-06-28 17:26 UTC (permalink / raw)
  To: Josh Poimboeuf; +Cc: Peter Zijlstra, linux-kernel

On Wed, Jun 28, 2023 at 10:05:30AM -0700, Josh Poimboeuf wrote:
> On Wed, Jun 28, 2023 at 06:45:54PM +0200, Michal Kubecek wrote:
> > On Wed, Jun 28, 2023 at 06:06:31PM +0200, Michal Kubecek wrote:
> > > On Wed, Jun 28, 2023 at 05:44:32PM +0200, Michal Kubecek wrote:
> > > > On Wed, Jun 28, 2023 at 08:16:54AM -0700, Josh Poimboeuf wrote:
> > > > > Interesting.  Can you add the below patch and also do:
> > > > > 
> > > > >   make net/ipv4/netfilter/iptable_nat.o OBJTOOL_ARGS="--stats"
> > > > > 
> > > > > and report the output?
> > > > 
> > > > With these, I get
> > > > 
> > > >     ...
> > > >       CC [M]  net/ipv4/netfilter/iptable_nat.o
> > > >     nr_sections: 40
> > > >     section_bits: 10
> > > >     nr_symbols: 41
> > > >     symbol_bits: 10
> > > >     mmap reloc: Invalid argument
> > > >     make[1]: Leaving directory '/srv/ram/kobj'
> > > 
> > > Not sure if it's of any use but I also tried to run it under strace and
> > > the failed mmap() call seems to be
> > > 
> > >   18761 mmap(NULL, 0, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 EINVAL (Invalid argument)
> > > 
> > > Perhaps the problem could be that elf->num_relocs may be zero?
> > 
> > I added a printf() and got
> > 
> >   size = -4991471925827290382 = 0xbababababababaf2
> > 
> > for the elf_alloc_hash() invocation resulting in failed mmap().
> 
> Wut.  Can you share the .o file?

It is at http://www.mk-sys.cz/tmp/iptable_nat.o

I digged some more and my guess is that the problem is that
elf_open_read() does

	memset(elf, 0, offsetof(struct elf, sections));

but commit eb0481bbc4ce ("objtool: Fix reloc_hash size") added
num_relocs after sections so that it is not zeroed (0xbabababababababa
is probably some kind of poison).

So I tried

------------------------------------------------------------------------
--- a/tools/objtool/include/objtool/elf.h
+++ b/tools/objtool/include/objtool/elf.h
@@ -84,8 +84,8 @@ struct elf {
 	bool changed;
 	char *name;
 	unsigned int num_files;
-	struct list_head sections;
 	unsigned long num_relocs;
+	struct list_head sections;
 
 	int symbol_bits;
 	int symbol_name_bits;
------------------------------------------------------------------------

and the build succeeds now. But I cannot say if it's enough.

Michal

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-06-28 17:26           ` Michal Kubecek
@ 2023-06-28 18:10             ` Josh Poimboeuf
  2023-06-28 19:32               ` Peter Zijlstra
  0 siblings, 1 reply; 13+ messages in thread
From: Josh Poimboeuf @ 2023-06-28 18:10 UTC (permalink / raw)
  To: Michal Kubecek; +Cc: Peter Zijlstra, linux-kernel

On Wed, Jun 28, 2023 at 07:26:59PM +0200, Michal Kubecek wrote:
> I digged some more and my guess is that the problem is that
> elf_open_read() does
> 
> 	memset(elf, 0, offsetof(struct elf, sections));
> 
> but commit eb0481bbc4ce ("objtool: Fix reloc_hash size") added
> num_relocs after sections so that it is not zeroed (0xbabababababababa
> is probably some kind of poison).

Argh, that memset() is subtle as heck.  Peter, why?!?

-- 
Josh

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-06-28 18:10             ` Josh Poimboeuf
@ 2023-06-28 19:32               ` Peter Zijlstra
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Zijlstra @ 2023-06-28 19:32 UTC (permalink / raw)
  To: Josh Poimboeuf; +Cc: Michal Kubecek, linux-kernel

On Wed, Jun 28, 2023 at 11:10:19AM -0700, Josh Poimboeuf wrote:
> On Wed, Jun 28, 2023 at 07:26:59PM +0200, Michal Kubecek wrote:
> > I digged some more and my guess is that the problem is that
> > elf_open_read() does
> > 
> > 	memset(elf, 0, offsetof(struct elf, sections));
> > 
> > but commit eb0481bbc4ce ("objtool: Fix reloc_hash size") added
> > num_relocs after sections so that it is not zeroed (0xbabababababababa
> > is probably some kind of poison).
> 
> Argh, that memset() is subtle as heck.  Peter, why?!?

Well, at the time struct elf had a bunch of fairly large hash tables
embedded inside it. memset() on those was a significant performance fail
-- esp. since we called objtool on every .o file.

 struct elf {
   Elf *elf;
   GElf_Ehdr ehdr;
   int fd;
   char *name;
   struct list_head sections;
   DECLARE_HASHTABLE(symbol_hash, 20);
   DECLARE_HASHTABLE(symbol_name_hash, 20);
   DECLARE_HASHTABLE(section_hash, 16);
   DECLARE_HASHTABLE(section_name_hash, 16);
   DECLARE_HASHTABLE(rela_hash, 20);
 };

Those embedded hash-tables have gone away, but apparently someone forgot
about this thing :/

Yes, this can go, struct elf is no longer like that.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-06-28 11:58 build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size") Michal Kubecek
  2023-06-28 15:16 ` Josh Poimboeuf
@ 2023-07-08 13:40 ` Linux regression tracking (Thorsten Leemhuis)
  2023-07-09 14:09   ` Michal Kubecek
  1 sibling, 1 reply; 13+ messages in thread
From: Linux regression tracking (Thorsten Leemhuis) @ 2023-07-08 13:40 UTC (permalink / raw)
  To: Michal Kubecek, Josh Poimboeuf; +Cc: Peter Zijlstra, linux-kernel

On 28.06.23 13:58, Michal Kubecek wrote:
> 
> this morning, mainline kernel builds started to fail on my desktop like
> this:
> 
>   mike@lion:~/work/git/kernel-upstream> mkdir /srv/ram/kobj
>   mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj defconfig >/dev/null
>   mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj all >/dev/null
>   net/ipv4/netfilter/iptable_nat.o: warning: objtool: mmap fail reloc
>   net/netfilter/xt_mark.o: warning: objtool: mmap fail reloc
>   net/netfilter/xt_nat.o: warning: objtool: mmap fail reloc
>   net/netfilter/xt_LOG.o: warning: objtool: mmap fail reloc
>   net/netfilter/xt_MASQUERADE.o: warning: objtool: mmap fail reloc
>   net/netfilter/nf_log_syslog.o: warning: objtool: mmap fail reloc
>   net/netfilter/xt_addrtype.o: warning: objtool: mmap fail reloc
>   fs/efivarfs/efivarfs.o: warning: objtool: mmap fail reloc
>   drivers/thermal/intel/x86_pkg_temp_thermal.o: warning: objtool: mmap fail reloc
>   vmlinux.o: warning: objtool: mmap fail reloc
>   incomplete ORC unwind tables in file: vmlinux
>   Failed to sort kernel tables
>   make[2]: *** [/home/mike/work/git/kernel-upstream/scripts/Makefile.vmlinux:35: vmlinux] Error 1
>   make[2]: *** Deleting file 'vmlinux'
>   make[1]: *** [/home/mike/work/git/kernel-upstream/Makefile:1256: vmlinux] Error 2
>   make: *** [Makefile:226: __sub-make] Error 2
> 
> I bisected the failure to commit
> 
>   eb0481bbc4ce ("objtool: Fix reloc_hash size")
> 
> I also tried gcc11 and building on a normal filesystem (rather than
> tmpfs) but the result is still the same. Different configurations (e.g.
> allmodconfig) only show more modules with "mmap fail reloc". The machine
> has 64 GB of RAM and both ulimit -m and ulimit -v show "unlimited".
> Anything idea what else I should try?

Michal, thx for the report. Please correct me if I'm wrong: this as of
now is unfixed, as your patch to fix is afaics wasn't merged yet (at
least I can't see it even in next, but I might be missing something).

Hence adding it to the regression tracking now that the end of the merge
window is near:

#regzbot ^introduced eb0481bbc4ce
#regzbot title objtool: build failure
#regzbot monitor:
https://lore.kernel.org/all/20230629102051.42E8360467@lion.mk-sys.cz/
#regzbot fix: objtool: initialize all of struct elf
#regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-07-08 13:40 ` Linux regression tracking (Thorsten Leemhuis)
@ 2023-07-09 14:09   ` Michal Kubecek
  2023-07-10 17:16     ` Josh Poimboeuf
  0 siblings, 1 reply; 13+ messages in thread
From: Michal Kubecek @ 2023-07-09 14:09 UTC (permalink / raw)
  To: Linux regressions mailing list
  Cc: Josh Poimboeuf, Peter Zijlstra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2716 bytes --]

On Sat, Jul 08, 2023 at 03:40:50PM +0200, Linux regression tracking (Thorsten Leemhuis) wrote:
> On 28.06.23 13:58, Michal Kubecek wrote:
> > 
> > this morning, mainline kernel builds started to fail on my desktop like
> > this:
> > 
> >   mike@lion:~/work/git/kernel-upstream> mkdir /srv/ram/kobj
> >   mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj defconfig >/dev/null
> >   mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj all >/dev/null
> >   net/ipv4/netfilter/iptable_nat.o: warning: objtool: mmap fail reloc
> >   net/netfilter/xt_mark.o: warning: objtool: mmap fail reloc
> >   net/netfilter/xt_nat.o: warning: objtool: mmap fail reloc
> >   net/netfilter/xt_LOG.o: warning: objtool: mmap fail reloc
> >   net/netfilter/xt_MASQUERADE.o: warning: objtool: mmap fail reloc
> >   net/netfilter/nf_log_syslog.o: warning: objtool: mmap fail reloc
> >   net/netfilter/xt_addrtype.o: warning: objtool: mmap fail reloc
> >   fs/efivarfs/efivarfs.o: warning: objtool: mmap fail reloc
> >   drivers/thermal/intel/x86_pkg_temp_thermal.o: warning: objtool: mmap fail reloc
> >   vmlinux.o: warning: objtool: mmap fail reloc
> >   incomplete ORC unwind tables in file: vmlinux
> >   Failed to sort kernel tables
> >   make[2]: *** [/home/mike/work/git/kernel-upstream/scripts/Makefile.vmlinux:35: vmlinux] Error 1
> >   make[2]: *** Deleting file 'vmlinux'
> >   make[1]: *** [/home/mike/work/git/kernel-upstream/Makefile:1256: vmlinux] Error 2
> >   make: *** [Makefile:226: __sub-make] Error 2
> > 
> > I bisected the failure to commit
> > 
> >   eb0481bbc4ce ("objtool: Fix reloc_hash size")
> > 
> > I also tried gcc11 and building on a normal filesystem (rather than
> > tmpfs) but the result is still the same. Different configurations (e.g.
> > allmodconfig) only show more modules with "mmap fail reloc". The machine
> > has 64 GB of RAM and both ulimit -m and ulimit -v show "unlimited".
> > Anything idea what else I should try?
> 
> Michal, thx for the report. Please correct me if I'm wrong: this as of
> now is unfixed, as your patch to fix is afaics wasn't merged yet (at
> least I can't see it even in next, but I might be missing something).

Yes, the fix has not been merged yet and current master (commit
1c7873e33645) still shows the issue.

Michal

> Hence adding it to the regression tracking now that the end of the merge
> window is near:
> 
> #regzbot ^introduced eb0481bbc4ce
> #regzbot title objtool: build failure
> #regzbot monitor:
> https://lore.kernel.org/all/20230629102051.42E8360467@lion.mk-sys.cz/
> #regzbot fix: objtool: initialize all of struct elf
> #regzbot ignore-activity

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-07-09 14:09   ` Michal Kubecek
@ 2023-07-10 17:16     ` Josh Poimboeuf
  2023-07-16 22:56       ` Michal Kubecek
  0 siblings, 1 reply; 13+ messages in thread
From: Josh Poimboeuf @ 2023-07-10 17:16 UTC (permalink / raw)
  To: Michal Kubecek
  Cc: Linux regressions mailing list, Peter Zijlstra, linux-kernel

On Sun, Jul 09, 2023 at 05:09:29PM +0300, Michal Kubecek wrote:
> On Sat, Jul 08, 2023 at 03:40:50PM +0200, Linux regression tracking (Thorsten Leemhuis) wrote:
> > On 28.06.23 13:58, Michal Kubecek wrote:
> > > 
> > > this morning, mainline kernel builds started to fail on my desktop like
> > > this:
> > > 
> > >   mike@lion:~/work/git/kernel-upstream> mkdir /srv/ram/kobj
> > >   mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj defconfig >/dev/null
> > >   mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj all >/dev/null
> > >   net/ipv4/netfilter/iptable_nat.o: warning: objtool: mmap fail reloc
> > >   net/netfilter/xt_mark.o: warning: objtool: mmap fail reloc
> > >   net/netfilter/xt_nat.o: warning: objtool: mmap fail reloc
> > >   net/netfilter/xt_LOG.o: warning: objtool: mmap fail reloc
> > >   net/netfilter/xt_MASQUERADE.o: warning: objtool: mmap fail reloc
> > >   net/netfilter/nf_log_syslog.o: warning: objtool: mmap fail reloc
> > >   net/netfilter/xt_addrtype.o: warning: objtool: mmap fail reloc
> > >   fs/efivarfs/efivarfs.o: warning: objtool: mmap fail reloc
> > >   drivers/thermal/intel/x86_pkg_temp_thermal.o: warning: objtool: mmap fail reloc
> > >   vmlinux.o: warning: objtool: mmap fail reloc
> > >   incomplete ORC unwind tables in file: vmlinux
> > >   Failed to sort kernel tables
> > >   make[2]: *** [/home/mike/work/git/kernel-upstream/scripts/Makefile.vmlinux:35: vmlinux] Error 1
> > >   make[2]: *** Deleting file 'vmlinux'
> > >   make[1]: *** [/home/mike/work/git/kernel-upstream/Makefile:1256: vmlinux] Error 2
> > >   make: *** [Makefile:226: __sub-make] Error 2
> > > 
> > > I bisected the failure to commit
> > > 
> > >   eb0481bbc4ce ("objtool: Fix reloc_hash size")
> > > 
> > > I also tried gcc11 and building on a normal filesystem (rather than
> > > tmpfs) but the result is still the same. Different configurations (e.g.
> > > allmodconfig) only show more modules with "mmap fail reloc". The machine
> > > has 64 GB of RAM and both ulimit -m and ulimit -v show "unlimited".
> > > Anything idea what else I should try?
> > 
> > Michal, thx for the report. Please correct me if I'm wrong: this as of
> > now is unfixed, as your patch to fix is afaics wasn't merged yet (at
> > least I can't see it even in next, but I might be missing something).
> 
> Yes, the fix has not been merged yet and current master (commit
> 1c7873e33645) still shows the issue.

Should be fixed in the tip tree with the following patch:

https://lkml.kernel.org/lkml/168897683429.404.6801969953192508868.tip-bot2@tip-bot2


> 
> Michal
> 
> > Hence adding it to the regression tracking now that the end of the merge
> > window is near:
> > 
> > #regzbot ^introduced eb0481bbc4ce
> > #regzbot title objtool: build failure
> > #regzbot monitor:
> > https://lore.kernel.org/all/20230629102051.42E8360467@lion.mk-sys.cz/
> > #regzbot fix: objtool: initialize all of struct elf
> > #regzbot ignore-activity



-- 
Josh

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size")
  2023-07-10 17:16     ` Josh Poimboeuf
@ 2023-07-16 22:56       ` Michal Kubecek
  0 siblings, 0 replies; 13+ messages in thread
From: Michal Kubecek @ 2023-07-16 22:56 UTC (permalink / raw)
  To: Josh Poimboeuf
  Cc: Linux regressions mailing list, Peter Zijlstra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2981 bytes --]

On Mon, Jul 10, 2023 at 10:16:28AM -0700, Josh Poimboeuf wrote:
> On Sun, Jul 09, 2023 at 05:09:29PM +0300, Michal Kubecek wrote:
> > On Sat, Jul 08, 2023 at 03:40:50PM +0200, Linux regression tracking (Thorsten Leemhuis) wrote:
> > > On 28.06.23 13:58, Michal Kubecek wrote:
> > > > 
> > > > this morning, mainline kernel builds started to fail on my desktop like
> > > > this:
> > > > 
> > > >   mike@lion:~/work/git/kernel-upstream> mkdir /srv/ram/kobj
> > > >   mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj defconfig >/dev/null
> > > >   mike@lion:~/work/git/kernel-upstream> make -j24 CC=gcc-13 O=/srv/ram/kobj all >/dev/null
> > > >   net/ipv4/netfilter/iptable_nat.o: warning: objtool: mmap fail reloc
> > > >   net/netfilter/xt_mark.o: warning: objtool: mmap fail reloc
> > > >   net/netfilter/xt_nat.o: warning: objtool: mmap fail reloc
> > > >   net/netfilter/xt_LOG.o: warning: objtool: mmap fail reloc
> > > >   net/netfilter/xt_MASQUERADE.o: warning: objtool: mmap fail reloc
> > > >   net/netfilter/nf_log_syslog.o: warning: objtool: mmap fail reloc
> > > >   net/netfilter/xt_addrtype.o: warning: objtool: mmap fail reloc
> > > >   fs/efivarfs/efivarfs.o: warning: objtool: mmap fail reloc
> > > >   drivers/thermal/intel/x86_pkg_temp_thermal.o: warning: objtool: mmap fail reloc
> > > >   vmlinux.o: warning: objtool: mmap fail reloc
> > > >   incomplete ORC unwind tables in file: vmlinux
> > > >   Failed to sort kernel tables
> > > >   make[2]: *** [/home/mike/work/git/kernel-upstream/scripts/Makefile.vmlinux:35: vmlinux] Error 1
> > > >   make[2]: *** Deleting file 'vmlinux'
> > > >   make[1]: *** [/home/mike/work/git/kernel-upstream/Makefile:1256: vmlinux] Error 2
> > > >   make: *** [Makefile:226: __sub-make] Error 2
> > > > 
> > > > I bisected the failure to commit
> > > > 
> > > >   eb0481bbc4ce ("objtool: Fix reloc_hash size")
> > > > 
> > > > I also tried gcc11 and building on a normal filesystem (rather than
> > > > tmpfs) but the result is still the same. Different configurations (e.g.
> > > > allmodconfig) only show more modules with "mmap fail reloc". The machine
> > > > has 64 GB of RAM and both ulimit -m and ulimit -v show "unlimited".
> > > > Anything idea what else I should try?
> > > 
> > > Michal, thx for the report. Please correct me if I'm wrong: this as of
> > > now is unfixed, as your patch to fix is afaics wasn't merged yet (at
> > > least I can't see it even in next, but I might be missing something).
> > 
> > Yes, the fix has not been merged yet and current master (commit
> > 1c7873e33645) still shows the issue.
> 
> Should be fixed in the tip tree with the following patch:
> 
> https://lkml.kernel.org/lkml/168897683429.404.6801969953192508868.tip-bot2@tip-bot2

The fix reached mainline now as

  9f71fbcde282 ("objtool: initialize all of struct elf")

and is present in 6.5-rc2 so that it no longer exhibits the issue.

Michal

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-07-16 22:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28 11:58 build failure after commit eb0481bbc4ce ("objtool: Fix reloc_hash size") Michal Kubecek
2023-06-28 15:16 ` Josh Poimboeuf
2023-06-28 15:44   ` Michal Kubecek
2023-06-28 16:06     ` Michal Kubecek
2023-06-28 16:45       ` Michal Kubecek
2023-06-28 17:05         ` Josh Poimboeuf
2023-06-28 17:26           ` Michal Kubecek
2023-06-28 18:10             ` Josh Poimboeuf
2023-06-28 19:32               ` Peter Zijlstra
2023-07-08 13:40 ` Linux regression tracking (Thorsten Leemhuis)
2023-07-09 14:09   ` Michal Kubecek
2023-07-10 17:16     ` Josh Poimboeuf
2023-07-16 22:56       ` Michal Kubecek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®