From patchwork Wed May 9 17:13:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Hansen X-Patchwork-Id: 10390237 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7418F60236 for ; Wed, 9 May 2018 17:18:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 638232851A for ; Wed, 9 May 2018 17:18:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 581932851E; Wed, 9 May 2018 17:18:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9F4D2851A for ; Wed, 9 May 2018 17:18:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A4DA26B053F; Wed, 9 May 2018 13:18:50 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9FDED6B0540; Wed, 9 May 2018 13:18:50 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 82B1F6B0541; Wed, 9 May 2018 13:18:50 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg0-f72.google.com (mail-pg0-f72.google.com [74.125.83.72]) by kanga.kvack.org (Postfix) with ESMTP id 3A4686B053F for ; Wed, 9 May 2018 13:18:50 -0400 (EDT) Received: by mail-pg0-f72.google.com with SMTP id z16-v6so10502527pgv.16 for ; Wed, 09 May 2018 10:18:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:subject:to:cc :from:date:references:in-reply-to:message-id; bh=v3P04Hsg2qo9cabKTtKbhTTMqbT+Y1aooKuDYpbFNyQ=; b=lzYXZN0JtTWwGn3pTnif3ANh4tcsVWgEO1ucgxvsgtRVFJPTSaBrxCMRUNuhWVYfyX pEf8EAXoM0ErT7LIWAneb2S3DDoUWcPiRp9SAECJJsI0C67HvywokikExs5+/kYUo4p1 Ga5j7YJoLF0aehVqNjQ2M5LvfYn9FkEWKlCr29z1tHtxfAfBmen90DUSaEIHh3R0Yn2I 7dIURaSFO2AiiqVjHtlc0jF3u491Fhs2T6HmoFjxSgncyZpzeo2T4KUfpTDwGyMKGem7 8tttFeWHEyKUsd937bMQxdkK9jTROXg2Vu6okMMuR8eyNIC/kgu5uqU46UmihUYsFj8N 5wRg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dave.hansen@linux.intel.com designates 134.134.136.24 as permitted sender) smtp.mailfrom=dave.hansen@linux.intel.com X-Gm-Message-State: ALQs6tCf4DTpX8NTrK3XnCW0aI4WRG6cgI27oEDm9S9ziU35SB+Sk7w0 hfQ/xefIFOrtltvjX6jQJiS48UYk1ohUC2gZ8OfhFxF3DTB8ErFok8oZjlchFG5cUSl/ZrEGdG0 EHJuUpYGPUKfYtEvnxFyAJ+M7q0vZOL0b5dRD9gPDd4JoBbMmaYhh5JKkSFeF7Cnn5w== X-Received: by 2002:a65:5889:: with SMTP id d9-v6mr25482410pgu.229.1525886329898; Wed, 09 May 2018 10:18:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZra0HDfPTK0kCPOKIwdq90sv+Gq+G11cYuuKU2+vnOQ66QhGmcsOQs0W1OnlTtf40y41wpH X-Received: by 2002:a65:5889:: with SMTP id d9-v6mr25482384pgu.229.1525886329066; Wed, 09 May 2018 10:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525886329; cv=none; d=google.com; s=arc-20160816; b=hFPOYQoaiJ1tU1MYKNPBxFWDcVoyWpj+i9BDOZKKGersr/gk1AvYvYiEOeAWaFC8GH /EcoVcyVMA+PNHCUmnLH+N4rALq0fX6VuMhavdoxv4kigIje1fSIsi/aOrVFHGK8SBMB OwHopxofeFGiXXh+8k5pxSRSFPjnw0uCqO7dfxknnpYh2/X4K3Rl/9lRAJVUywIZ1yQZ jmGPL5sILkuFP9Ldx243FQcAdcawolgqze/Mj7c8pEN3JeSfxY8WAl9QzGbiWWe5uvz9 mcQnhlMS9YQxfITTGO6WXcUNjOW/vVXtmvPfOe4jeK9dpqoVA0yIo8VwZPlsnA3ZjQzW YcpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:references:date:from:cc:to:subject :arc-authentication-results; bh=v3P04Hsg2qo9cabKTtKbhTTMqbT+Y1aooKuDYpbFNyQ=; b=O4SmZOvVfD4OixILejKS3GAh1djmOGP3IObOneWmmlZwiB+lLOTHNDGErqbkkjX6BY aSaL1UteXauPnZ8/ABt0iPfj69T/Uzxh9XK+KjAMHxe/RLo5k1aLb9YVX1VUah50wdPB tw1R6jmYGubfJcmGhM+LG+IAX8R8PVezPe8dd1smqdfmgthU9m+xD9Raf0hnQT2dxicV YTQbXKOd3H0je9y68KiKpbrpumXOkAX958BP5oTwi52sRi96vDK64xyAQrriYSq6sI3b oDmNlGV1cX8pgo/KPTq/u1PiTCq8WMyFauVYGr8cUURRVTGieCM5l0sWWWBcAB8swMGk mbSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dave.hansen@linux.intel.com designates 134.134.136.24 as permitted sender) smtp.mailfrom=dave.hansen@linux.intel.com Received: from mga09.intel.com (mga09.intel.com. [134.134.136.24]) by mx.google.com with ESMTPS id p2-v6si2747282pgn.453.2018.05.09.10.18.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 May 2018 10:18:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dave.hansen@linux.intel.com designates 134.134.136.24 as permitted sender) client-ip=134.134.136.24; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dave.hansen@linux.intel.com designates 134.134.136.24 as permitted sender) smtp.mailfrom=dave.hansen@linux.intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 10:18:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,382,1520924400"; d="scan'208";a="38654728" Received: from viggo.jf.intel.com (HELO localhost.localdomain) ([10.54.39.119]) by fmsmga008.fm.intel.com with ESMTP; 09 May 2018 10:18:47 -0700 Subject: [PATCH 03/13] x86/pkeys/selftests: Remove dead debugging code, fix dprint_in_signal To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, Dave Hansen , linuxram@us.ibm.com, tglx@linutronix.de, dave.hansen@intel.com, mpe@ellerman.id.au, mingo@kernel.org, akpm@linux-foundation.org, shuah@kernel.org From: Dave Hansen Date: Wed, 09 May 2018 10:13:42 -0700 References: <20180509171336.76636D88@viggo.jf.intel.com> In-Reply-To: <20180509171336.76636D88@viggo.jf.intel.com> Message-Id: <20180509171342.846B9B2E@viggo.jf.intel.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Dave Hansen There is some noisy debug code at the end of the signal handler. It was disabled by an early, unconditional "return". However, that return also hid a dprint_in_signal=0, which kept dprint_in_signal=1 and effectively locked us into permanent dprint_in_signal=1 behavior. Remove the return and the dead code, fixing dprint_in_signal. Signed-off-by: Dave Hansen Cc: Ram Pai Cc: Thomas Gleixner Cc: Dave Hansen Cc: Michael Ellermen Cc: Ingo Molnar Cc: Andrew Morton Cc: Shuah Khan --- b/tools/testing/selftests/x86/protection_keys.c | 16 ---------------- 1 file changed, 16 deletions(-) diff -puN tools/testing/selftests/x86/protection_keys.c~pkeys-selftests-remove-dead-code-after-return tools/testing/selftests/x86/protection_keys.c --- a/tools/testing/selftests/x86/protection_keys.c~pkeys-selftests-remove-dead-code-after-return 2018-05-09 09:20:19.228698406 -0700 +++ b/tools/testing/selftests/x86/protection_keys.c 2018-05-09 09:20:19.232698406 -0700 @@ -315,22 +315,6 @@ void signal_handler(int signum, siginfo_ dprintf1("WARNING: set PRKU=0 to allow faulting instruction to continue\n"); pkru_faults++; dprintf1("<<<<==================================================\n"); - return; - if (trapno == 14) { - fprintf(stderr, - "ERROR: In signal handler, page fault, trapno = %d, ip = %016lx\n", - trapno, ip); - fprintf(stderr, "si_addr %p\n", si->si_addr); - fprintf(stderr, "REG_ERR: %lx\n", - (unsigned long)uctxt->uc_mcontext.gregs[REG_ERR]); - exit(1); - } else { - fprintf(stderr, "unexpected trap %d! at 0x%lx\n", trapno, ip); - fprintf(stderr, "si_addr %p\n", si->si_addr); - fprintf(stderr, "REG_ERR: %lx\n", - (unsigned long)uctxt->uc_mcontext.gregs[REG_ERR]); - exit(2); - } dprint_in_signal = 0; }