Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 8 Mar 2017 14:20:24 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Russell King - ARM Linux <linux@...linux.org.uk>
Cc: Thomas Garnier <thgarnie@...gle.com>, Arnd Bergmann <arnd@...db.de>, 
	David Howells <dhowells@...hat.com>, Al Viro <viro@...iv.linux.org.uk>, 
	Dave Hansen <dave.hansen@...el.com>, René Nyffenegger <mail@...enyffenegger.ch>, 
	Andrew Morton <akpm@...ux-foundation.org>, Kees Cook <keescook@...omium.org>, 
	"Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>, Petr Mladek <pmladek@...e.com>, 
	Andy Lutomirski <luto@...nel.org>, Ard Biesheuvel <ard.biesheuvel@...aro.org>, 
	Nicolas Pitre <nicolas.pitre@...aro.org>, 
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Sergey Senozhatsky <sergey.senozhatsky@...il.com>, 
	Helge Deller <deller@....de>, Rik van Riel <riel@...hat.com>, Ingo Molnar <mingo@...nel.org>, 
	John Stultz <john.stultz@...aro.org>, Thomas Gleixner <tglx@...utronix.de>, 
	Oleg Nesterov <oleg@...hat.com>, Stanislav Kinsburskiy <skinsbursky@...tuozzo.com>, 
	Pavel Tikhomirov <ptikhomirov@...tuozzo.com>, Stephen Smalley <sds@...ho.nsa.gov>, 
	Frederic Weisbecker <fweisbec@...il.com>, Ingo Molnar <mingo@...hat.com>, "H . Peter Anvin" <hpa@...or.com>, 
	Paolo Bonzini <pbonzini@...hat.com>, Dmitry Safonov <dsafonov@...tuozzo.com>, 
	Borislav Petkov <bp@...en8.de>, Josh Poimboeuf <jpoimboe@...hat.com>, Brian Gerst <brgerst@...il.com>, 
	Alexander Potapenko <glider@...gle.com>, Jan Beulich <JBeulich@...e.com>, Will Deacon <will.deacon@....com>, 
	Catalin Marinas <catalin.marinas@....com>, Mark Rutland <mark.rutland@....com>, 
	James Morse <james.morse@....com>, Chris Metcalf <cmetcalf@...lanox.com>, 
	Laura Abbott <labbott@...hat.com>, Andre Przywara <andre.przywara@....com>, 
	Linux API <linux-api@...r.kernel.org>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>, 
	"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>, 
	"kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>
Subject: Re: [PATCH v1 1/4] syscalls: Restore address limit after a syscall

On Wed, Mar 8, 2017 at 1:58 PM, Russell King - ARM Linux
<linux@...linux.org.uk> wrote:
> On Wed, Mar 08, 2017 at 01:38:41PM -0800, Thomas Garnier wrote:
>> This patch prevents a syscall to modify the address limit of the
>> caller. The address limit is kept by the syscall wrapper and restored
>> just after the syscall ends.
>
> I would much rather architectures were given the opportunity to code up
> checks like this efficiently (iow, inline in the exit path assembly),
> rather than having to unconditionally call an additional function on
> every syscall, with its register saving overheads.
>

Me too.  I think the two config choices should be:

(a) BUG_ON(!segment_eq(...));

(b) No generic check at all -- arch code will handle it

--Andy

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.