Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp549853img; Mon, 18 Mar 2019 08:55:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzS2sMgCZy87rXhtsrqBxwcp/oSWwusqvplKoDMU3jt5Y6dzRRuGJvvtDJlWg/HBFGtz5aP X-Received: by 2002:a63:61d7:: with SMTP id v206mr315444pgb.349.1552924539251; Mon, 18 Mar 2019 08:55:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552924539; cv=none; d=google.com; s=arc-20160816; b=TmdTjGlwlrzzM+0qL/0Cm1/6Lmio+PxhoutlgcveTtuemTxZo7/bDZvh3wVRAJGhCF Td7Q3rMiF8MQV6oHesBh9L8M//ZwjLGPXpVs/OrCETerWlOfJqDvFlT/9AXL6otD7IMn 1VqDI75cvOgdRyE95jOzcQN6UHa8EB01ON5Rniv4AywEMXVD9aniWnfPkiI+JuS8qydg kGEh66rbEQzOEJNCRnQKldP+MjmHDkuI1IvAoIWiKkvJDtA47dkAV6dd7kWgPtLRhQXu aEK/6chl25PEt22GVDF+5UEvkkB7IZ0ZJiBva94xsNhaXLcSHv5VqVzuSsFgSX59jIE4 VOwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:subject:cc:to :from:date:user-agent:message-id:dkim-signature; bh=ZzqstxTm+4RKpAgonk1jK5brJjDJNa9fUa5HmM0UqMk=; b=I046jet9mSg+nsFFaKkC4Rxs11l1A9aDVaz2gRYFlY4O6Q1+csEIqA3S6i2w1tV8Gw GVOJpho2BR+vCMfNxcagg+utlQnxZ7URc3kl134lv/sjPfGxAN9Zs8gTVTzqRW+0Ifq5 xwpzy5GJKIaO4TqdimJNcLQCq5zUmJAiQ+0SaxeGEWYbiRS3sUoWgduH3QjVl2vIMD8H 5o+MuJVNwaDGY34TKmhBT1dFyh00rKYeFkMtTRTaL4yFTXatwB6ruv1dq21GlnaLQUDZ ViJ+pvKkOdWqD17WaSRGxP+V5aOUgObaqtFW1TUKZVmJxVHDIEU6vhdkKt4b9fPHnr0T KT8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=fq6G0g5y; 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 r192si9163729pgr.331.2019.03.18.08.55.23; Mon, 18 Mar 2019 08:55:39 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=fq6G0g5y; 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 S1727991AbfCRPyP (ORCPT + 99 others); Mon, 18 Mar 2019 11:54:15 -0400 Received: from merlin.infradead.org ([205.233.59.134]:58722 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727653AbfCRPw6 (ORCPT ); Mon, 18 Mar 2019 11:52:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-Id:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZzqstxTm+4RKpAgonk1jK5brJjDJNa9fUa5HmM0UqMk=; b=fq6G0g5yV0qih+1vTQYPLzrZg+ 5pf2RKMVYlFtoTUmod8/ZpXCnU8fQZO31sE3z0zsnioTvhGxSgDxB07c5SquL5ZX+bZDbl3dDx9uv /GZ5RsUAy8T17gDe1x15d7EdSiaHgsTnR3ijuV5/cS2eUuXAxcr5iMJH8SxLyLZHjrkkbbvFQxTse eapo/86xsZHS8sfBmY6o+Uark/4IWou1exK0GPh8D0KsEFFh0g3jj1Cnv2jIQ8aY4+SuJG6K/Dd2l cVVeJv0WbsHdx8yKw9Pt+LsXAj7gl2QpbqzyQ7mBaFdu4lvt4BvE/4Pgn/ZEm6o29e3XSgIsxh7zp oJUr++cA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5uZ5-0005Uh-Rk; Mon, 18 Mar 2019 15:52:40 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 824EC2026BE92; Mon, 18 Mar 2019 16:52:38 +0100 (CET) Message-Id: <20190318155139.963285969@infradead.org> User-Agent: quilt/0.65 Date: Mon, 18 Mar 2019 16:38:41 +0100 From: Peter Zijlstra To: torvalds@linux-foundation.org, tglx@linutronix.de, hpa@zytor.com, julien.thierry@arm.com, will.deacon@arm.com, luto@amacapital.net, mingo@kernel.org, catalin.marinas@arm.com, james.morse@arm.com, valentin.schneider@arm.com, brgerst@gmail.com, jpoimboe@redhat.com, luto@kernel.org, bp@alien8.de, dvlasenk@redhat.com Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, dvyukov@google.com, rostedt@goodmis.org Subject: [PATCH 01/25] x86: Make SMAP 64-bit only References: <20190318153840.906404905@infradead.org> MIME-Version: 1.0 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 We rely on objtool to verify AC=1 doesn't escape. However there is no objtool support for x86_32, and thus we cannot guarantee the correctness of the 32bit code. Also; if you're running 32bit kernels on hardware with SMAP (which all should have LM support afaik) you're doing it wrong anyway. XXX: we could do the PUSHF/POPF thing in __switch_to_asm() on x86_32, but why bother. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/Kconfig | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1853,6 +1853,8 @@ config ARCH_RANDOM config X86_SMAP def_bool y + # Note: we rely on objtool to validate AC=1 doesn't escape + depends on HAVE_STACK_VALIDATION prompt "Supervisor Mode Access Prevention" if EXPERT ---help--- Supervisor Mode Access Prevention (SMAP) is a security