Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp873184pxk; Thu, 17 Sep 2020 19:56:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnZoMmvp1+kz+4/z/rdy273ddgUIn8eV87+xkFVOi5ge97lj+p2kDGvN/yHL+ZP7OF8in7 X-Received: by 2002:a50:9b44:: with SMTP id a4mr35312234edj.12.1600397762358; Thu, 17 Sep 2020 19:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600397762; cv=none; d=google.com; s=arc-20160816; b=z6K9IHXK3BVKp/oosLASDd67+sLe63AOFy2+oykt3ED5WIwY9JAfk8D+QGu8X39rI+ 5qbVwy26td76wamypxObBMUtQUZyIo0DlPVx+U7tZgq9iqaH9EKJ/HOsl1UHXEl6JqXF 3CY2P/R60xx1nSXVBKjn0/iCUHCv2PIs6z/E/BdHcJKg0bWj/pr1j7h7992DpEq23zd7 gcwaEhg9Co0In+62/78kQ0n82DjE3NKFbZbNBi0DFr5UAdr6vOGVr3QzzzmQV9GIFs6i aruNRm78BSWGFPvDtHqEPM83UwicLihLo0HirDQHgICrZGinMjWwB1sJMrAQWRINIlcZ UjCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ee9WpQEuyH5GcfqokbgGjrjnNeC2q+BRZw2gqmAGw68=; b=a0+sHtcPzZ9h+A/SOQGKOdy4675gRpWqgv6DNI3vlDs1Mx7suGXzHZEXUiJlSqe6lO XO74YDIRFkmA2E4UvivZwatrGq9kyTN7xTIQbKBZr+jYPHCrwfBCVOWXWRGAFG3zyePZ ot0kvLkl1MAujCQZ65CU35edXKJ7RiZ2rQWu+pjF+jMWBCUUNtLuAJZahry5tsp+Ulsl KlpnsWe+RYHgqt+xPKSKVIEaXP65yecFXYgM1bwsm8rsSNjhEy68rp/JOk8sodnLblQG j0FOTssLwJZGBXX/kX2LVyq9EebKOraMF1MoWDxEeTvZOWjv0qSJ7ty8RbPpEcDYNB7X XnJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1zxcLa7p; 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 g22si1226783ejj.443.2020.09.17.19.55.39; Thu, 17 Sep 2020 19:56:02 -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=1zxcLa7p; 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 S1728173AbgIRCxv (ORCPT + 99 others); Thu, 17 Sep 2020 22:53:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:58372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727164AbgIRCHq (ORCPT ); Thu, 17 Sep 2020 22:07:46 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 04F382388E; Fri, 18 Sep 2020 02:07:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394865; bh=w4PyLfMXw28cvumyu67lhikdu0uy4bifbRxV2t7MvoM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1zxcLa7pCZMbnf2Zcu2P9Bg//smLJu6Jw3kMelFpH/jiDMUkWIH0JCyVdFqEn7YUV A1HnBflRvhAtizciB+W+cp2sg19mBGmv0mDA7tCnIu59s1wmtoKhxY+Ciap/JcFgQW NKI9FuswfRMn9jAOvug7rPcI1+lBtjst4Qb+G0R8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Sasha Levin , linux-api@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 318/330] selftests/x86/syscall_nt: Clear weird flags after each test Date: Thu, 17 Sep 2020 22:00:58 -0400 Message-Id: <20200918020110.2063155-318-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Lutomirski [ Upstream commit a61fa2799ef9bf6c4f54cf7295036577cececc72 ] Clear the weird flags before logging to improve strace output -- logging results while, say, TF is set does no one any favors. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/907bfa5a42d4475b8245e18b67a04b13ca51ffdb.1593191971.git.luto@kernel.org Signed-off-by: Sasha Levin --- tools/testing/selftests/x86/syscall_nt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/x86/syscall_nt.c b/tools/testing/selftests/x86/syscall_nt.c index 02309a1950413..a765f62ee7668 100644 --- a/tools/testing/selftests/x86/syscall_nt.c +++ b/tools/testing/selftests/x86/syscall_nt.c @@ -59,6 +59,7 @@ static void do_it(unsigned long extraflags) set_eflags(get_eflags() | extraflags); syscall(SYS_getpid); flags = get_eflags(); + set_eflags(X86_EFLAGS_IF | X86_EFLAGS_FIXED); if ((flags & extraflags) == extraflags) { printf("[OK]\tThe syscall worked and flags are still set\n"); } else { -- 2.25.1