Skip to contentSkip to conversation

linux-next: build failure after merge of the tip tree

DISCUSSION Stephen Rothwell 4 participants 7 messages Mar 30, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

ld: warning: discarding dynamic section .rela.data.rel.ro

lots of similar warnings, followed by

.exit.text' referenced in section __bug_table' of crypto/algboss.o: defined in discarded section .exit.text' of crypto/algboss.o .exit.text' referenced in section __bug_table' of drivers/macintosh/windfarm_core.o: defined in discarded section .exit.text' of drivers/macintosh/windfarm_core.o .exit.text' referenced in section __bug_table' of drivers/i2c/i2c-core-base.o: defined in discarded section `.exit.text' of drivers/i2c/i2c-core-base.o

Caused by commit

72cb2113c1bb ("vmlinux.lds: Discard .note.gnu.property sections in generic NOTES")

I don't see why, but reverting that commit fixes the build warnings and failure.

I have reverted that commit for today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 14 lines · Stephen Rothwell

Hi all,

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

ld: warning: discarding dynamic section .rela.data.rel.ro

lots of similar warnings, followed by

.exit.text' referenced in section __bug_table' of crypto/algboss.o: defined in discarded section .exit.text' of crypto/algboss.o .exit.text' referenced in section __bug_table' of drivers/macintosh/windfarm_core.o: defined in discarded section .exit.text' of drivers/macintosh/windfarm_core.o .exit.text' referenced in section __bug_table' of drivers/i2c/i2c-core-base.o: defined in discarded section `.exit.text' of drivers/i2c/i2c-core-base.o

Quoted 6 lines

Caused by commit

72cb2113c1bb ("vmlinux.lds: Discard .note.gnu.property sections in generic NOTES")

I don't see why, but reverting that commit fixes the build warnings and failure.

Please see my enclosing email. Is anyone from PPC community reading emails?

Quoted 4 lines

I have reverted that commit for today.
--
Cheers,
Stephen Rothwell

Signature · 1 line
H.J.
Quoted 120 lines · Yu-cheng Yu
Quoted 118 lines · H.J. Lu
Quoted 113 lines · Michael Ellerman
Quoted 20 lines · H.J. Lu
Quoted 12 lines · kbuild test robot
tree:   https://github.com/yyu168/linux_cet.git cet
head:   bba707cc4715c1036b6561ab38b16747f9c49cfa
commit: 71bb971dd76eeacd351690f28864ad5c5bec3691 [55/58] Discard .note.gnu.property sections in generic NOTES
config: powerpc-rhel-kconfig (attached as .config)
compiler: powerpc64le-linux-gcc (GCC) 7.5.0

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkout 71bb971dd76eeacd351690f28864ad5c5bec3691
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=powerpc

Quoted 6 lines

If you fix the issue, kindly add following tag

All warnings (new ones prefixed by >>):

powerpc64le-linux-ld: warning: discarding dynamic section .rela___ksymtab_gpl+__wait_rcu_gp

Quoted 7 lines

arch/powerpc/kernel/vmlinux.lds.S has

.rela.dyn : AT(ADDR(.rela.dyn) - (0xc000000000000000 -0x00000000)) {
__rela_dyn_start = .;
*(.rela*) <<<<<<<< Keep .rela* sections
}

The above is inside #ifdef CONFIG_RELOCATABLE

Quoted 9 lines

...
/DISCARD/ : {
*(*.EMB.apuinfo)
*(.glink .iplt .plt .rela* .comment)
^^^^ Discard .rela* sections. But it is ignored.
*(.gnu.version*)
*(.gnu.attributes)
*(.eh_frame)
}

But that is not #ifdef'ed at all.

Quoted 33 lines

With my

ommit 71bb971dd76eeacd351690f28864ad5c5bec3691

Author: H.J. Lu <[email protected]>
Date:   Thu Jan 30 12:39:09 2020 -0800

Discard .note.gnu.property sections in generic NOTES

With the command-line option, -mx86-used-note=yes, the x86 assembler in binutils 2.32 and above generates a program property note in a note section, .note.gnu.property, to encode used x86 ISAs and features. But kernel linker script only contains a single NOTE segment:

/DISCARD/ : { *(.note.gnu.property) }

is placed before

.rela.dyn : AT(ADDR(.rela.dyn) - (0xc000000000000000 -0x00000000))
{
__rela_dyn_start = .;
*(.rela*) <<<<<<<< Keep .rela* sections
}

Then .rela* in

/DISCARD/ : {
*(*.EMB.apuinfo)
*(.glink .iplt .plt .rela* .comment)
*(.gnu.version*)
*(.gnu.attributes)
*(.eh_frame)
}

Quoted 1 line

is honored. Can someone from POWERPC comment on it?

Hmm OK. I'm not really a toolchain person.

The comment on DISCARDS says:

* Some archs want to discard exit text/data at runtime rather than
* link time due to cross-section references such as alt instructions,
* bug table, eh_frame, etc. DISCARDS must be the last of output
* section definitions so that such archs put those in earlier section
* definitions.
*/

But I guess you're changing those semantics in your series.

This seems to fix the warning for me?

arch/powerpc/kernel/vmlinux.lds.S +4 -1
index b4c89a1acebb..076b3e8a849d 100644
@@ -365,9 +365,12 @@ SECTIONS
        DISCARDS
        /DISCARD/ : {
                *(*.EMB.apuinfo)
-               *(.glink .iplt .plt .rela* .comment)
+               *(.glink .iplt .plt .comment)
                *(.gnu.version*)
                *(.gnu.attributes)
                *(.eh_frame)
+#ifndef CONFIG_RELOCATABLE
+               *(.rela*)
+#endif
        }
 }
Quoted 1 line

cheers

This looks correct me.

Quoted 8 lines
Quoted 4 lines

Thanks.

Has this been merged into any branch yet? I just checked the tip tree and did not see it.

FYI, my patches have been queued on x86/build branch. Could someone
from PPC community add this patch to PPC kernel to avoid upcoming PPC kernel build failure?

Thanks.

Signature · 1 line
H.J.
#2 lore raw

Hi H.J.,

Quoted 2 lines · On Sun, 29 Mar 2020 20:53:42 -0700 "H.J. Lu" <[email protected]> wrote:

Please see my enclosing email. Is anyone from PPC community reading emails?

What you really need is an Ack from the PowerPC people for the fix you suggested and then tha fix should go in the same series that is now causing the failure (preferably before the problematic (for PowerPC) patch.

For reference, the change is (white space damaged):

arch/powerpc/kernel/vmlinux.lds.S +4 -1
index b4c89a1acebb..076b3e8a849d 100644
@@ -365,9 +365,12 @@ SECTIONS
        DISCARDS
        /DISCARD/ : {
                *(*.EMB.apuinfo)
-               *(.glink .iplt .plt .rela* .comment)
+               *(.glink .iplt .plt .comment)
                *(.gnu.version*)
                *(.gnu.attributes)
                *(.eh_frame)
+#ifndef CONFIG_RELOCATABLE
+               *(.rela*)
+#endif
        }
 }
Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
Quoted 4 lines · Stephen Rothwell

What you really need is an Ack from the PowerPC people for the fix you suggested and then tha fix should go in the same series that is now causing the failure (preferably before the problematic (for PowerPC) patch.

I'll zap this commit from the tip lineup. There's always another merge window.

Signature · 4 lines
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
reviewer Acked-by
#4 lore raw
Quoted 8 lines · Borislav Petkov
Quoted 4 lines · Stephen Rothwell

What you really need is an Ack from the PowerPC people for the fix you suggested and then tha fix should go in the same series that is now causing the failure (preferably before the problematic (for PowerPC) patch.

I'll zap this commit from the tip lineup. There's always another merge window.

Or just squash the hunk Stephen posted into the commit, which is what I thought would happen to begin with.

You can have my ack for it:

cheers

#5 lore raw
Quoted 6 lines · Michael Ellerman

Or just squash the hunk Stephen posted into the commit, which is what I thought would happen to begin with.

You can have my ack for it:

Thanks but considering how this is not really urgent stuff and it can take its time and get some wider testing before getting upstream, I'd prefer to delay it.

Signature · 4 lines
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
#6 lore raw
Quoted 5 lines · Borislav Petkov
Quoted 3 lines · Michael Ellerman

Or just squash the hunk Stephen posted into the commit, which is what I thought would happen to begin with.

Quoted 7 lines
Quoted 3 lines

You can have my ack for it:

Thanks but considering how this is not really urgent stuff and it can take its time and get some wider testing before getting upstream, I'd prefer to delay it.

Skip my commit will also delay other commits since they depend on my commit.

Signature · 1 line
H.J.