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]
Date:   Wed, 13 Jan 2021 15:27:09 -0800
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Sedat Dilek <sedat.dilek@...il.com>
Cc:     Masahiro Yamada <masahiroy@...nel.org>,
        Nathan Chancellor <natechancellor@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Clang-Built-Linux ML <clang-built-linux@...glegroups.com>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Jakub Jelinek <jakub@...hat.com>,
        Fangrui Song <maskray@...gle.com>,
        Caroline Tice <cmtice@...gle.com>,
        Nick Clifton <nickc@...hat.com>
Subject: Re: [PATCH v4 2/3] Kbuild: make DWARF version a choice

Sedat,
Thanks for testing, and congrats on https://lwn.net/Articles/839772/.
I always appreciate you taking the time to help test my work, and
other Clang+Linux kernel patches!

On Wed, Jan 13, 2021 at 1:24 PM Sedat Dilek <sedat.dilek@...il.com> wrote:
>
> On Wed, Jan 13, 2021 at 1:32 AM Nick Desaulniers
> <ndesaulniers@...gle.com> wrote:
> >
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -826,12 +826,16 @@ else
> >  DEBUG_CFLAGS   += -g
> >  endif
> >
> > -ifneq ($(LLVM_IAS),1)
> > -KBUILD_AFLAGS  += -Wa,-gdwarf-2
> > +dwarf-version-$(CONFIG_DEBUG_INFO_DWARF2) := 2
> > +dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4
> > +DEBUG_CFLAGS   += -gdwarf-$(dwarf-version-y)

^ DEBUG_CFLAGS are set for everyone (all toolchains) if
CONFIG_DEBUG_INFO is defined.

> > +ifneq ($(dwarf-version-y)$(LLVM_IAS),21)

^ "If not using dwarf 2 and LLVM_IAS=1", ie. CONFIG_DEBUG_INFO_DWARF5
&& CONFIG_CC_IS_GCC

> > +# Binutils 2.35+ required for -gdwarf-4+ support.
> > +dwarf-aflag    := $(call as-option,-Wa$(comma)-gdwarf-$(dwarf-version-y))
> > +ifdef CONFIG_CC_IS_CLANG

^ "if clang"

> > +DEBUG_CFLAGS   += $(dwarf-aflag)
> >  endif
>
> Why is that "ifdef CONFIG_CC_IS_CLANG"?

That's what Arvind requested on v2, IIUC:
https://lore.kernel.org/lkml/X8psgMuL4jMjP%2FOy@rani.riverdale.lan/

> When I use GCC v10.2.1 DEBUG_CFLAGS are not set.

You should have -gdwarf-4 (and not -Wa,-gwarf-4) set for DEBUG_CFLAGS
when compiling with GCC and enabling CONFIG_DEBUG_INFO_DWARF4. Can you
please confirm? (Perhaps you may have accidentally disabled
CONFIG_DEBUG_INFO by rerunning `make defconfig`?)
-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ