lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2Bvebrvj7XGBtCwV969g0WhmGr_xFNfSRsZ7WX1J308g@mail.gmail.com>
Date:   Tue, 7 Apr 2020 17:46:23 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: libelf-0.175 breaks objtool

On Tue, Apr 7, 2020 at 12:31 AM Arnd Bergmann <arnd@...db.de> wrote:
> On Tue, Apr 7, 2020 at 12:16 AM Josh Poimboeuf <jpoimboe@...hat.com> wrote:
>
> It's also odd that I only see the problem in two specific files:
> arch/x86/realmode/rm/trampoline_64.o (in half of the randconfig builds)
> and fs/xfs/xfs_trace.o  (in only one configuration so far).
>
> With this patch I can avoid the first one, which is unconditionally
> built with -g (why?):
>
> --- a/arch/x86/realmode/rm/Makefile
> +++ b/arch/x86/realmode/rm/Makefile
> @@ -69,7 +69,7 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
>  # ---------------------------------------------------------------------------
>
>  KBUILD_CFLAGS  := $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \
> -                  -I$(srctree)/arch/x86/boot
> +                  -I$(srctree)/arch/x86/boot -gz=none
>  KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__
>  KBUILD_CFLAGS  += -fno-asynchronous-unwind-tables
>  GCOV_PROFILE := n
>
> I'll look at the other one tomorrow.

I found where -g gets added in both cases, and adding -gz=none
seems to address all randconfigs with CONFIG_DEBUG_INFO=n:

--- a/fs/xfs/Makefile
+++ b/fs/xfs/Makefile
@@ -7,7 +7,7 @@
 ccflags-y += -I $(srctree)/$(src)              # needed for trace events
 ccflags-y += -I $(srctree)/$(src)/libxfs

-ccflags-$(CONFIG_XFS_DEBUG) += -g
+ccflags-$(CONFIG_XFS_DEBUG) += -g $(call cc-option,-gz=none)

 obj-$(CONFIG_XFS_FS)           += xfs.o

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index f16e1fa52a28..17dd9ab538ed 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -40,6 +40,7 @@ REALMODE_CFLAGS += $(call __cc-option, $(CC),
$(REALMODE_CFLAGS), -ffreestanding
 REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS),
-fno-stack-protector)
 #REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS),
-Wno-address-of-packed-member)
 REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS),
$(cc_stack_align4))
+REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -gz=none)
 export REALMODE_CFLAGS

 # BITS is used as extension for files which are available in a 32 bit


I'm now building again with CONFIG_DEBUG_INFO enabled on x86, to see
if that triggers the same problem elsewhere.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ