From patchwork Sun Jun 17 11:23:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10468855 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 919A76028E for ; Sun, 17 Jun 2018 11:49:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8087D287AD for ; Sun, 17 Jun 2018 11:49:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75563287BD; Sun, 17 Jun 2018 11:49:49 +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,DKIM_SIGNED, DKIM_VALID, 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 C305D287AD for ; Sun, 17 Jun 2018 11:49:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 36DCF6B0288; Sun, 17 Jun 2018 07:49:47 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 343F66B028A; Sun, 17 Jun 2018 07:49:47 -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 25B386B028B; Sun, 17 Jun 2018 07:49:47 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f72.google.com (mail-pl0-f72.google.com [209.85.160.72]) by kanga.kvack.org (Postfix) with ESMTP id D67326B0288 for ; Sun, 17 Jun 2018 07:49:46 -0400 (EDT) Received: by mail-pl0-f72.google.com with SMTP id q19-v6so8232143plr.22 for ; Sun, 17 Jun 2018 04:49:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:to:cc:from:date :message-id:mime-version:content-transfer-encoding; bh=669jYTpC63oShfVOdFle/YXCYvWdCLARDkxQ+ffo+2I=; b=kwjud2kWPUT59+Y8S5MhQ0ziVWslg8vsoLTZekq0ueyHqKjecZXdRyniqlBhYUeV9D rPfO0kgha+6G3IqpZwZPelZp+OykpRugHOb/3SJoyECaH/HD0OAXaS61jSE03NEcVbOy T/aqvmlFO5sJdD1KNTFI2rY7o9kMdHkkPsKPz4VRarRF3/rAcEPIrzSoXh3cdnu4oiF7 Cy4ZFs0LCfdkPiMsFr2fOGtjKSvXgqRWyDPc5EBfHpU4sITx4zlrrNT6tcJ5HVY8ys/6 jVp2S1tSC3uED5Ecwiyhgqb/seK7kBtn+pqyRLVHHijjMAkNQz41q7j9mXARKwQ1je9j XXaA== X-Gm-Message-State: APt69E0CIR2ibFLckFDeqWjsD+LnkpyxN+TEfI3l+bGQJWH0NbdElUYl LjoPWMI5UrahrKfV+XeaQcn/WRKvxHes95w0xsKwKis9T6la6u3fuFxnAvsN77uzctj/N2r14HG LmVt5pj8wbGUt3R57U4FOExXQhlJo1O/jdQkS1aI/SdZ/4RoWOVU4JvbcRlvdPxM= X-Received: by 2002:a17:902:2006:: with SMTP id n6-v6mr9786284pla.125.1529236186557; Sun, 17 Jun 2018 04:49:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJKMZ0+HGtbg7e/79piiMoC91DL9icPJUfuTtUmXf3HuK0zm89koXHf0mrYFV60uAsF+uJG X-Received: by 2002:a17:902:2006:: with SMTP id n6-v6mr9786242pla.125.1529236185789; Sun, 17 Jun 2018 04:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529236185; cv=none; d=google.com; s=arc-20160816; b=mhvGhrHhEYtYKzIateXZklWj7DBjKm7qkd++e4RQxmHVXTpAJqkYvcuOnvWX+aP89D SQkk+jqlCaErmzQLnMatFP3L0Y3UNhi3SVjtLZHCEIHEQS6U7GAc2MUq6BaPImh6A9wn a6o6t8kHjitbk86q0V+NW1baqUNafwZ48qlcWlBoo7Ll4S1MpTkhnjis8H0GjULfO0Fo yLhKjrE/wK2Q1ULqC+UKsN4kiocV/EYowjQ/kNL8fMqmY8xloQPs+9Z+zhkPSwLmZkTV UExXNUEgzthlLrZRZaPOyOpdSM42d/8Kigaz23yyH2u2I1QiYJw2eIxItWJwcUly22n/ IdqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:from:cc:to :subject:dkim-signature:arc-authentication-results; bh=669jYTpC63oShfVOdFle/YXCYvWdCLARDkxQ+ffo+2I=; b=MNdUSy8U/t6lYjkw8kv5dgjoXH9D/mqkn1l0I+2whQ9yGOHIH2pUNjfeIBeSsyh1N6 472duoH+aSM8JgXVG1w+MoYe9407L6QYFhm5aCsjQuIDzQ2gbMlPs633hKZVqE9Jy0q7 IjSkmwT7RQELB57jDWNzccRhtsciSUXP9heTO23UwzQcqqzQEitQJ+K7twahhyLBeh5z SvYCtgah0T00+5brI0x+OkQC6shD/5Jo10COSj8EaMoSgmFKSWbW+9stZw05F4ol9ziS UQ4I7dw3Bg2RDGKsfWF3TZp9iyujNMGPRzuKP9kTe+dImHDqWtISnXK86vQcYpT1NgX9 WaXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DzcLR1Z4; spf=pass (google.com: domain of srs0=nxds=jd=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom="SRS0=nXdS=JD=linuxfoundation.org=gregkh@kernel.org" Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id a22-v6si11228390pfn.19.2018.06.17.04.49.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jun 2018 04:49:45 -0700 (PDT) Received-SPF: pass (google.com: domain of srs0=nxds=jd=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) client-ip=198.145.29.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DzcLR1Z4; spf=pass (google.com: domain of srs0=nxds=jd=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom="SRS0=nXdS=JD=linuxfoundation.org=gregkh@kernel.org" Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 DDD9020863; Sun, 17 Jun 2018 11:49:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1529236185; bh=M6qMc7aSbVc37dS3Ctfi7T5wGsvkN8PRJDSsNhHbq6w=; h=Subject:To:Cc:From:Date:From; b=DzcLR1Z4YyCDpb4K9Ow0Y0ptP3EmVR3fuu+GhXh2+6qsxYRzkmI1hQEpX5eJeg+rp 9PHANHpLt1BlN8bA26EeiVJCpiUIeIJQN3H29gk6YZf1d2LLQ047gXOI0GBsqzN7Em TN6wZ5LOkRFVyqMExmxy+VIk060/kEs8VsomxVrg= Subject: Patch "x86/pkeys/selftests: Remove dead debugging code, fix dprint_in_signal" has been added to the 4.16-stable tree To: 20180509171342.846B9B2E@viggo.jf.intel.com, akpm@linux-foundation.org, alexander.levin@microsoft.com, dave.hansen@intel.com, dave.hansen@linux.intel.com, gregkh@linuxfoundation.org, linux-mm@kvack.org, linuxram@us.ibm.com, mingo@kernel.org, mpe@ellerman.id.au, peterz@infradead.org, shuah@kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org Cc: From: Date: Sun, 17 Jun 2018 13:23:54 +0200 Message-ID: <152923463419263@kroah.com> MIME-Version: 1.0 X-stable: commit 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 This is a note to let you know that I've just added the patch titled x86/pkeys/selftests: Remove dead debugging code, fix dprint_in_signal to the 4.16-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: x86-pkeys-selftests-remove-dead-debugging-code-fix-dprint_in_signal.patch and it can be found in the queue-4.16 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. From foo@baz Sun Jun 17 12:07:34 CEST 2018 From: Dave Hansen Date: Wed, 9 May 2018 10:13:42 -0700 Subject: x86/pkeys/selftests: Remove dead debugging code, fix dprint_in_signal From: Dave Hansen [ Upstream commit a50093d60464dd51d1ae0c2267b0abe9e1de77f3 ] 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: Andrew Morton Cc: Dave Hansen Cc: Linus Torvalds Cc: Michael Ellermen Cc: Peter Zijlstra Cc: Ram Pai Cc: Shuah Khan Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180509171342.846B9B2E@viggo.jf.intel.com Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/x86/protection_keys.c | 16 ---------------- 1 file changed, 16 deletions(-) Patches currently in stable-queue which might be from dave.hansen@linux.intel.com are queue-4.16/x86-pkeys-selftests-factor-out-instruction-page.patch queue-4.16/x86-pkeys-selftests-fix-pointer-math.patch queue-4.16/x86-pkeys-selftests-adjust-the-self-test-to-fresh-distros-that-export-the-pkeys-abi.patch queue-4.16/x86-pkeys-selftests-add-a-test-for-pkey-0.patch queue-4.16/x86-pkeys-selftests-stop-using-assert.patch queue-4.16/x86-pkeys-selftests-save-off-prot-for-allocations.patch queue-4.16/x86-pkeys-selftests-remove-dead-debugging-code-fix-dprint_in_signal.patch queue-4.16/x86-mpx-selftests-adjust-the-self-test-to-fresh-distros-that-export-the-mpx-abi.patch queue-4.16/x86-pkeys-selftests-add-prot_exec-test.patch queue-4.16/x86-pkeys-selftests-allow-faults-on-unknown-keys.patch queue-4.16/x86-pkeys-selftests-give-better-unexpected-fault-error-messages.patch queue-4.16/x86-pkeys-selftests-avoid-printf-in-signal-deadlocks.patch queue-4.16/x86-pkeys-selftests-fix-pkey-exhaustion-test-off-by-one.patch --- a/tools/testing/selftests/x86/protection_keys.c +++ b/tools/testing/selftests/x86/protection_keys.c @@ -325,22 +325,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; }