Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1352850
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/entry: Improve system call entry comments |
| Date | 2016-03-08 11:40 +0100 |
| Message-ID | <randx-84x-39@gated-at.bofh.it> (permalink) |
| References | <r9KYy-8f9-3@gated-at.bofh.it> <r9YI9-oh-9@gated-at.bofh.it> <ra6mm-5hg-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
* H. Peter Anvin <hpa@zytor.com> wrote: > On March 7, 2016 12:22:28 AM PST, Ingo Molnar <mingo@kernel.org> wrote: > > > >* Andy Lutomirski <luto@kernel.org> wrote: > > > >> Ingo suggested that the comments should explain when the various > >> entries are used. This adds these explanations and improves other > >> parts of the comments. > > > >Thanks for doing this, this is really useful! > > > >One very small detail I noticed: > > > >> +/* > >> + * 32-bit legacy system call entry. > >> + * > >> + * 32-bit x86 Linux system calls traditionally used the INT $0x80 > >> + * instruction. INT $0x80 lands here. > >> + * > >> + * This entry point can be used by 32-bit and 64-bit programs to > >perform > >> + * 32-bit system calls. Instances of INT $0x80 can be found inline > >in > >> + * various programs and libraries. It is also used by the vDSO's > >> + * __kernel_vsyscall fallback for hardware that doesn't support a > >faster > >> + * entry method. Restarted 32-bit system calls also fall back to > >INT > >> + * $0x80 regardless of what instruction was originally used to do > >the > >> + * system call. > >> + * > >> + * This is considered a slow path. It is not used by modern libc > >> + * implementations on modern hardware except during process startup. > >> + * > >> + * Arguments: > >> + * eax system call number > >> + * ebx arg1 > >> + * ecx arg2 > >> + * edx arg3 > >> + * esi arg4 > >> + * edi arg5 > >> + * ebp arg6 > >> + */ > >> 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? > > > >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.) > > > >Agreed? > > > >Thanks, > > > > Ingo > > Sadly I believe Android still uses int $0x80 in the upstream version. I don't see how that fact conflicts with my statement: on 64-bit kernels INT $0x80 will (of course) work, but will land on another entry point: entry_INT80_compat(), not entry_INT80_32(). On 32-bit kernels the INT $0x80 entry point is entry_INT80_32(). Thanks, Ingo
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] x86/entry: Improve system call entry comments Andy Lutomirski <luto@kernel.org> - 2016-03-06 18:50 +0100
Re: [PATCH] x86/entry: Improve system call entry comments Ingo Molnar <mingo@kernel.org> - 2016-03-07 09:30 +0100
Re: [PATCH] x86/entry: Improve system call entry comments "H. Peter Anvin" <hpa@zytor.com> - 2016-03-07 17:40 +0100
Re: [PATCH] x86/entry: Improve system call entry comments Ingo Molnar <mingo@kernel.org> - 2016-03-08 11:40 +0100
Re: [PATCH] x86/entry: Improve system call entry comments "H. Peter Anvin" <hpa@zytor.com> - 2016-03-08 19:50 +0100
Re: [PATCH] x86/entry: Improve system call entry comments Andy Lutomirski <luto@amacapital.net> - 2016-03-08 20:00 +0100
Re: [PATCH] x86/entry: Improve system call entry comments "H. Peter Anvin" <hpa@zytor.com> - 2016-03-08 20:10 +0100
Re: [PATCH] x86/entry: Improve system call entry comments Andy Lutomirski <luto@amacapital.net> - 2016-03-08 20:20 +0100
Re: [PATCH] x86/entry: Improve system call entry comments "H. Peter Anvin" <hpa@zytor.com> - 2016-03-08 19:50 +0100
Re: [PATCH] x86/entry: Improve system call entry comments Andy Lutomirski <luto@amacapital.net> - 2016-03-08 19:50 +0100
Re: [PATCH] x86/entry: Improve system call entry comments Andy Lutomirski <luto@amacapital.net> - 2016-03-07 18:10 +0100
Re: [PATCH] x86/entry: Improve system call entry comments Ingo Molnar <mingo@kernel.org> - 2016-03-08 11:30 +0100
Re: [PATCH] x86/entry: Improve system call entry comments Andy Lutomirski <luto@amacapital.net> - 2016-03-08 19:40 +0100
csiph-web