[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFw8VGnVgaWHVFP-LChMNaoANOwT18jJEWzSCRLFeRGcmA@mail.gmail.com>
Date: Sun, 25 Mar 2018 20:15:32 -1000
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Ingo Molnar <mingo@...nel.org>,
Dominik Brodowski <linux@...inikbrodowski.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
linux-arch <linux-arch@...r.kernel.org>,
Ralf Baechle <ralf@...ux-mips.org>,
James Hogan <jhogan@...nel.org>,
linux-mips <linux-mips@...ux-mips.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
ppc-dev <linuxppc-dev@...ts.ozlabs.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
linux-s390 <linux-s390@...r.kernel.org>,
"David S . Miller" <davem@...emloft.net>,
sparclinux@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Jiri Slaby <jslaby@...e.com>,
"the arch/x86 maintainers" <x86@...nel.org>
Subject: Re: [RFC] new SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE wrappers
On Sun, Mar 25, 2018 at 5:47 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
>
> Linus, Dominik - how do you plan dealing with that fun?
Secretly, I was hoping to kill x32, because it's not being used afaik.
More realistically, I was thinking we'd just use a separate table or
system calls, and generate different versions.
In fact, you can see exactly that in my WIP branch, except it uses the
wrong name.
So see the "WIP-syscall" branch in my normal git kernel repo, and in
particular the patch to <linux/syscalls.h>, which generates
"sys_x64##name" and "sys_i86##name()" inline functions that do that
mapping correcty for native x86-64, and for the (misnamed) x32 cases.
So there are three different cases:
- native: sys_x64_name() generated by SYSCALL_DEFINEx()
- compat -bit: compat_sys_i86_name() generated by COMPAT_SYSCALL_DEFINEx()
- x32: sys_i86_name() generated by SYSCALL_DEFINEx().
and then I actually changed the names in the tables (ie in
arch/x86/entry/syscalls/syscall_64.tbl etc).
HOWEVER.
I didn't actually test any of the compat or x32 ones, and the way I
did it there also was no type-checking or other automated catching of
getting it wrong. So it's almost certainly completely buggy, but the
_intent_ is there and there is a remote possibility that it might even
work.
Linus
Powered by blists - more mailing lists