From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH v1 1/4] syscalls: Restore address limit after a syscall Date: Wed, 8 Mar 2017 21:58:15 +0000 Message-ID: <20170308215814.GG21222@n2100.armlinux.org.uk> References: <20170308213844.131877-1-thgarnie@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170308213844.131877-1-thgarnie@google.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Thomas Garnier Cc: Nicolas Pitre , Mark Rutland , kernel-hardening@lists.openwall.com, Frederic Weisbecker , Sebastian Andrzej Siewior , Will Deacon , linux-kernel@vger.kernel.org, David Howells , Dave Hansen , Alexander Potapenko , Jan Beulich , "H . Peter Anvin" , Borislav Petkov , Ingo Molnar , Pavel Tikhomirov , Chris Metcalf , Helge Deller , x86@kernel.org, =?iso-8859-1?Q?Ren=E9?= Nyffenegger , Catalin Marinas , "Paul E . McKenney" , Stephen Smalley , Petr Mladek , Rik List-Id: linux-api@vger.kernel.org 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. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.