Received: by 10.223.185.116 with SMTP id b49csp3044323wrg; Mon, 5 Mar 2018 13:04:19 -0800 (PST) X-Google-Smtp-Source: AG47ELsXZGuqbodDmtYaUZqVFSTyE+3Fyuwa9DaX99YrS7v5Hc10r860YuZrIvKsaHD2vhNactsc X-Received: by 2002:a17:902:b606:: with SMTP id b6-v6mr14067283pls.93.1520283859303; Mon, 05 Mar 2018 13:04:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520283859; cv=none; d=google.com; s=arc-20160816; b=dXUh84JKdmI7R5e1cfK/kQPjVp+lfq8ejqQcldLukzkyDRAJlEp/0cl5zbbfLtWuFq 1V7IOXU9inxMfeK6SuHcn7CxKWzAen3i84QNXHBWCGc3dlVBhIwaBvOPk5vmQ01HrIQ5 RS9+oCra0P6Lb6GovgZyQhy+R8bFaNM5W8UrSBGa11DF9P6g1cnPILyBHrabS/g7E7wy /CFxL+KMmawQKM1BnZaYO+zwHeiERg1nirbb0j4rq4wAFG1+/T0QzuWwoXavM4gTdfx3 MB/OKUCTpx3EDnd3zvrauMvRnaySAL0OTqDxTwF5ES+ARrIihdNZgRStRotthwTRN/hw xt4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:reply-to :arc-authentication-results; bh=cjNLLqRr4dyc9156C5hph3T5lj26JFROceuhZ4GLO2s=; b=DRsBQTNQiUnBML52QKiEyTXNkShjv3RU9t8eKrCP/OK65SOw0WjggN2mcE/6uhEM+R 2pLXQswlIm+pXlDygUHAc37ejgZepaA67ZfhutfbX1SQsrOSmi/heM/8BHjs8PU5Gzz7 Zc51ytIZzDSAc+3QiBtwGXQw6OZ5qBEV3HndMK/C/ZZgSHQG+Fr5TeSv6CfpkKGKJeNA SJ4q9hwLkyTe6UQQJcGG6XYX98ocV/gTKA8Zl7q9YHEuA/1qYTK+A2E7MHxDpoAk1F81 YpsByUs3vxrC0Gz6RhVTxLpB8VhMLDcq0auHW4lqkiSbYBL5O4PQTEqQpu1Yo+8/Y4XV leHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8-v6si9756249plt.687.2018.03.05.13.04.03; Mon, 05 Mar 2018 13:04:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752924AbeCEVCy (ORCPT + 99 others); Mon, 5 Mar 2018 16:02:54 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35206 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751275AbeCEVCx (ORCPT ); Mon, 5 Mar 2018 16:02:53 -0500 Received: by mail-lf0-f67.google.com with SMTP id 70so25258249lfw.2 for ; Mon, 05 Mar 2018 13:02:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=cjNLLqRr4dyc9156C5hph3T5lj26JFROceuhZ4GLO2s=; b=lHn2F3965poBwAfv0KqJnV02ST966onZKRp7g7QhuFvN/HAk6+USg/r4DJxNKgJrkH pk55GRSOHhOYH9elquSCjaSX0P1kK2DT8Xpf5wYjb+LoDZiaC5P+5ssbHPkB9pG0vNqj G/Htr4M45L5hYD6APKM2siRjpzWyU2egH7Vv+314YXFPs9yTOGx0krdETJcKOGNTc3OR SD7RBxGCfTwxr/2S6OqhkhHKbOHPuMwU6Cd0x0ZIOW6MQTSZ5hq1EfOT7baORhrJjfG7 lzniRL+j6ZM0OcR1R9X8zfAGNsgN/iXRGNRBgP1rR3dFkOkidcZJeD88XXbuRvAK3txb WgSQ== X-Gm-Message-State: APf1xPA/fIu02VeE9lLlIVaLrgqFtyhgdg1UK8ZcNMS+Yq7JxXK2FdN1 TXPtwQzILwvtNVT9ZI7UOHP0X+5yzjI= X-Received: by 10.46.99.11 with SMTP id x11mr11488650ljb.136.1520283771629; Mon, 05 Mar 2018 13:02:51 -0800 (PST) Received: from [192.168.1.147] ([176.15.214.2]) by smtp.gmail.com with ESMTPSA id u11sm2834264ljd.70.2018.03.05.13.02.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 13:02:50 -0800 (PST) Reply-To: alex.popov@linux.com Subject: Re: [PATCH RFC v9 4/7] x86/entry: Erase kernel stack in syscall_trace_enter() To: Linus Torvalds , Kees Cook Cc: Dave Hansen , Kernel Hardening , PaX Team , Brad Spengler , Ingo Molnar , Andy Lutomirski , Tycho Andersen , Laura Abbott , Mark Rutland , Ard Biesheuvel , Borislav Petkov , Richard Sandiford , Thomas Gleixner , "H . Peter Anvin" , Peter Zijlstra , "Dmitry V . Levin" , Emese Revfy , Jonathan Corbet , Andrey Ryabinin , "Kirill A . Shutemov" , Thomas Garnier , Andrew Morton , Alexei Starovoitov , Josef Bacik , Masami Hiramatsu , Nicholas Piggin , Al Viro , "David S . Miller" , Ding Tianhong , David Woodhouse , Josh Poimboeuf , Steven Rostedt , Dominik Brodowski , Juergen Gross , Greg Kroah-Hartman , Dan Williams , Mathias Krause , Vikas Shivappa , Kyle Huey , Dmitry Safonov , Will Deacon , Arnd Bergmann , X86 ML , LKML References: <1520107232-14111-1-git-send-email-alex.popov@linux.com> <1520107232-14111-5-git-send-email-alex.popov@linux.com> From: Alexander Popov Message-ID: Date: Tue, 6 Mar 2018 00:02:49 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Linus, Thanks for your reply (despite some strong words). On 05.03.2018 23:15, Linus Torvalds wrote: > This is the first I see of any of this, it was apparently not actually > posted to lkml or anything like that. I described that below. > Honestly, what I see just makes me go "this is security-masturbation". Let me quote the cover letter of this patch series. STACKLEAK (initially developed by PaX Team): - reduces the information that can be revealed through kernel stack leak bugs; - blocks some uninitialized stack variable attacks (e.g. CVE-2017-17712, CVE-2010-2963); - introduces some runtime checks for kernel stack overflow detection. It blocks the Stack Clash attack against the kernel. So it seems to be a useful feature. > It doesn't actually seem to help *find* bugs at all. As such, it's > another "paper over and forget" thing that just adds fairly high > overhead when it's enabled. The cover letter also contains the information about the performance impact. It's 0.6% on the compiling the kernel (with Ubuntu config) and approx 4% on a very intensive hackbench test. > I'm NAK'ing it sight-unseen (see above) just because I'm tired of > these kinds of pointless things that don't actually strive to improve > on the kernel, just add more and more overhead for nebulous "things > may happen", and that just make the code uglier. > > Why wasn't it even posted to lkml? That's my mistake. I started to learn that feature 9 month ago, just before Qualys published the Stack Clash attack (which is blocked by STACKLEAK). I sent first WIP versions to a short list of people (and had a lot of feedback to work with). But later unfortunately I didn't adjust the list of recipients. That was not done intentionally. > And why isn't the focus of security people on tools to _analyse_ and > find problems? You know, I like KASAN and kernel fuzzing as well: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=82f2341c94d270421f383641b7cd670e474db56b Best regards, Alexander