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: <20181104233857.b4ou3b7doclw2vi2@mail.google.com>
Date:   Sun, 4 Nov 2018 23:38:58 +0000
From:   Changbin Du <changbin.du@...il.com>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     Arnd Bergmann <arnd@...db.de>, Changbin Du <changbin.du@...il.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux-Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Hans de Goede <hdegoede@...hat.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: linux-next: Tree for Oct 31 (vboxguest)

On Sun, Nov 04, 2018 at 11:43:44AM +0900, Masahiro Yamada wrote:
> On Sat, Nov 3, 2018 at 12:55 AM Arnd Bergmann <arnd@...db.de> wrote:
> >
> > On 11/2/18, Masahiro Yamada <yamada.masahiro@...ionext.com> wrote:
> > > On Thu, Nov 1, 2018 at 11:32 PM Changbin Du <changbin.du@...il.com> wrote:
> > >> On Thu, Nov 01, 2018 at 12:32:48PM +0900, Masahiro Yamada wrote:
> > >
> > > How about clang?
> > >
> > > For clang, -Og might be equivalent to -O1 at this moment, but I am not
> > > sure.
> > >
> > > In my understanding, Clang does not inline functions marked with 'static
> > > inline'
> > > for -Og (or -O1) optimization level.
> > >
> > > Theoretically, 'inline' keyword is a just hint for the compiler, after all.
> >
> > I think this means that we cannot build the kernel in that configuration,
> > at least with CONFIG_OPTIMIZE_INLINING=y. Without that option,
> > every 'inline' becomes 'always_inline'.
> >
> 
> Sorry, I missed that fact.
> 
> 
> At this moment of time, it is OK given the following:
> 
>  - CONFIG_OPTIMIZE_INLINING is defined only for x86
>  - Clang cannot build x86 due to missing asm-goto
> 
> 
> However, Clang with -Og
> does not inline even such simple code like this:
> 
> 
> -----test code------
> static inline int foo(int x)
> {
>         return x;
> }
> 
> int bar(int x)
> {
>         return foo(x);
> }
> -------------------
> 
> 
> 
> $ clang -Og -c -o bar.o  bar.c
> $ objdump -d  bar.o
> bar.o:     file format elf64-x86-64
> 
> 
> Disassembly of section .text:
> 
> 0000000000000000 <bar>:
>    0: eb 0e                jmp    10 <foo>
>    2: 66 2e 0f 1f 84 00 00 nopw   %cs:0x0(%rax,%rax,1)
>    9: 00 00 00
>    c: 0f 1f 40 00          nopl   0x0(%rax)
> 
> 0000000000000010 <foo>:
>   10: 89 f8                mov    %edi,%eax
>   12: c3                    retq
> 
> 
I see. Thanks for your explanation. So I think we should disable
CONFIG_DEBUG_EXPERIENCE for clang. Do you know how to distinguish
different copmilers in Kconfig?

> 
> -- 
> Best Regards
> Masahiro Yamada

-- 
Thanks,
Changbin Du

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ