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: <CAK1hOcMVQN4sQjMnV3YBtd6hi8ZtbxPuguVHGxGgSPGn2scsNQ@mail.gmail.com>
Date:	Wed, 25 Jan 2012 15:39:19 +0100
From:	Denys Vlasenko <vda.linux@...glemail.com>
To:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Oleg Nesterov <oleg@...hat.com>, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux-mm <linux-mm@...ck.org>, Andi Kleen <andi@...stfloor.org>,
	Christoph Hellwig <hch@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Roland McGrath <roland@...k.frob.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Arnaldo Carvalho de Melo <acme@...radead.org>,
	Anton Arapov <anton@...hat.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Jim Keniston <jkenisto@...ux.vnet.ibm.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH v9 3.2 1/9] uprobes: Install and remove breakpoints.

On Tue, Jan 10, 2012 at 12:48 PM, Srikar Dronamraju
<srikar@...ux.vnet.ibm.com> wrote:
> +/*
> + * opcodes we'll probably never support:
> + * 6c-6d, e4-e5, ec-ed - in
> + * 6e-6f, e6-e7, ee-ef - out
> + * cc, cd - int3, int

I imagine desire to set a breakpoint on int 0x80 will be rather typical.
(Same for sysenter).

> + * cf - iret

Iret does work. Test program for 32-bit x86:

/* gcc -nostartfiles -nostdlib -o iret iret.S */
_start: .globl  _start
        pushf
        push    %cs
        push    $_e
        iret  /* will this jump to _e? Yes! */
        hlt   /* segv if reached */
_e:     movl    $42, %ebx
        movl    $1, %eax
        int     $0x80

I guess supporting probes in weird stuff like ancient DOS emulators
(they actually use iret) is not important.

OTOH iret doesn't seem to be too hard: if it fails (bad cs/eflags
on stack), then the location of iret instruction per se is not
terribly important.
If it works, then you need to be careful to not mess up eip,
same as you already do with ordinary [l]ret, nothing more.


Come to think of it, why do you bother checking for
invalid instructions? What can happen if you would just copy
and run all instructions? You already are prepared to handle
exceptions, right?


-- 
vda
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ