From patchwork Sun Jun 17 11:23:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 10468815 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 5C5196029B for ; Sun, 17 Jun 2018 11:36:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C8C328874 for ; Sun, 17 Jun 2018 11:36:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4133728A1B; Sun, 17 Jun 2018 11:36:46 +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 A17E528874 for ; Sun, 17 Jun 2018 11:36:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 105F76B026F; Sun, 17 Jun 2018 07:36:35 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 091076B0270; Sun, 17 Jun 2018 07:36:35 -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 E7B6A6B0271; Sun, 17 Jun 2018 07:36:34 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f199.google.com (mail-pf0-f199.google.com [209.85.192.199]) by kanga.kvack.org (Postfix) with ESMTP id 960A66B026F for ; Sun, 17 Jun 2018 07:36:34 -0400 (EDT) Received: by mail-pf0-f199.google.com with SMTP id g15-v6so7122318pfh.10 for ; Sun, 17 Jun 2018 04:36:34 -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=LJndpk6cHTMP4dlSLLV55YhTWmPBowdsuIzxyXIc1/A=; b=g3kL4k0hJKQ5XN9xSQyDFRDaJJH+wTM+CpKhWYKlLWpEHouNEGQrpk5jPMuPP7WlNC OC05ZBKtVAdR18NcWEUE2hdBSU6kIJKbcHI+dnRUaBeHJQWHRqUVjhnQVq+/Q5xajj2G tS/M0rWUGIn14ZN73Vp9RlYATSR+aRqCq+D1DSQfxpCCTPs+IGYvX8HJ0ugQLF4yshaO aVQ/nQjpl2Ni+TjpXXaEqrIWpPMC0omVuYFFg2088x+Qb3wKK/pkejqdqwpNVNJAyt7k moQHcyOn3mb6mmpfo7NVmpspmTzPv+sNkR07+OsUCkbA8ywGkN4uAe7u7YcZUhOXF23N dMdw== X-Gm-Message-State: APt69E0kD/ffb/GqirxUP1cEBARhWxlxWxx+r6lldIasielNmROEynlO UKRyIQ3k0H0I0UTdl9e99UiMsn79XFnl5treWKCpRGndHG3zq9VTgNildRk4I9w6S+hOWuhFXbJ IfkvH7NAmjXjSU2At/0hRz12reWgpScGTVmYPA3Uw0rcYsGFEiXa3JLxhgkLlnos= X-Received: by 2002:a63:8ec8:: with SMTP id k191-v6mr7657791pge.435.1529235394261; Sun, 17 Jun 2018 04:36:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKho7rRacwaKN4cqHmWzQCD04Q+6jFWvfPSRusD6elXo2MhW9oMhzcfb+l/DCf1a2hrrGu4 X-Received: by 2002:a63:8ec8:: with SMTP id k191-v6mr7657765pge.435.1529235393453; Sun, 17 Jun 2018 04:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529235393; cv=none; d=google.com; s=arc-20160816; b=P1ezY69Pd6gznqV8J6qZ87JpLTEfLhuxyPsevVUlZxIiOKuAzWnWey0PL4ILu6k6gn g7yasPo5YfUMxSxVyTqMR9OsL5wiulOWO7OCi0BbmPSrnrC/SLfLtJkcTmXJ0Gun9rQ0 mlrhdcztfRHEnxihmHRF1tMT3L1JKBizMMHfR4wSlfF9TtsasnmzggIOJLdHwoCFjIJf IYFNpO2PFT7r7YhmWPVB4j+eB9l3bqH21xFfF8zyQ7ijZGYpxhdqDVkK7RyP7RiHvZbs uth+kAq+dB7FoCi7ZvQpT6wu6DXY9tUaFHehlJhSJWsOUJ7qQ/UwuIO5d8WBaknYpjLc RSyg== 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=LJndpk6cHTMP4dlSLLV55YhTWmPBowdsuIzxyXIc1/A=; b=Cb/vGsCNu7X7reRLK6d60rk88AgrXPS5AbNgwl4SC1qOJv/RGeGqFOkh5pxoUH4ft/ Hlnhf7leLtOq6RPbxkIAjdtAUr/iACHcsv4JmjU1s0KmUHIrvLdB+XsAYF/cq2h68Rfr sB65LcKOzq3rqf0WpAgEz8rUAomMPz2pXv/Tv8GxnXOxzDdt2kzftOet8tgm2z9adduU n8aNwtCHPyiOAo80J1P97Go4NV6KP9uLxRxmgmbvrJs4UPy1zuajojGu0anJwFoScCIM 1QGk7Fb6aW4k9p6zf5vxwDNjvS4WOzIqL+SeZtibRSvLdrChI52TD4ETqRTj2pMs8CDH magw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TWpowp9U; 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 o2-v6si12196296pfh.327.2018.06.17.04.36.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jun 2018 04:36:33 -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=TWpowp9U; 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 968DD208E6; Sun, 17 Jun 2018 11:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1529235393; bh=M/pw1UrdeqCRYzFWUPziSvIQ2Tv2veNSV450dOI0/Ww=; h=Subject:To:Cc:From:Date:From; b=TWpowp9UWK90HT23bcfgftDLpSmtQi/3unUmzcqECODi0zGyWVE0YUcE5EFtHbRNd WR+zAUOa3Rs68We54dtIgUH0d2gsmK+bb/4z8c38fEtvSzNoeC1bkEJOVqxjdKmbLQ wpoT+zgQXBZnF6aomzxWEg9SL+27CkwY1VEMtea8= Subject: Patch "x86/pkeys/selftests: Remove dead debugging code, fix dprint_in_signal" has been added to the 4.14-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:31 +0200 Message-ID: <1529234611122103@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.14-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.14 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:13:49 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.14/x86-pkeys-selftests-factor-out-instruction-page.patch queue-4.14/x86-pkeys-selftests-fix-pointer-math.patch queue-4.14/x86-pkeys-selftests-adjust-the-self-test-to-fresh-distros-that-export-the-pkeys-abi.patch queue-4.14/x86-pkeys-selftests-add-a-test-for-pkey-0.patch queue-4.14/x86-pkeys-selftests-stop-using-assert.patch queue-4.14/x86-pkeys-selftests-save-off-prot-for-allocations.patch queue-4.14/x86-pkeys-selftests-remove-dead-debugging-code-fix-dprint_in_signal.patch queue-4.14/x86-mpx-selftests-adjust-the-self-test-to-fresh-distros-that-export-the-mpx-abi.patch queue-4.14/x86-pkeys-selftests-add-prot_exec-test.patch queue-4.14/x86-pkeys-selftests-allow-faults-on-unknown-keys.patch queue-4.14/x86-pkeys-selftests-give-better-unexpected-fault-error-messages.patch queue-4.14/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; }