From: "H. Peter Anvin" <hpa@zytor.com>
To: Andy Lutomirski <luto@amacapital.net>,
Thomas Garnier <thgarnie@google.com>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
"kernel-hardening@lists.openwall.com"
<kernel-hardening@lists.openwall.com>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Heiko Carstens" <heiko.carstens@de.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"David Howells" <dhowells@redhat.com>,
"Dave Hansen" <dave.hansen@intel.com>,
"René Nyffenegger" <mail@renenyffenegger.ch>,
"Pavel Tikhomirov" <ptikhomirov@virtuozzo.com>,
"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
"X86 ML" <x86@kernel.org>, "Russell King" <linux@armlinux.org.uk>,
"Will Deacon" <will.deacon@arm.com>,
"Ingo Molnar" <mingo@kernel.org>,
"Christian Borntraeger" <borntraeger@de.ibm.com>,
"Ingo Molnar" <mingo@redhat.com>,
"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
"Stephen Smalley" <sds@tycho.nsa.gov>,
"Rik van Riel" <riel@redhat.com>,
"Vladimir Murzin" <vladimir.murzin@arm.com>
Subject: Re: [PATCH v4 1/4] syscalls: Restore address limit after a syscall
Date: Wed, 22 Mar 2017 13:54:10 -0700 [thread overview]
Message-ID: <5c59808f-6518-f51b-ee71-891b71404fc8@zytor.com> (raw)
In-Reply-To: <CALCETrV6K8iSfAwojMFyLrbb3CG2aF4k5hPWc7EDV4ErPDq64w@mail.gmail.com>
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
prev parent reply other threads:[~2017-03-22 20:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-22 20:38 [PATCH v4 1/4] syscalls: Restore address limit after a syscall Thomas Garnier
2017-03-22 20:38 ` [PATCH v4 2/4] x86/syscalls: Specific usage of verify_pre_usermode_state Thomas Garnier
2017-03-22 20:38 ` [PATCH v4 3/4] arm/syscalls: " Thomas Garnier
[not found] ` <20170322203834.67556-1-thgarnie-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2017-03-22 20:38 ` [PATCH v4 4/4] arm64/syscalls: " Thomas Garnier
2017-03-22 20:44 ` [PATCH v4 1/4] syscalls: Restore address limit after a syscall Andy Lutomirski
2017-03-22 20:49 ` Thomas Garnier
2017-03-22 20:54 ` H. Peter Anvin
2017-03-23 15:14 ` Thomas Garnier
2017-03-23 15:32 ` Borislav Petkov
[not found] ` <20170323153204.4lxglq6jlvvxp6ev-fF5Pk5pvG8Y@public.gmane.org>
2017-03-23 15:40 ` Thomas Garnier
2017-03-22 20:54 ` H. Peter Anvin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5c59808f-6518-f51b-ee71-891b71404fc8@zytor.com \
--to=hpa@zytor.com \
--cc=borntraeger@de.ibm.com \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@intel.com \
--cc=dhowells@redhat.com \
--cc=heiko.carstens@de.ibm.com \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luto@amacapital.net \
--cc=mail@renenyffenegger.ch \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=ptikhomirov@virtuozzo.com \
--cc=riel@redhat.com \
--cc=sds@tycho.nsa.gov \
--cc=thgarnie@google.com \
--cc=vladimir.murzin@arm.com \
--cc=will.deacon@arm.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).