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

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

 



On 8/3/22 10:51 AM, Nick Desaulniers wrote:
> On Wed, Aug 3, 2022 at 9:26 AM Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> 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.
> 
> $ as --help | grep exec
>   --execstack             require executable stack for this object
>   --noexecstack           don't require executable stack for this object
>   --statistics            print various measured statistics from execution
> 
> Does adding `--noexecstack` to KBUILD_ASFLAGS for these architectures
> help, rather than modifying every assembler source?

I can try whatever here, but a quick grep doesn't find anything for
KBUILD_ASFLAGS or anything close to it. What am I missing?

-- 
Jens Axboe




[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