[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57D9C54B.3010105@linux.intel.com>
Date: Wed, 14 Sep 2016 14:46:51 -0700
From: Dave Hansen <dave.hansen@...ux.intel.com>
To: Kyle Huey <me@...ehuey.com>
Cc: Robert O'Callahan <robert@...llahan.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
Al Viro <viro@...iv.linux.org.uk>,
Anna Schumaker <Anna.Schumaker@...app.com>,
David Howells <dhowells@...hat.com>,
"Dmitry V. Levin" <ldv@...linux.org>,
Eric B Munson <emunson@...mai.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
"Michael S. Tsirkin" <mst@...hat.com>, Jiri Slaby <jslaby@...e.cz>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Borislav Petkov <bp@...en8.de>,
Dmitry Vyukov <dvyukov@...gle.com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/3] syscalls,x86 Expose arch_prctl on x86-32.
On 09/14/2016 02:35 PM, Kyle Huey wrote:
> It's not quite a plain move. To leave the existing arch_prctls only
> accessible to 64 bit callers, I added the is_32 bit and the four early
> returns for each existing ARCH_BLAH. These cases are now
> conditionally compiled out in a 32 bit kernel, so we only have to
> handle the 32 bit process on a 64 bit kernel case at runtime.
I think it would make a lot of sense to do the move and the modification
in two patches.
Oh, and arch_prctl() really *is* 64-bit only. I didn't realize that.
That would have been nice to call out in the changelog, too. It's
totally non-obvious.
You're going to owe some manpage updates after this too, I guess. It
says: "arch_prctl() is supported only on Linux/x86-64 for 64-bit
programs currently."
FWIW, I don't think it would be horrible to leave the existing
do_arch_prctl() code in process_64.h and call it
do_64_bit_only_something_arch_prctl(), and only call in to it from the
generic do_arch_prctl(). You really have one reason for all the "if
(is_32)"'s and it would be nice to document why in one single place.
Powered by blists - more mailing lists