From patchwork Tue Sep 29 11:00:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 263167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C61B7C4727F for ; Tue, 29 Sep 2020 11:57:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62D1F206F7 for ; Tue, 29 Sep 2020 11:57:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601380673; bh=w4PyLfMXw28cvumyu67lhikdu0uy4bifbRxV2t7MvoM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=sWn+xQKutGYWkHbR2sbB2UYeZRJpbpUZFxX1ZwFtgBFNlXlvMxhyp477S7sI3S0BH Jk3Q7Ma9ZCNyilEnGxwE+JqELk1S0aEwqnDekH1YnmttCDe3QPS4clcdQFjEVu2sBt rtVFuPeKkqjaFoE9GZe3+X3fYh2uJpMwNYywdAeQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729333AbgI2L5w (ORCPT ); Tue, 29 Sep 2020 07:57:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:40546 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728968AbgI2Lmt (ORCPT ); Tue, 29 Sep 2020 07:42:49 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 1CB13206DB; Tue, 29 Sep 2020 11:42:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601379768; bh=w4PyLfMXw28cvumyu67lhikdu0uy4bifbRxV2t7MvoM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gmQHq6nVBxACyZqmBiPYnk4pMmOROFktrTdHrP3mfDOzPCGft74uIKT6Z7sfcZY00 zvd4hovPz1D3eLn8xF3uKc/kUKF/H0IIJiwoXldy//01idMFx0gd/jY7de35a5tTBZ MxlH+u/0fLCULcW+Ef1nQeBGW3bDCKakoqZSyLtc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Lutomirski , Thomas Gleixner , Sasha Levin Subject: [PATCH 5.4 309/388] selftests/x86/syscall_nt: Clear weird flags after each test Date: Tue, 29 Sep 2020 13:00:40 +0200 Message-Id: <20200929110025.426297713@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929110010.467764689@linuxfoundation.org> References: <20200929110010.467764689@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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 {