Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1607025
| From | "H. Peter Anvin" <hpa@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 1/4] syscalls: Restore address limit after a syscall |
| Date | 2017-03-22 22:20 +0100 |
| Message-ID | <tnVPI-nl-5@gated-at.bofh.it> (permalink) |
| References | <tnVcZ-8hP-5@gated-at.bofh.it> <tnVmG-8m4-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 03/22/17 13:44, Andy Lutomirski wrote:
>
> While it's possible that silently papering over the bug is slightly
> faster than BUGging, it will allow bugs to continue to exist
> undetected.
>
It would also allow the test to be inlined (at least on architectures
which have a one-site implementation) and have only the failure case out
of line, with a __noreturn annotation (which allows it to be jumped to
rather than called, which is usually available as a conditional
operation whereas call often isn't.)
That is...
extern void __noreturn __pre_usermode_state_invalid(void);
static void verify_pre_usermode_state(void)
{
if (unlikely(!segment_eq(get_fs(), USER_DS))
__pre_usermode_state_invalid();
}
-hpa
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v4 1/4] syscalls: Restore address limit after a syscall Thomas Garnier <thgarnie@google.com> - 2017-03-22 21:40 +0100
[PATCH v4 4/4] arm64/syscalls: Specific usage of verify_pre_usermode_state Thomas Garnier <thgarnie@google.com> - 2017-03-22 21:40 +0100
Re: [PATCH v4 1/4] syscalls: Restore address limit after a syscall Andy Lutomirski <luto@amacapital.net> - 2017-03-22 21:50 +0100
Re: [PATCH v4 1/4] syscalls: Restore address limit after a syscall Thomas Garnier <thgarnie@google.com> - 2017-03-22 22:00 +0100
Re: [PATCH v4 1/4] syscalls: Restore address limit after a syscall "H. Peter Anvin" <hpa@zytor.com> - 2017-03-22 22:20 +0100
Re: [PATCH v4 1/4] syscalls: Restore address limit after a syscall Thomas Garnier <thgarnie@google.com> - 2017-03-23 16:20 +0100
Re: [PATCH v4 1/4] syscalls: Restore address limit after a syscall Borislav Petkov <bp@alien8.de> - 2017-03-23 16:40 +0100
Re: [PATCH v4 1/4] syscalls: Restore address limit after a syscall Thomas Garnier <thgarnie@google.com> - 2017-03-23 16:50 +0100
Re: [PATCH v4 1/4] syscalls: Restore address limit after a syscall "H. Peter Anvin" <hpa@zytor.com> - 2017-03-22 22:20 +0100
csiph-web