Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp407251ybh; Sat, 18 Jul 2020 07:42:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyy2xn4bJO04ST4vhXQ+Njv+UKc5L9bGH5Q5ulzkFBD4N2AaTHKsecDGjwqGbfg71I1LMtp X-Received: by 2002:a17:906:2c02:: with SMTP id e2mr12658958ejh.64.1595083327114; Sat, 18 Jul 2020 07:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595083327; cv=none; d=google.com; s=arc-20160816; b=0CgBqOfjTiLWRG/5ocUG8wy7oHNSHHLCsKxCPNWaXcQFsltquqHUCP5T1Qj1KY7V9l 9UHplLApWpAodtWG59tSUHb67C14bGxlo6sEfJWye81Gi2NlCJ5g8zaXtt0U1B4tVhDc qA2v1Z7NNoyKHRfDVbrFN0xRBCh+9Nqs6q8f5aaHeoxo/IFz7DBKUNUxPszGj712hOrT /KcyFjfFnOzDBhzVJVanNqpQ7zs0YvVRUcCEJLlmbeEQhDcynl5b/9ToztLUo+C7CPSs Rh51GpUlNq332XgXGqiAv1UJowmAV6qS49wn9tJD1Xan7r9cx83rPgobrbh908if6XTp 5ZQw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2bE7ryY5bmKmNgC6eIa/UyE6X2gMyGEMpAXbppuSg5s=; b=dTFRdfuR1wDa1fM9jr+80ycUo22H+Yc+d4zd1BjKdNSsncD+mwIKpMn+CeGuKkVJP6 uStNKJynIO0/6dtOJWKB8+I/OfWRb5q/WsBH05OlsNfjiUiQU6zGCr97jZ47Xj2XR8/c 9EGU3tA+n8TqOXbgEBm+JcpJzdGBRiRl3/rFRd32KuDCLXkQLqsEIqjWXWoOqIzJyLT+ RKIYazIWi8uCiShlVcJ/Lt57oyYGm+v884OZLHKvAA42DN/N/bJq8Gha+G2WUJ3AjC+P HG09IsAadBfZ7lhi6yVvrjHuGK4cHzdECzGk7+k6Qf+tAGyyEJN98TCGtMlEzrPWRpyK IY6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SG5qqxEv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id lr3si5209990ejb.525.2020.07.18.07.41.44; Sat, 18 Jul 2020 07:42:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SG5qqxEv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727853AbgGROiu (ORCPT + 99 others); Sat, 18 Jul 2020 10:38:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726611AbgGROis (ORCPT ); Sat, 18 Jul 2020 10:38:48 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFFFCC0619D2 for ; Sat, 18 Jul 2020 07:38:47 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id v8so13312107iox.2 for ; Sat, 18 Jul 2020 07:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2bE7ryY5bmKmNgC6eIa/UyE6X2gMyGEMpAXbppuSg5s=; b=SG5qqxEv/bGbPPNqoo7521htEX4rcqNPDp07njON8/cMZx0JcU2vERb7Kd2mvsmF/q f3R7uqwVmMM5+Gna/QHkGOKjc9JJP5XZoiyaOzM0YxgpMw2EBBrrRvSfBi/T/Kj2WY1D 4525U0FQutq7jlRpU/+0wFF2OJ8SeT63omQAdAhR79QqXcT48yi6vm3PFHO285HL2k5q IxkcvFWpmeFWBnqIfJ/c7ExHhM3rI9Y1J7xlDFyl3JcBTuLgTS2r80leHkvhM4vGuefr AaBQFXkD/GRjTK7lB/wsACxRXQ/geRxys8RzwnzFyTl3FzJcWJVoQo8pMbTL/dlZvNwS 3ChQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2bE7ryY5bmKmNgC6eIa/UyE6X2gMyGEMpAXbppuSg5s=; b=UZiik9YMpDyRUGvJmgL6Us+qcOezkec3xRwRm4na4llmHxnkqcPHNs9zQuymCQlw4X STlDEE1DdYYEXlcA+v2kRbv+djYzB/ft/RePQysmCwePQI9gktlUNah1SjS1dYBpkZ0m t8A25drvHA6luzaJ4EbOgTtPMWNa3uyAYTNZVWyf7nmgZ9Aq1vpBlC9OO60lMLSDhkzi xp8rHnM1wGStqHwAE5cRATAk2jZatvcDUcV9dIyfOu677tkrk7jHc+i1i+QcSIgeFqbZ s0W/l6Ofxmvp3ttHPVRzhQNqlkWd6f5K+hNaMVnW9BsyNkQwGMxhM5SsAeUsR3qhd5EY BKlg== X-Gm-Message-State: AOAM530ZT4GlumI0mqMoWdnULeQkNW7zxJdrlW8mpji7lcQZ0laW5Eom udXM/6C1Asjvhn6Hqih/vJKLhpE= X-Received: by 2002:a02:70d6:: with SMTP id f205mr16344131jac.5.1595083127172; Sat, 18 Jul 2020 07:38:47 -0700 (PDT) Received: from localhost.localdomain (174-084-153-250.res.spectrum.com. [174.84.153.250]) by smtp.gmail.com with ESMTPSA id 5sm5888610ion.7.2020.07.18.07.38.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 07:38:46 -0700 (PDT) From: Brian Gerst To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Andy Lutomirski , Brian Gerst Subject: [PATCH 2/3] x86-32: Remove SEP test for SYSEXIT Date: Sat, 18 Jul 2020 10:38:38 -0400 Message-Id: <20200718143839.194960-3-brgerst@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200718143839.194960-1-brgerst@gmail.com> References: <20200718143839.194960-1-brgerst@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SEP must be present in order for do_fast_syscall_32() to be called on native 32-bit. Therefore the check here is redundant. Signed-off-by: Brian Gerst --- arch/x86/entry/common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index 9e01445f6679c..bdb4c15b8610e 100644 --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c @@ -587,8 +587,7 @@ __visible noinstr long do_fast_syscall_32(struct pt_regs *regs) * We don't allow syscalls at all from VM86 mode, but we still * need to check VM, because we might be returning from sys_vm86. */ - return static_cpu_has(X86_FEATURE_SEP) && - regs->cs == __USER_CS && regs->ss == __USER_DS && + return regs->cs == __USER_CS && regs->ss == __USER_DS && regs->ip == landing_pad && (regs->flags & (X86_EFLAGS_RF | X86_EFLAGS_TF | X86_EFLAGS_VM)) == 0; #endif -- 2.26.2