public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Baron <jbaron@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	masami.hiramatsu.pt@hitachi.com, rth@redhat.com
Subject: Re: [PATCH][GIT PULL] tracing: Fix compile issue for trace_sched_wakeup.c
Date: Mon, 25 Oct 2010 13:52:50 -0400	[thread overview]
Message-ID: <20101025175249.GB2884@redhat.com> (raw)
In-Reply-To: <1288028746.3673.11.camel@laptop>

On Mon, Oct 25, 2010 at 07:45:46PM +0200, Peter Zijlstra wrote:
> On Mon, 2010-10-25 at 17:47 +0200, Peter Zijlstra wrote:
> 
> > NOP'ed vs JMP'ed
> > 
> 
> >   56:	6a 00                	push   $0x0                          6a 00                	push   $0x0
> >   58:	e8 b7 fe ff ff       	call   0xffffff14                    e8 b7 fe ff ff       	call   0xffffff14
> >   5d:	8b 43 1c             	mov    0x1c(%ebx),%eax               8b 43 1c             	mov    0x1c(%ebx),%eax
> >   60:	89 44 24 04          	mov    %eax,0x4(%esp)                89 44 24 04          	mov    %eax,0x4(%esp)
> >   64:	f0 fe 07             	lock incb (%edi)                     f0 fe 07             	lock incb (%edi)
> >   67:*	0f 1f 44 00 00       	nopl   0x0(%eax,%eax,1)              e9 03 00 00 00       	jmp    0x6f              <--- PATCHED INSN
> >   6c:	58                   	pop    %eax                          58                   	pop    %eax
> >   6d:	eb 1d                	jmp    0x8c                          eb 1d                	jmp    0x8c
> >   6f:	8b 35 70 ad 40 c1    	mov    0xc140ad70,%esi               8b 35 70 ad 40 c1    	mov    0xc140ad70,%esi
> >   75:	85 f6                	test   %esi,%esi                     85 f6                	test   %esi,%esi
> >   77:	74 13                	je     0x8c                          74 13                	je     0x8c
> >   79:	8b 46 04             	mov    0x4(%esi),%eax                8b 46 04             	mov    0x4(%esi),%eax
> >   7c:	89 da                	mov    %ebx,%edx                     89 da                	mov    %ebx,%edx
> >   7e:	8b 4c 24 04          	mov    0x4(%esp),%ecx                8b 4c 24 04          	mov    0x4(%esp),%ecx
> >   82:	ff 16                	call   *(%esi)                       ff 16                	call   *(%esi)
> >   84:	83 c6 08             	add    $0x8,%esi                     83 c6 08             	add    $0x8,%esi
> >   87:	83 3e 00             	cmpl   $0x0,(%esi)                   83 3e 00             	cmpl   $0x0,(%esi)
> >   8a:	eb eb                	jmp    0x77                          eb eb                	jmp    0x77
> >   8c:	89 d8                	mov    %ebx,%eax                     89 d8                	mov    %ebx,%eax
> >   8e:	ff 14 24             	call   *(%esp)                       ff 14 24             	call   *(%esp)
> 
> OK, new theory.. 
> 
> 56 pushl 0
> 67 nopl         jmp 0x6f
>    popl
>    jmp 0x8c
> 
> 6f              mov
>                 test
> 		je 0x8c
> 
> 8c mov
>    call *(%esp)
> 
> 
> So in the jumped path we miss a popl which pop's the 0 pushed before,
> which is the exact address call is failing on..
> 
> Looks like gcc got its branches confused or something..
> 
> Am I reading this right?

Hi Peter,

(adding Richard Henderson to the 'cc list)

Yes, the missing popl in the enabled looked wrong to me as well...I've
been inquiring about this with gcc folks.

thanks,

-Jason 

  reply	other threads:[~2010-10-25 17:54 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19 17:11 [PATCH][GIT PULL] tracing: Fix compile issue for trace_sched_wakeup.c Steven Rostedt
2010-10-19 18:41 ` Ingo Molnar
2010-10-20 15:40   ` Ingo Molnar
2010-10-20 16:37     ` Steven Rostedt
2010-10-20 18:40       ` Ingo Molnar
2010-10-20 16:43     ` Jason Baron
2010-10-20 18:33       ` Ingo Molnar
2010-10-21 11:09         ` Ingo Molnar
2010-10-22 17:58           ` Jason Baron
2010-10-22 18:24             ` Ingo Molnar
2010-10-22 18:39               ` Jason Baron
2010-10-23 20:02                 ` Ingo Molnar
2010-10-24  0:53                   ` Steven Rostedt
2010-10-24 11:25                     ` Ingo Molnar
2010-10-25  8:59                       ` Ingo Molnar
2010-10-25  9:30                         ` Ingo Molnar
2010-10-25 11:45                           ` Ingo Molnar
2010-10-25 12:10                             ` Ingo Molnar
2010-10-25 12:18                               ` Peter Zijlstra
2010-10-25 12:32                                 ` Ingo Molnar
2010-10-25 15:47                                 ` Peter Zijlstra
2010-10-25 16:07                                   ` Peter Zijlstra
2010-10-25 17:25                                   ` Ingo Molnar
2010-10-25 17:32                                     ` Ingo Molnar
2010-10-25 17:45                                   ` Peter Zijlstra
2010-10-25 17:52                                     ` Jason Baron [this message]
2010-10-30 10:42                                     ` [tip:perf/urgent] jump label: Add work around to i386 gcc asm goto bug tip-bot for Steven Rostedt
2010-10-25 15:55                   ` [PATCH][GIT PULL] tracing: Fix compile issue for trace_sched_wakeup.c Jason Baron
2010-10-25 16:09                     ` Peter Zijlstra
2010-10-22 21:42               ` Jason Baron
2010-10-23  4:41                 ` Steven Rostedt
2010-10-21  2:58       ` Masami Hiramatsu
2010-10-21  7:22         ` Peter Zijlstra
2010-10-21 11:01           ` Steven Rostedt
2010-10-21 11:03             ` Peter Zijlstra
2010-10-21 12:45               ` Steven Rostedt
2010-10-21 13:50               ` Jason Baron
2010-10-22  4:56               ` Masami Hiramatsu
2010-10-21 14:00         ` Jason Baron
2010-10-21 11:14     ` Steven Rostedt
2010-10-21 11:26       ` Ingo Molnar
2010-10-21 13:55         ` Jason Baron
2010-10-21 14:43           ` Ingo Molnar
2010-10-22  1:44         ` Jason Baron
2010-10-22  8:14           ` Peter Zijlstra
2010-10-22 14:13             ` Jason Baron
2010-10-22 14:23               ` Peter Zijlstra
2010-10-22 14:36                 ` Steven Rostedt
2010-10-22 14:36                 ` Jason Baron
2010-10-22  8:16           ` Tejun Heo

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=20101025175249.GB2884@redhat.com \
    --to=jbaron@redhat.com \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=rth@redhat.com \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox