Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp744755ybt; Fri, 26 Jun 2020 10:28:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwz2EQkJ90oqPkYpoEm3B1+Zy0pA1xKl53MWSDtJzGoaa5qNpmdbqgzxD1167hXgOrEDR3Z X-Received: by 2002:a17:906:82d4:: with SMTP id a20mr3292974ejy.165.1593192513150; Fri, 26 Jun 2020 10:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593192513; cv=none; d=google.com; s=arc-20160816; b=EpPCNMW7NvFUwQ4oK+GxQAYZvwOO/XnkvJYsd0aAOsc4ahds/O9M4qbc/YSnAmBKI/ Hz9WXbnvZ1Tr7bWVK2eYn4ViVy9PJSX1SsLDoZHaBifCidIVECsaz5gSIYloyn9fJ1ab d4yMXSuBS4SEr+QU64woiy1z57a83gmPHZyjve2R+i3kvAU7S2z2GU9/GpYJI8pElnWw zMwixNcQjG0yUF8vTfH7tUmF7E0vXOX8CnjB5liDVkhKXHMc78jo/ozVy1SiidTfzIyc x6J0FxFjWzpDuO6jQta8YgbxsUZODILtrvyoa8RXs0+k1iE2kb0GV1QLu7BHeNS5kMLx rigg== 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=pXUqhpoWyA+R4fC8HW8E5F1XdurXsCLqJ0mUiHbPwVk=; b=nL6FdofSSHEDXWePp67PqKHvqZv3/oZmFnMeGetRmpHjn1bj944hQHNlysiYPT/x8Z 5VETAiqXWu98qwdmKfVIUU1tsM7vGY9E6YrhT5EOQf9U6SqrL9UEBXHQLqN7FsWRm01m iV1A5BLXMErrQ1BolGtq954+nbgeq1bCCgOO/aVyBCAA2saqO9jY0hT/cZFzyu6HCgPO i67DSSBFJHLzv6ol6rHsmpanYX/GXQZKmXnAB1rs9he+RCW9VlTZ68clHlhIdndDcVSL ZJH/tIPsWfFm3ZeOWKDV5RSQZOJ45+rbLV+/FKspKnLqTygTq3RhkNi8ksxnlyAw3uiY as3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="NV3OalI/"; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k4si16417531edn.572.2020.06.26.10.28.09; Fri, 26 Jun 2020 10:28:33 -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=@kernel.org header.s=default header.b="NV3OalI/"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726690AbgFZRVU (ORCPT + 99 others); Fri, 26 Jun 2020 13:21:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:39708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725957AbgFZRVT (ORCPT ); Fri, 26 Jun 2020 13:21:19 -0400 Received: from localhost (c-67-180-165-146.hsd1.ca.comcast.net [67.180.165.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4527320707; Fri, 26 Jun 2020 17:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593192079; bh=NJPS/mjB9XwLVSj2acLE1ljUYNuPaAGLyzKxQizvU5I=; h=From:To:Cc:Subject:Date:From; b=NV3OalI/tpTtU2Am8O8763LzJ/QY6gPgysoYNBKPIKp4+9xBDfDa1B7IPNZ5khLJj KpvHThV8u5YP6CG8bwZsztqzrX+qOAz0Gl7/77RP6S6OJY8p5ocmPcwIBs9MGgohUO S+Qg0eJRLREUaWwFR6Q+xsqPLYTtcuJbGwtg9iQA= From: Andy Lutomirski To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Andrew Cooper , Juergen Gross , Andy Lutomirski Subject: [PATCH 0/6] x86/entry: Fixes Date: Fri, 26 Jun 2020 10:21:10 -0700 Message-Id: X-Mailer: git-send-email 2.25.4 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 Half of this is selftests. The rest adds some confidence-improving assertions and fixes a crash when running on Xen PV. Andy Lutomirski (6): x86/entry: Assert that syscalls are on the right stack x86/entry: Move SYSENTER's regs->sp and regs->flags fixups into C x86/entry/64/compat: Fix Xen PV SYSENTER frame setup selftests/x86/syscall_nt: Add more flag combinations selftests/x86/syscall_nt: Clear weird flags after each test selftests/x86: Consolidate and fix get/set_eflags() helpers arch/x86/entry/common.c | 30 ++++++++++++-- arch/x86/entry/entry_32.S | 5 +-- arch/x86/entry/entry_64_compat.S | 12 +++--- arch/x86/xen/xen-asm_64.S | 20 +++++++-- tools/testing/selftests/x86/Makefile | 4 +- tools/testing/selftests/x86/helpers.h | 41 +++++++++++++++++++ .../selftests/x86/single_step_syscall.c | 17 +------- .../testing/selftests/x86/syscall_arg_fault.c | 21 +--------- tools/testing/selftests/x86/syscall_nt.c | 36 ++++++++-------- tools/testing/selftests/x86/test_vsyscall.c | 15 +------ tools/testing/selftests/x86/unwind_vdso.c | 23 +---------- 11 files changed, 118 insertions(+), 106 deletions(-) create mode 100644 tools/testing/selftests/x86/helpers.h -- 2.25.4