[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 08 Aug 2012 17:02:33 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Oleg Nesterov <oleg@...hat.com>
CC: linux-kernel@...r.kernel.org, x86@...nel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Roland McGrath <roland@...hat.com>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
Ananth N Mavinakaynahalli <ananth@...ibm.com>,
stan_shebs@...tor.com
Subject: Re: [PATCH 2/5] x86/uprobes: implement x86 specific arch_uprobe_*_step
On 08/08/2012 04:53 PM, Oleg Nesterov wrote:
>> Why? I tried 'lock popf' and I got invalid instruction. The same for
>> 'rep popf'.
>
> int main(void)
> {
> asm volatile ("pushf; rep; popf");
>
> return 0;
> }
>
Just tested and it works. Hmm.
> OK, probably nobody should do this (although the kernel should not
> assume this imho), but
>
> asm volatile ("pushfw; popfw");
>
> doesn't look bad and the code is
>
> 000000000040047c<main>:
> 40047c: 55 push %rbp
> 40047d: 48 89 e5 mov %rsp,%rbp
> 400480: 66 9c pushfw
> 400482: 66 9d popfw
> 400484: b8 00 00 00 00 mov $0x0,%eax
> 400489: c9 leaveq
> 40048a: c3 retq
Yes, that one works as well.
> And in any case it would be better to re-use auprobe->fixups.
Okay.
> Oleg.
>
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists