From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 97AB5C4CECC for ; Mon, 27 Apr 2020 19:42:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 65354205C9 for ; Mon, 27 Apr 2020 19:42:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="BF4/l8Xr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65354205C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E49E68E0005; Mon, 27 Apr 2020 15:42:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DFAD48E0001; Mon, 27 Apr 2020 15:42:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D36858E0005; Mon, 27 Apr 2020 15:42:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0082.hostedemail.com [216.40.44.82]) by kanga.kvack.org (Postfix) with ESMTP id B86728E0001 for ; Mon, 27 Apr 2020 15:42:43 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 79DA7181AEF07 for ; Mon, 27 Apr 2020 19:42:43 +0000 (UTC) X-FDA: 76754657406.07.mice94_51f2153959c54 X-HE-Tag: mice94_51f2153959c54 X-Filterd-Recvd-Size: 3396 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Mon, 27 Apr 2020 19:42:42 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (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 B71652078C; Mon, 27 Apr 2020 19:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588016562; bh=pHSFHwxnqBXxHCqPQAkxUYpCjZ/3lJQClrx+8qthDWQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BF4/l8XrQ02299gpcli0FvwYPMF2hN3ZsowBym+oFxLCbmSBv6c8XKoMoCpSUs1mZ vLIh3Da+bxY+s/o+fJHms7WltoegzNJwopJah4TrVT7ox2ZS8JuHiDXeMfsgI8/UYZ lVmACC6y+QfktaRHOt+ND6M6DoBoUgRMxPoCw4LQ= Date: Mon, 27 Apr 2020 12:42:41 -0700 From: Andrew Morton To: Zong Li Cc: Will Deacon , linux-mm@kvack.org, "linux-kernel@vger.kernel.org List" , Paul Walmsley , Palmer Dabbelt , linux-riscv , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, catalin.marinas@arm.com, linux-arm-kernel Subject: Re: [PATCH 1/4] mm: add DEBUG_WX support Message-Id: <20200427124241.28adefc19cfddcf83f75d03c@linux-foundation.org> In-Reply-To: References: <23980cd0f0e5d79e24a92169116407c75bcc650d.1587455584.git.zong.li@sifive.com> <20200427074915.GA11787@willie-the-truck> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: On Mon, 27 Apr 2020 16:47:47 +0800 Zong Li wrote: > > > + This is useful for discovering cases where the kernel is leaving > > > + W+X mappings after applying NX, as such mappings are a security risk. > > > + This check also includes UXN, which should be set on all kernel > > > + mappings. > > > > "UXN" is the name of a bit in the arm64 page-table descriptors, so this > > should be reworded now that it's in generic help text. > > > > It's exactly. Sorry for missing the statement. > > Hi Andrew, > Shall I send a next version patch to fix it? It should be "This is > useful for discovering cases where the kernel is leaving W+X mappings > after applying NX, as such mappings are a security risk." here. I'll add this: --- a/mm/Kconfig.debug~mm-add-debug_wx-support-fix +++ a/mm/Kconfig.debug @@ -128,8 +128,8 @@ config DEBUG_WX help Generate a warning if any W+X mappings are found at boot. - This is useful for discovering cases where the kernel is leaving - W+X mappings after applying NX, as such mappings are a security risk. + This is useful for discovering cases where the kernel is leaving W+X + mappings after applying NX, as such mappings are a security risk. This check also includes UXN, which should be set on all kernel mappings. _