Subject: Re: [arm64:for-next/kernel-ptrauth 16/18] aarch64-linux-objdump: warning: fs/squashfs/decompressor_multi.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0000000

From: Catalin Marinas <[email-masked]>
Date: Tue, 24 Mar 2020 16:15:08 +0000

On Mon, Mar 23, 2020 at 10:36:15PM +0530, Amit Kachhap wrote:
> On 3/23/20 5:18 PM, Catalin Marinas wrote:
> > On Sat, Mar 21, 2020 at 12:28:06PM +0800, kbuild test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/kernel-ptrauth
> > > head:   3b446c7d27ddd06342901bb35211363f6944291a
> > > commit: 74afda4016a7437e6e425c3370e4b93b47be8ddf [16/18] arm64: compile the kernel with ptrauth return address signing
> > > config: arm64-randconfig-a001-20200321 (attached as .config)
> > > compiler: aarch64-linux-gcc (GCC) 9.2.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 74afda4016a7437e6e425c3370e4b93b47be8ddf
> > >          # save the attached .config to linux build tree
> > >          GCC_VERSION=9.2.0 make.cross ARCH=arm64
> > > 
> > > If you fix the issue, kindly add following tag
> > > Reported-by: kbuild test robot <[email-masked]>
> > > 
> > > All warnings (new ones prefixed by >>):
> > > 
> > > > > aarch64-linux-objdump: warning: fs/squashfs/decompressor_multi.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0000000
> > > --
> > > > > aarch64-linux-objdump: warning: drivers/gpio/gpio-bt8xx.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0000000
> > 
> > Just to make sure I understand the cause of this warning: gcc generates
> > a .note.gnu.property when PAC is enabled for the kernel but binutils
> > doesn't understand it. Is there a way to check for this via the Kconfig
> > options?
> 
> Yes you are right. In this case the binutils version lesser than 2.33 do not
> recognize the GNU_PROPERTY_AARCH64_FEATURE_1_PAC property.

Are there gcc versions supporting PAC but not generating the
.note.gnu.property?

> However we can disable pauth in this case by checking linker version
> and GNU_PROPERTY feature as,
> (readelf -S --wide tmp.o | grep .note.gnu.property) && (ld-ifversion -ge
> 233000000).
> 
> But I feel disabling pauth in this case seems too aggressive as the current
> way do not break any functionality even though it generates confusing
> warning messages.

If there isn't a way to silence the linker or objdump, could we align
the compiler version we know that generates this note with a minimum
binutils? Something like:

	depends on (GCC_VERSION < X) || (LD_VERSION >= 233...)

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel