From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754863AbcFPRuc (ORCPT ); Thu, 16 Jun 2016 13:50:32 -0400 Received: from mail-oi0-f51.google.com ([209.85.218.51]:33105 "EHLO mail-oi0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754021AbcFPRua (ORCPT ); Thu, 16 Jun 2016 13:50:30 -0400 MIME-Version: 1.0 In-Reply-To: <20160616060538.GA3923@osiris> References: <20160616060538.GA3923@osiris> From: Andy Lutomirski Date: Thu, 16 Jun 2016 10:50:09 -0700 Message-ID: Subject: Re: [PATCH 00/13] Virtually mapped stacks with guard pages (x86, core) To: Heiko Carstens Cc: Andy Lutomirski , "linux-kernel@vger.kernel.org" , X86 ML , Borislav Petkov , Nadav Amit , Kees Cook , Brian Gerst , "kernel-hardening@lists.openwall.com" , Linus Torvalds , Josh Poimboeuf Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 15, 2016 at 11:05 PM, Heiko Carstens wrote: > On Wed, Jun 15, 2016 at 05:28:22PM -0700, Andy Lutomirski wrote: >> Since the dawn of time, a kernel stack overflow has been a real PITA >> to debug, has caused nondeterministic crashes some time after the >> actual overflow, and has generally been easy to exploit for root. >> >> With this series, arches can enable HAVE_ARCH_VMAP_STACK. Arches >> that enable it (just x86 for now) get virtually mapped stacks with >> guard pages. This causes reliable faults when the stack overflows. >> >> If the arch implements it well, we get a nice OOPS on stack overflow >> (as opposed to panicing directly or otherwise exploding badly). On >> x86, the OOPS is nice, has a usable call trace, and the overflowing >> task is killed cleanly. > > Do you have numbers which reflect the performance impact of this change? > Hmm. My attempt to benchmark it caused some of the vmalloc core code to hang. I'll dig around. FWIW, I expect some overhead on clone/fork (if it's high, then that would be a good reason to improve vmalloc) and a small workload-dependent overhead due to increased TLB pressure. --Andy