Re: [GIT PULL] Block driver changes for 5.20-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 3, 2022 at 8:16 AM Jens Axboe <axboe@xxxxxxxxx> wrote:
>
> On the topic of warnings, on my new build box I get a lot of these:
>
> ld: warning: arch/x86/lib/putuser.o: missing .note.GNU-stack section implies executable stack
> ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
>
> which ends up polluting the output quite a bit.
>
> axboe@r7525 ~> ld --version
> GNU ld (GNU Binutils for Debian) 2.38.90.20220713

Ok, I have binutils 2.37, so it may be new to 2.38.

Some googling around seems to imply that we'd need to so something like this

   .section .note.GNU-stack,"",%progbits

in all our *.S files.

We do have some signs of that in our tooling, because apparently it
has hit user-space, but I wonder what has triggered the need on the
kernel side for you.

I'd hate to add that pointless line to every asm file, but maybe we
could so something like this

   #ifdef __ASSEMBLY_
   #ifdef OUTPUT_PROGBITS
      .section .note.GNU-stack,"",%progbits
      #undef OUTPUT_PROGBITS
   #endif
   #endif

and then change our 'AS' command line to do '-DOUTPUT_PROGBITS' in our
makefiles.

*Most* asm files should include <linux/linkage.h> just for all the
macros that declare variables externally, so that might catch the bulk
of it.

Somebody who knows the rules better than I would be a good idea.

I've added random people who have touched those linkage things in the
past to the participants, in the hope that somebody goes, "No, Linus,
just add flag XYZ to the linker script" or other and there's a clear
and obvious solution.

               Linus



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux