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: <4F21220E.9080404@redhat.com>
Date:	Thu, 26 Jan 2012 09:51:10 +0000
From:	Pedro Alves <palves@...hat.com>
To:	Denys Vlasenko <vda.linux@...glemail.com>
CC:	Pedro Alves <palves@...hat.com>,
	Jamie Lokier <jamie@...reable.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Indan Zupancic <indan@....nu>,
	Andi Kleen <andi@...stfloor.org>,
	Andrew Lutomirski <luto@....edu>,
	Will Drewry <wad@...omium.org>, linux-kernel@...r.kernel.org,
	keescook@...omium.org, john.johansen@...onical.com,
	serge.hallyn@...onical.com, coreyb@...ux.vnet.ibm.com,
	pmoore@...hat.com, eparis@...hat.com, djm@...drot.org,
	segoon@...nwall.com, rostedt@...dmis.org, jmorris@...ei.org,
	scarybeasts@...il.com, avi@...hat.com, penberg@...helsinki.fi,
	viro@...iv.linux.org.uk, mingo@...e.hu, akpm@...ux-foundation.org,
	khilman@...com, borislav.petkov@....com, amwang@...hat.com,
	ak@...ux.intel.com, eric.dumazet@...il.com, gregkh@...e.de,
	dhowells@...hat.com, daniel.lezcano@...e.fr,
	linux-fsdevel@...r.kernel.org,
	linux-security-module@...r.kernel.org, olofj@...omium.org,
	mhalcrow@...gle.com, dlaor@...hat.com,
	Roland McGrath <mcgrathr@...omium.org>
Subject: Re: Compat 32-bit syscall entry from 64-bit task!?

On 01/26/2012 08:53 AM, Denys Vlasenko wrote:
> On Thu, Jan 26, 2012 at 9:23 AM, Pedro Alves <palves@...hat.com> wrote:
>> On 01/26/2012 12:59 AM, Jamie Lokier wrote:
>>> Tracers mainly want to know if it's a 32-bit or 64-bit syscall, not
>>> whether it's compat as such.
>>
>> Another idea, avoiding new PTRACE_EVENTs per arch, would be to make
>> the abi32/abi64/compat/whatnot discriminator retrievable with PTRACE_GETEVENTMSG
>> instead.  So you'd get PTRACE_EVENT_SYSCALL_ENTRY|EXIT, or the regular old
>> 0x80|SIGTRAP, you'd still fetch the syscall number from $orig_ax (or whatever means
>> for other archs), as usual, then have extra syscall info in PTRACE_GETEVENTMSG.
>> I don't know if it'd be simple to make it possible to do PTRACE_GETEVENTMSG
>> on a 0x80|SIGTRAP trap, but I imagine it so.
>>
>> -> wait
>>  <- 0x80|SIGTRAP   (or PTRACE_EVENT_SYSCALL_ENTRY)
>> -> read regs, find out syscall number
>> -> PTRACE_GETEVENTMSG, figure out which entry mode was used.
> 
> This would require additional ptrace op per syscall entry.
> Linus' method and event method wouldn't.

Yes.

In any case, ptrace events leave recording the state in core files
behind; possibly also important for userspace c/r.
Linus' method or a new regset don't have that drawback.  A new regset requires
an additional ptrace op too, while the former abuses an architecture register,
possibly leading to headaches later on.

-- 
Pedro Alves
--
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