All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>,
	kbuild test robot <fengguang.wu@intel.com>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	the arch/x86 maintainers <x86@kernel.org>
Subject: Re: [linus:master] BUILD REGRESSION a2e5790d841658485d642196dbb0927303d6c22f
Date: Thu, 8 Feb 2018 10:35:35 +0100	[thread overview]
Message-ID: <20180208093535.GE25235@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20180208091302.GD25201@hirez.programming.kicks-ass.net>

On Thu, Feb 08, 2018 at 10:13:02AM +0100, Peter Zijlstra wrote:
> _The_ problem is that new binutils cannot sanely decode any function
> that has a WARN in (this very much includes perf annotate):

> new:
> 
> 00000000000016a0 <copy_overflow>:
>     16a0:       48 89 f2                mov    %rsi,%rdx
>     16a3:       89 fe                   mov    %edi,%esi
>     16a5:       48 c7 c7 00 00 00 00    mov    $0x0,%rdi
>                         16a8: R_X86_64_32S      .rodata.str1.8+0x288
>     16ac:       e8 00 00 00 00          callq  16b1 <copy_overflow+0x11>
>                         16ad: R_X86_64_PC32     __warn_printk-0x4
>     16b1:       0f ff c3                ud0    %ebx,%eax
>     16b4:       66 90                   xchg   %ax,%ax
>     16b6:       66 2e 0f 1f 84 00 00    nopw   %cs:0x0(%rax,%rax,1)
>     16bd:       00 00 00 

And note that this example is fairly 'good' as far as things go, it only
eats the single byte ret instruction and is on an instruction boundary
again, so the rest is good.

There are examples where what it eats results in shifting the
instruction boundary and the rest is _complete_ crap.

Look what it does to sched_cpu_dying:


    7199:       48 39 c3                cmp    %rax,%rbx
    719c:       0f 84 cc 00 00 00       je     726e <sched_cpu_dying+0x1fe>
    71a2:       0f ff 41 c6             ud0    -0x3a(%rcx),%eax
    71a6:       87 3c 07                xchg   %edi,(%rdi,%rax,1)
    71a9:       00 00                   add    %al,(%rax)
    71ab:       00 8b 43 04 83 f8       add    %cl,-0x77cfbbd(%rbx)
    71b1:       01 0f                   add    %ecx,(%rdi)
    71b3:       85 4f ff                test   %ecx,-0x1(%rdi)
    71b6:       ff                      (bad)  
    71b7:       ff 48 8b                decl   -0x75(%rax)
    71ba:       44 24 08                rex.R and $0x8,%al


    7199:       48 39 c3                cmp    %rax,%rbx
    719c:       0f 84 cc 00 00 00       je     726e <sched_cpu_dying+0x1fe>
    71a2:       0f ff                   (bad)  
    71a4:       41 c6 87 3c 07 00 00    movb   $0x0,0x73c(%r15)
    71ab:       00 
    71ac:       8b 43 04                mov    0x4(%rbx),%eax
    71af:       83 f8 01                cmp    $0x1,%eax
    71b2:       0f 85 4f ff ff ff       jne    7107 <sched_cpu_dying+0x97>
    71b8:       48 8b 44 24 08          mov    0x8(%rsp),%rax
    71bd:       48 8b 74 24 10          mov    0x10(%rsp),%rsi

  reply	other threads:[~2018-02-08  9:35 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 11:44 [linus:master] BUILD REGRESSION a2e5790d841658485d642196dbb0927303d6c22f kbuild test robot
2018-02-07 18:13 ` Linus Torvalds
2018-02-07 18:35   ` Borislav Petkov
2018-02-07 18:49     ` Peter Zijlstra
2018-02-07 19:03       ` Linus Torvalds
2018-02-07 19:14         ` Peter Zijlstra
2018-02-07 19:28           ` Borislav Petkov
2018-02-07 19:43             ` Linus Torvalds
2018-02-07 20:24               ` Borislav Petkov
2018-02-08  9:13               ` Peter Zijlstra
2018-02-08  9:35                 ` Peter Zijlstra [this message]
2018-02-08  9:46                 ` Borislav Petkov
2018-02-08  9:47                 ` David Laight
2018-02-08 10:13                   ` Peter Zijlstra
2018-02-08 17:27                 ` Linus Torvalds
2018-02-08 18:03                   ` Peter Zijlstra
2018-02-08 18:15                     ` Linus Torvalds
2018-02-08 19:44                       ` Peter Zijlstra
2018-02-08 20:02                         ` Linus Torvalds
2018-02-08 20:31                         ` Borislav Petkov
2018-02-08 23:09                           ` [PATCH 0/2] objtool fixes on top of Peter's WARN UD2 patch Josh Poimboeuf
2018-02-08 23:09                             ` [PATCH 1/2] objtool: Fix seg fault in ignore_unreachable_insn() Josh Poimboeuf
2018-02-13 11:29                               ` [tip:x86/pti] objtool: Fix segfault " tip-bot for Josh Poimboeuf
2018-02-15  0:26                               ` tip-bot for Josh Poimboeuf
2018-02-08 23:09                             ` [PATCH 2/2] x86: Annotate WARN-related UD2 as reachable Josh Poimboeuf
2018-02-13 11:30                               ` [tip:x86/pti] x86/debug, objtool: Annotate WARN()-related " tip-bot for Josh Poimboeuf
2018-02-15  0:26                               ` tip-bot for Josh Poimboeuf
2018-02-09  8:13                             ` [PATCH 0/2] objtool fixes on top of Peter's WARN UD2 patch Peter Zijlstra
2018-02-09  8:12                           ` [linus:master] BUILD REGRESSION a2e5790d841658485d642196dbb0927303d6c22f Peter Zijlstra
2018-02-13 11:30                         ` [tip:x86/pti] x86/debug: Use UD2 for WARN() tip-bot for Peter Zijlstra
2018-02-15  0:27                         ` tip-bot for Peter Zijlstra
2018-02-07 18:38   ` [linus:master] BUILD REGRESSION a2e5790d841658485d642196dbb0927303d6c22f Randy Dunlap
2018-02-07 19:01     ` Linus Torvalds
2018-02-07 19:06       ` Peter Zijlstra
2018-02-07 19:10         ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180208093535.GE25235@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@alien8.de \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.