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: <20181218232636.GM25620@tassilo.jf.intel.com>
Date:   Tue, 18 Dec 2018 15:26:36 -0800
From:   Andi Kleen <ak@...ux.intel.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Martin Jambor <mjambor@...e.cz>, Miroslav Benes <mbenes@...e.cz>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Arnd Bergmann <arnd@...db.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        the arch/x86 maintainers <x86@...nel.org>
Subject: Re: objtool warnings for kernel/trace/trace_selftest_dynamic.o

On Tue, Dec 18, 2018 at 05:16:20PM -0500, Steven Rostedt wrote:
> On Tue, 18 Dec 2018 14:13:38 -0800
> Andi Kleen <ak@...ux.intel.com> wrote:
> 
> > > Again, that's not the ftrace case. It doesn't care about more than one
> > > out of line instance. Thus, for this particular use, "used" should be
> > > good enough.  
> > 
> > You mean noinline used? 
> 
> I thought that someone said that "used" would also prevent inlining.

that's not correct. You need noinline

-Andi

[ak@...silo tsrc]$ cat tinline.c

int i;

inline __attribute__((used)) int finline(void)
{
        i++;
}


main()
{
        finline();
}

[ak@...silo tsrc]$ gcc -O2 -S tinline.c
tinline.c:10:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main()
 ^~~~
[ak@...silo tsrc]$
[ak@...silo tsrc]$ cat tinline.s
        .file   "tinline.c"
        .text
        .section        .text.startup,"ax",@progbits
        .p2align 4,,15
        .globl  main
        .type   main, @function
main:
.LFB1:
        .cfi_startproc
        addl    $1, i(%rip)
        xorl    %eax, %eax
        ret
        .cfi_endproc
.LFE1:
        .size   main, .-main
        .comm   i,4,4
        .ident  "GCC: (GNU) 8.2.1 20181105 (Red Hat 8.2.1-5)"
        .section        .note.GNU-stack,"",@progbits
[ak@...silo tsrc]$




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ