From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752835AbcFURY3 (ORCPT ); Tue, 21 Jun 2016 13:24:29 -0400 Received: from mail-lf0-f52.google.com ([209.85.215.52]:36267 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752707AbcFURY1 convert rfc822-to-8bit (ORCPT ); Tue, 21 Jun 2016 13:24:27 -0400 MIME-Version: 1.0 In-Reply-To: <13212319.WrhLzgRA6Z@wuerfel> References: <13212319.WrhLzgRA6Z@wuerfel> From: Kees Cook Date: Tue, 21 Jun 2016 10:16:21 -0700 X-Google-Sender-Auth: ob3r1DD0dmSOYjDY4JYqoZ23cUo Message-ID: Subject: Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) To: Arnd Bergmann Cc: Andy Lutomirski , "x86@kernel.org" , LKML , linux-arch , Borislav Petkov , Nadav Amit , Brian Gerst , "kernel-hardening@lists.openwall.com" , Linus Torvalds , Josh Poimboeuf , Jann Horn , Heiko Carstens Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 21, 2016 at 2:24 AM, Arnd Bergmann wrote: > On Monday, June 20, 2016 4:43:30 PM CEST Andy Lutomirski wrote: >> >> On my laptop, this adds about 1.5µs of overhead to task creation, >> which seems to be mainly caused by vmalloc inefficiently allocating >> individual pages even when a higher-order page is available on the >> freelist. > > Would it help to have a fixed virtual address for the stack instead > and map the current stack to that during a task switch, similar to > how we handle fixmap pages? > > That would of course trade the allocation overhead for a task switch > overhead, which may be better or worse. It would also give "current" > a constant address, which may give a small performance advantage > but may also introduce a new attack vector unless we randomize it > again. Right: we don't want a fixed address. That makes attacks WAY easier. -Kees -- Kees Cook Chrome OS & Brillo Security