[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAB=4xhrGqGi-XoG9xG=XrOkdSJeshxQ2WKw7TRO1XeKBuz+J4A@mail.gmail.com>
Date: Mon, 6 Feb 2012 12:39:28 -0800
From: Roland McGrath <mcgrathr@...gle.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Denys Vlasenko <vda.linux@...glemail.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Indan Zupancic <indan@....nu>,
Andi Kleen <andi@...stfloor.org>,
Jamie Lokier <jamie@...reable.org>,
Andrew Lutomirski <luto@....edu>,
Oleg Nesterov <oleg@...hat.com>,
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
Subject: Re: Compat 32-bit syscall entry from 64-bit task!?
On Mon, Feb 6, 2012 at 12:30 PM, H. Peter Anvin <hpa@...or.com> wrote:
> What is needed to make a regset variable-sized? Just declaring that it
> may change in size in the future, or does one need a length field at the
> top (I would personally have expected that both notes and ptrace would
> have out-of-band methods for getting the size?)
ELF notes do have a size field, so core files are self-explanatory. There
is no ptrace interface to directly interrogate the regset details (one
could be added). But the PTRACE_GETREGSET interface is to accept an upper
bound and yield the actual size filled in (which might be less than the
regset's size if the user-supplied buffer was smaller). So in practice, a
caller can just use a buffer that's sure to be large enough, and then look
at iov_len for the actual size delivered. (And nobody has yet complained
about this for xstate, though that might just be that nobody is really
using it.)
Thanks,
Roland
--
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