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
| ||
|
Date: Tue, 8 Mar 2016 11:27:55 +0100 From: Ingo Molnar <mingo@...nel.org> To: Andy Lutomirski <luto@...capital.net> Cc: Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Andrew Morton <akpm@...ux-foundation.org>, Andrew Cooper <andrew.cooper3@...rix.com>, Oleg Nesterov <oleg@...hat.com>, Peter Zijlstra <a.p.zijlstra@...llo.nl>, Brian Gerst <brgerst@...il.com>, "H. Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>, Linus Torvalds <torvalds@...ux-foundation.org> Subject: Re: [PATCH] x86/entry: Improve system call entry comments * Andy Lutomirski <luto@...capital.net> wrote: > > > ENTRY(entry_INT80_32) > > > > entry_INT80_32() is only used on pure 32-bit kernels, 64-bit kernels use > > entry_INT80_compat(). So the above text should not talk about 64-bit programs, as > > they can never trigger this specific entry point, right? > > > > 64-bit programs can and sometimes do trigger this entry point. [...] How can 64-bit programs trigger entry_INT80_32? It's only ever set on 32-bit kernels: #ifdef CONFIG_X86_32 set_system_trap_gate(IA32_SYSCALL_VECTOR, entry_INT80_32); set_bit(IA32_SYSCALL_VECTOR, used_vectors); #endif > [...] It does a 32-bit syscall regardless of the caller's bitness, but it > returns back to the caller's original context, whatever it was. That's true of INT $0x80, but I'm talking about the entry point: AFAICS entry_INT80_32 can only ever execute on 32-bit kernels. We don't even build the entry_32.S::entry_INT80_32 entry point on 64-bit kernels: obj-y := entry_$(BITS).o [...] > > > So I'd change the explanation to something like: > > > > > + * This entry point is active on 32-bit kernels and can thus be used by 32-bit > > > + * programs to perform 32-bit system calls. (Programs running on 64-bit > > > + * kernels executing INT $0x80 will land on another entry point: > > > + * entry_INT80_compat. The ABI is identical.) > > I like the part in parentheses. So the part in parentheses conflict with your above statement :) What I wanted to say with this: > > > + * This entry point is active on 32-bit kernels and can thus be used by 32-bit > > > + * programs to perform 32-bit system calls. (Programs running on 64-bit > > > + * kernels executing INT $0x80 will land on another entry point: > > > + * entry_INT80_compat. The ABI is identical.) ... is what it says: that entry_INT80_32 is only active on 32-bit kernels, running 32-bit programs, performing 32-bit system calls. Programs running on 64-bit kernels can use INT $0x80 as well, but will land on another, different, 64-bit kernel specific entry point. What am I missing? Thanks, Ingo
Powered by blists - more mailing lists