Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1381277
| From | "H. Peter Anvin" <hpa@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path |
| Date | 2016-04-18 08:10 +0200 |
| Message-ID | <rpaxH-Jy-5@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <rp9Lk-8w6-7@gated-at.bofh.it> <rp9UZ-94-3@gated-at.bofh.it> <rpa4G-f9-3@gated-at.bofh.it> <rpaem-jl-9@gated-at.bofh.it> <rpaem-jl-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/17/16 22:48, Andy Lutomirski wrote: > > I think I prefer the "reject weird input" behavior over the "accept > and normalize weird input" if we can get away with it, and I'm fairly > confident that we can get away with "reject weird input" given that > distro kernels do exactly that already. > It's not "weird", it is the ABI as defined. We have to do this for all the system call arguments, too; you just don't notice it because the compiler does it for us. Some other architectures, e.g. s390, has the opposite convention where the caller is responsible for normalizing the result; in that case we have to do it *again* in the kernel, which is one of the major reasons for the SYSCALL_*() macros. So I'm not sure this is a valid consideration. The reason it generally works is because the natural way for the user space code to work is to load a value into %eax which will naturally zero-extend to %rax, but it isn't inherently required to work that way. -hpa
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: System call number masking Ben Hutchings <ben@decadent.org.uk> - 2016-04-18 02:50 +0200
[PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path Ben Hutchings <ben@decadent.org.uk> - 2016-04-18 02:50 +0200
Re: [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path "H. Peter Anvin" <hpa@zytor.com> - 2016-04-18 07:00 +0200
Re: [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path Andy Lutomirski <luto@amacapital.net> - 2016-04-18 07:20 +0200
Re: [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path "H. Peter Anvin" <hpa@zytor.com> - 2016-04-18 07:30 +0200
Re: [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path "H. Peter Anvin" <hpa@zytor.com> - 2016-04-18 07:30 +0200
Re: [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path Andy Lutomirski <luto@amacapital.net> - 2016-04-18 07:40 +0200
Re: [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path "H. Peter Anvin" <hpa@zytor.com> - 2016-04-18 07:50 +0200
Re: [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path Andy Lutomirski <luto@amacapital.net> - 2016-04-18 07:50 +0200
Re: [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path "H. Peter Anvin" <hpa@zytor.com> - 2016-04-18 08:10 +0200
Re: [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path "H. Peter Anvin" <hpa@zytor.com> - 2016-04-18 08:20 +0200
Re: [PATCH] x86/entry/x32: Check top 32 bits of syscall number on the fast path Andy Lutomirski <luto@amacapital.net> - 2016-04-18 08:20 +0200
csiph-web