Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp931407ybv; Wed, 19 Feb 2020 12:11:54 -0800 (PST) X-Google-Smtp-Source: APXvYqw32xioBaC1UDojsbatLP2p6PxRPkfbWkLHxZdQJsa+QVI4ikJ0Vbk/ZWfnBZGUfnxJwmJ1 X-Received: by 2002:a9d:6b91:: with SMTP id b17mr19721624otq.235.1582143113927; Wed, 19 Feb 2020 12:11:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582143113; cv=none; d=google.com; s=arc-20160816; b=a+78fNcyrJu0aZJT+6dxzMMiTn9A+cdIQSR7hlp9aFO6ER9zZXKCDm2xqvkLaGMVDM L6rxDKXWj2Puuc5OeGCJq77CuyvqXtbsOZFzvC4Nl+bTB4fxgXl8V/wJizgatFH/84/v dJbMYUr97PRNPst0yr7wLaLFwOQaHjMRdC5XjQKrKmPcKaoJ3zFCM3oNFCZ/MMfEUB/p Rc0tnYiaSC6k4DxJwyg43RBfwVZ7b1qw5Ew234ugIUEiuBgbMs7ygV6qOjE8LItWE0ZP g4+73KlRfiJIKZVKhQd37/QE4QTHSpPRAiWidzKTEs8Pgz1ycUdEDpjK9MB4hcOEihdi 4zjA== 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=+h8OMq5ap5ScfL8XqeP9gKwIkHjfAosh3tAUb+IoSRs=; b=eec1ATfqJdOHVGWlvzmx20w22OBF7Go8gbFuX+67ZwOxYsW+32R0Jw06+aXxdLTk/W 5uo/uGwcZ6Y38hpu5GncSVp6GyiHyZuLRb8yMNZYOSRapvfBD5SzYcpiCG+tcdvVb9g0 MQl0l0/0pGLOApqwq/4KQStrIUoBSJvKwAv367ej0yKXW+8MZRdpVk4etHp1NITH/YV3 DI3ZfGWRwQqjmDb13D37VEgQqIsIAhT3poQC/JntU9JAScxcppFcCMG9c063Y6k/4w2+ yKr5u9EvQBDAnETa/RfTtsBHCl9Nq0LM4utMEajBDp3VqApqVAj7XJcjF8lJDue154JL dShQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=StGX0zg+; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f141si1329363oib.125.2020.02.19.12.11.41; Wed, 19 Feb 2020 12:11:53 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=StGX0zg+; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727035AbgBSULB (ORCPT + 99 others); Wed, 19 Feb 2020 15:11:01 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:40257 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726634AbgBSULA (ORCPT ); Wed, 19 Feb 2020 15:11:00 -0500 Received: by mail-io1-f66.google.com with SMTP id x1so1998569iop.7 for ; Wed, 19 Feb 2020 12:11:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+h8OMq5ap5ScfL8XqeP9gKwIkHjfAosh3tAUb+IoSRs=; b=StGX0zg+xGzM+nwSZF3wlA5TRpwRQV5LywLkEYDUQA8ItE8WvExKoaWyzqtWaBAZZj xXiwktKui2oz2yXjjVoDOY2JhsknoK22qlgduTqvon/np3lpZqf4fYX/HvTFhsZtSCa9 5tbkbKiAlRgP4XjBMC2zc4OIod3FwGklWggFRHJcAqxAZBEO8GK3k0M/dq7SqdLkaXYw uZTmP3nm8OINa8oQ+Qj4jRwa4T7UAkFYMBbk+Dwaf4nOzO5r5uBVk/s4KPG6YZlhBCsC Td2PLQT7QU+3ZvSrcw/cSHkinmm58Td71PO/ZldX9vSy22u6oZ/iler8dZzHZZ9holk2 7VUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+h8OMq5ap5ScfL8XqeP9gKwIkHjfAosh3tAUb+IoSRs=; b=FDJdw2erSkdmLtgZ5C/lyLPJr2z2GF7xeAJTcJ6loELodnKiAudzuoI5nwMmusZsTO zezToCk2MoG3pRv8LYCE1zEtmjvLWHpmYUkOZfNRDb1HzkJpiXJbwwTCXl4EIHuf5Jrt YuAfGoramH5Lo5G1iP/CaT6WcLq656KY81C0//Tr1oFnZdyd8s30+w2ox9Lv9R8Uxxjn Oe22oU1KWf5DuvxxcjPvUcWKIWRV0rKTupAxfKocwrul/7oQS9eX+77wLdyVEk8FHq8U 4SyNIwRdhKScnayLYa2wMjqqe0QNdbG2Xs8chimeVlVqruI1gxgk2kSxVz7Mn7fLYyzf hYjw== X-Gm-Message-State: APjAAAV6xGjgjotQ2KdzNZ1mFKAur72SEnyeQnL3oSdiXS+ZbAiy0/25 lppQaJp6t29Z/f0z068raGgveVAT87iCoanoIsXD X-Received: by 2002:a6b:7b41:: with SMTP id m1mr19646049iop.191.1582143060172; Wed, 19 Feb 2020 12:11:00 -0800 (PST) MIME-Version: 1.0 References: <87zhdeq4qu.fsf@nanos.tec.linutronix.de> In-Reply-To: <87zhdeq4qu.fsf@nanos.tec.linutronix.de> From: Brian Gerst Date: Wed, 19 Feb 2020 15:10:49 -0500 Message-ID: Subject: Re: [PATCH] x86/entry/32: Add missing ASM_CLAC in general_protection entry To: Thomas Gleixner Cc: LKML , "the arch/x86 maintainers" 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 Wed, Feb 19, 2020 at 4:58 AM Thomas Gleixner wrote: > > All exception entry points must have ASM_CLAC right at the > beginning. The general_protection entry is missing one. > > Fixes: e59d1b0a2419 ("x86-32, smap: Add STAC/CLAC instructions to 32-bit kernel entry") > Signed-off-by: Thomas Gleixner > Cc: stable@vger.kernel.org > --- > arch/x86/entry/entry_32.S | 1 + > 1 file changed, 1 insertion(+) > > --- a/arch/x86/entry/entry_32.S > +++ b/arch/x86/entry/entry_32.S > @@ -1681,6 +1681,7 @@ SYM_CODE_START(int3) > SYM_CODE_END(int3) > > SYM_CODE_START(general_protection) > + ASM_CLAC > pushl $do_general_protection > jmp common_exception > SYM_CODE_END(general_protection) How about moving ASM_CLAC to common_exception instead? That would save a few bytes (kernel text + alternatives), and the AC bit has no effect on kernel stack pushes. -- Brian Gerst