Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2386362ybb; Sat, 21 Mar 2020 21:10:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtFbYipaFUf5DaCfttzOJR/wDkspJn2cqtwgd3dOY9DXD8RaHKFUwAUre9JMp8DfwA+PQmh X-Received: by 2002:aca:47c8:: with SMTP id u191mr12824406oia.17.1584850245102; Sat, 21 Mar 2020 21:10:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584850245; cv=none; d=google.com; s=arc-20160816; b=A4+20CGE7uJlkXt9GD2pUY4C3duNWjNvGsm9MnvtiglQXhz1slrtc7KYwpFsYTwFVS ySfV45eKj6VOSSQ8bKtsor2J7vhlDnldbbVU34ivA0nYL/easXqlEuBc1hjJfrqV6L8w cxceoXgCZHa1NWqlee7zpvm+NWdx+0+ssKqLM66dEpPm/gh+YBLrxRr+3eGc8NgwBSd3 rInPEcoRFdqqN2vXazsV35x/euOjLdNIfZ40n5IVPAFrEdV4yInD9Apyk3zXX/jzYDar nRJwlM8JFnedWlxYbco1y3sB1GA1tZTM97LyhqoBqptbqTpaJbFtVO5Wi9uTAopbooHq S2sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MmzjRpd1cA3MkO3jSisu6OnNkmFy4CJs3TYnE1Yhpxk=; b=Y7cBE9NMfwqS2vyJw/wpHzWjbEjakRDxIOKCn6jshJLow0Zww0yYoZgk1Lk1NX0Bko AmJoYr7RLCq1avx2ZrmJmY65umOvzxI5ZSkhqltalupmEMRptXouXkx4rCXQz2mcxEac nTt1Cp+MOsY4CUnBAHnX1zCc6lMS026n2PXY20RVdXbUFnCBQgSB2T0SNzFkpQc5WUJ7 gZp8gmRLOkIep1TLcym/NxohMOPaKqw9Hdwi5onSNxGEiqE9QTZqGfjVfpOqDdfZ9T+z yOsxw87JjWIJV/udDz9oqKbeP0TGZNFT30HUzwn7AAXS7jAqsumSt8WFrvA4tkUVa+MT YRWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wtvXqWUS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x79si4908646oif.180.2020.03.21.21.10.16; Sat, 21 Mar 2020 21:10:45 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=wtvXqWUS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725774AbgCVEHV (ORCPT + 99 others); Sun, 22 Mar 2020 00:07:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:40668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725283AbgCVEHU (ORCPT ); Sun, 22 Mar 2020 00:07:20 -0400 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF4CC20722 for ; Sun, 22 Mar 2020 04:07:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584850040; bh=MmzjRpd1cA3MkO3jSisu6OnNkmFy4CJs3TYnE1Yhpxk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=wtvXqWUSVy7uWtMRU4TUWbVyM+S83YisbvHE4bn4cf2aWyhh3J9BU4fKao3LtT10/ qOWpclXK6LbHYWs73DiXxzkRk18GsIUGke5xKWwhmf7jWteTIg22N0LlnXlDGiN9kz PmQHGFmkHmBBq8KffoHg4jwXhLb1aR/IvGHFdOsA= Received: by mail-wr1-f44.google.com with SMTP id j17so8900824wru.13 for ; Sat, 21 Mar 2020 21:07:19 -0700 (PDT) X-Gm-Message-State: ANhLgQ3pIYb4Ecpv4y0/Hfzqh/U/D4kQimdVY3Gdj2SEx5od89G6n9fX +XtJy+ZJUcTi503m6tbjPGjVvX4TbFgIa9aJCU+KiA== X-Received: by 2002:adf:df8f:: with SMTP id z15mr20651687wrl.184.1584850038167; Sat, 21 Mar 2020 21:07:18 -0700 (PDT) MIME-Version: 1.0 References: <20200312231222.81861-1-andi@firstfloor.org> <87sgi1rcje.fsf@nanos.tec.linutronix.de> <202003211916.8078081E0@keescook> In-Reply-To: <202003211916.8078081E0@keescook> From: Andy Lutomirski Date: Sat, 21 Mar 2020 21:07:07 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/speculation: Allow overriding seccomp speculation disable To: Kees Cook Cc: Thomas Gleixner , Andi Kleen , X86 ML , LKML , Andi Kleen , Will Drewry Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 21, 2020 at 7:29 PM Kees Cook wrote: > > On Sat, Mar 21, 2020 at 03:46:29PM +0100, Thomas Gleixner wrote: > > Cc+: Seccomp maintainers .... > > Thanks! > > > Andi Kleen writes: > > > [...] > > > > > > Longer term we probably need to discuss if the seccomp heuristic > > > is still warranted and should be perhaps changed. It seemed > > > like a good idea when these vulnerabilities were new, and > > > no web browsers supported site isolation. But with site isolation > > > widely deployed -- Chrome has it on by default, and as I understand > > > it, Firefox is going to enable it by default soon. And other seccomp > > > users (like sshd or systemd) probably don't really need it. > > > Given that it's not clear the default heuristic is still a good > > > idea. > > > > > > But anyways this patch doesn't change any defaults, just > > > let's applications override it. > > > > It changes the enforcement and I really want the seccomp people to have > > a say here. > > None of this commit makes sense to me. :) > > The point of the defaults was to grandfather older seccomp users into > speculation mitigations. Newly built seccomp users can choose to disable > this with SECCOMP_FILTER_FLAG_SPEC_ALLOW when applying seccomp filters. > The rationale was that once a process knows how to manage its exposure, > it can choose to leave off the automatic enabling. I don't see any > mention of that method in the commit log, so if there is some reason > it's not workable, that would need to be discussed first. Agreed. > > And the force disable matches the design goals of seccomp: no applied > restrictions can be later relaxed for a process. I'm more in favor of > changing the behavior of SPEC_STORE_BYPASS_CMD_AUTO, but probably not for > another 3 years at least. (To get us to at least 5 years since Meltdown, > which is relatively close to various longer LTS cycles.) > > -Kees > > -- > Kees Cook