Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp405827ybh; Sat, 18 Jul 2020 07:39:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvzm3bFLP/HNsdoyPXqWI/00dUQ1n+oO9rW59720o1SbYv5n8cZgmlbovWyzpB+UyyIlQU X-Received: by 2002:a17:907:1189:: with SMTP id uz9mr13485580ejb.478.1595083161489; Sat, 18 Jul 2020 07:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595083161; cv=none; d=google.com; s=arc-20160816; b=hvlXch5N2NvPBrK8wIO2EiHT3BJ+dK0tzpwXQpRZGO5QLg28hT+PQY96K8DPGwbTWR OpipBOFvwf9+B/rkQ78laBTcCpCva3ol0fL7PPNqcTKZ9s7cmDDrgcGOM/crefZtv8Q4 MTy7G+ddPlN1VFwv1X3jPZ0wFvwhqHeYsuolZ+Hr6/gczW1TC5s1vTcKhQlZ8dezHCRO ZOeOvhV6bjg1H2nUCABkHKHthiaFsJgL3ns+xDw1n1gY/leUfwZBcEVvryB2IgVTDHsa YK2bIDQujwJOzhbPHdlZeCaIcwooJzKiW6uuwRTs5tQI1CRyrMq6IhFuJSn9iOOGSNgD WhcA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=3CZFF+SPnEfHSXiQgUR+BE19nE+BkkIE3L7TpE9V3uc=; b=Q5hDVoxR92NRWyyfLhxwqYsdk36u9tvyS5TCupcc7O6wnGZexpFCTCWwtFL16YNt65 YO/ydxFK/DmM6Lp55syHuztZUotlxJqwLDt3aZ6IussRenOOBUAFHKQUDxpZBbE+zFB1 mtgjtb1J+XSB2M4N6wSJ3SIaDlmHRFRb1JDeLxr8lyqSCUWtbHCuYoJY60zUpBbT+y5g O80BakvrdViApFfB88Tj8jrjcW6BOj0Pmdfqz5jybdeDUhfcGjhc4JPY4IZEl2gYrEH9 JtYIAyUEAVUj+aWZtVZYroSZzofzTPmZ83wCaseYSF0tTD+5wqg6cz9QeyIp559RApAM hwVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IBSz+fT4; 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 z15si5251638ejr.250.2020.07.18.07.38.58; Sat, 18 Jul 2020 07:39:21 -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=IBSz+fT4; 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 S1726775AbgGROiq (ORCPT + 99 others); Sat, 18 Jul 2020 10:38:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726611AbgGROiq (ORCPT ); Sat, 18 Jul 2020 10:38:46 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E8ABC0619D2 for ; Sat, 18 Jul 2020 07:38:46 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id d18so13311986ion.0 for ; Sat, 18 Jul 2020 07:38:46 -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:mime-version :content-transfer-encoding; bh=3CZFF+SPnEfHSXiQgUR+BE19nE+BkkIE3L7TpE9V3uc=; b=IBSz+fT4JgoTuFrsLgZrNzfmdABix/zmUstvtGPatwiHcGKqFgx/IJEh5UGhBPpaA1 a0vySOLKu2W5b3ddxJurbxLPsQSZRwuk+DifuxtxrgsBt+vW8kLMrRt6RWHV/CEB46RE 6GvMAjxbY+DCOG0Zi82HdOL0XZtkyTKHRvhuImRMklw537iEKOGt/YsJkjuiTs7LXNh5 87reovGvbw6kf3A6uiXG/YMZ6qRuulILzB96WmxpY3IJE7cnf7qBT9L6QeOCc1TzCg+v O5tPd06EeaM2y03sgYUWR9hMwa7A7zRQF1u27pa+ulrBoP6cg7CZuZeyhKe3mLSCzYl1 zLHw== 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:mime-version :content-transfer-encoding; bh=3CZFF+SPnEfHSXiQgUR+BE19nE+BkkIE3L7TpE9V3uc=; b=mEuDbTBp+kP2+AIIpkIEM3QU6WK/p8AYvYk/dBcHOIa6pNzraX/92UXDX+inpdsJYF Rv4R+RU0MUQSrhfFRG+gPbm6kZ7Q2Vogt3Jl5ngQJq9F9YRm5XNx2pqvHeJ6bJYLd1tL g79F9Ef6AR+epojV1vAGPLQi2HlmJjFzGSYLmU7RNaq6PBeFYLKMz7+aIeteabLVLwUh qHN+RzAPT/T4DE1o5DqN5E9R+G3dPfd/qLcaIMFzHonKpuXjY1S0nGOXhz0FpxBB8D8S p5T+TAJXc3vOrEII94oSdoefkH1IoS3CljO/OmzhenHk6b8GPf4dAF9Ka/OfoaDdaBer Atmg== X-Gm-Message-State: AOAM530N/yZfIz75mVsNcjsK98IYApxZtIckkoZKG78J2cECFtjMQC8f eTEtWRk1hwMUWS2yGjP22yldUc4= X-Received: by 2002:a02:c50d:: with SMTP id s13mr15856962jam.109.1595083125320; Sat, 18 Jul 2020 07:38:45 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 07:38:44 -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 0/3] x86: Clean up SYSRET/SYSEXIT validation Date: Sat, 18 Jul 2020 10:38:36 -0400 Message-Id: <20200718143839.194960-1-brgerst@gmail.com> X-Mailer: git-send-email 2.26.2 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 This series cleans up the tests for using the SYSRET or SYSEXIT instructions on exit from a syscall, moving some code from assembly to C and merging native and compat tests. Brian Gerst (3): x86-64: Move SYSRET validation code to C x86-32: Remove SEP test for SYSEXIT x86: Clean up do_fast_syscall_32() tests arch/x86/entry/calling.h | 10 +-- arch/x86/entry/common.c | 142 ++++++++++++++++++++----------- arch/x86/entry/entry_32.S | 6 +- arch/x86/entry/entry_64.S | 71 +--------------- arch/x86/entry/entry_64_compat.S | 13 +-- arch/x86/include/asm/segment.h | 1 + arch/x86/include/asm/syscall.h | 4 +- 7 files changed, 108 insertions(+), 139 deletions(-) base-commit: bccf9048549afe54b3c6bc8979ebfddea748da85 -- 2.26.2