Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp685889rdf; Tue, 21 Nov 2023 13:34:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IHf8atWeGk+IzA23u/xHDbjH+oJJFvBmwyfMIziOhii1C0oQ3aO/UKW5IlisAJCyUJRVOUZ X-Received: by 2002:a05:6a00:cd2:b0:690:c887:8cd8 with SMTP id b18-20020a056a000cd200b00690c8878cd8mr382594pfv.32.1700602498366; Tue, 21 Nov 2023 13:34:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700602498; cv=none; d=google.com; s=arc-20160816; b=xMl7Mlo0wyaEPMTofNZSZGZQS+DfhFSYwKB6a2c0+UWUMM4p2ftcJpu+5MJfs69eRy nziDl9cVL7F2jYNxtxMnt50Zp5aP2khI3xDeYXGSOyx5oLiPx5q6QLk+tdaSWfhONmRC E6IjisJoi9rIYpyQi2r1oJLK49E+YAMY/vpNcXA9I20vc4ZC2g2OQriROH2t8s7FV5Yk C0lbkRIrFT9Ef1TLQZPMjbj9KU7U7QBFMLepM3xy9ZzESUQw+mvo413GUeeiYBqjCU58 3i0zJhTd6mZG4h/Sm7RGHugq5hfi28ECIO1UmRUvEZ7Mk51AwqLziD9nUq7MLEPxruAT zPPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=UcSKcdxnUfKBu2d5/g+3TbLVP4zLtrrfABbMZ6ds6hs=; fh=7M/cTvjpxDnNe4+7pJ3/m6ZfDaJtKddkmsJEUxqUomM=; b=cTT4YB1JbHyikRPH3yEoNi9C2Sp3OS5KS6KsckxuRXi5K/ZW9VJlmdnmMRT7Nw/0cV w1NH6W8BbMd1Xk4aDgVuZmaKwt38TjQHKk4JoSmkcAsgU6PI5blYBumvKHGkrBTcFdf0 HrAQAbrH4Xr/BC+Y9WtpRUhP4sHKPfk1b0AcPfdAwlAE44nm4HC8SO4mUD/ZgerPF5jS pJSiIYSgVum9cdFzGCSIolXabZoLlJ8VICMJslOOLHmC6ecaVHlMRXlO8pnyo7fQT+OO mkdxh9/q/FICjurcjKGpVpjtLC1ooorBYHvtkDizAET+YgUNYqA0KoVQouzZTmX6mVP0 jKFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=fB34akBR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id fd23-20020a056a002e9700b0068ff741579fsi11738444pfb.318.2023.11.21.13.34.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 13:34:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=fB34akBR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id CC3FE80230AC; Tue, 21 Nov 2023 13:34:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234439AbjKUVes (ORCPT + 99 others); Tue, 21 Nov 2023 16:34:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229672AbjKUVer (ORCPT ); Tue, 21 Nov 2023 16:34:47 -0500 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C6D419E for ; Tue, 21 Nov 2023 13:34:43 -0800 (PST) Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-359d27f6d46so19379765ab.3 for ; Tue, 21 Nov 2023 13:34:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1700602482; x=1701207282; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=UcSKcdxnUfKBu2d5/g+3TbLVP4zLtrrfABbMZ6ds6hs=; b=fB34akBRPI3ZdNq+mxTlMrrIxnShLNRaGvLhwAofyUSovb2qMvjYft1aMq7cidsmjs iV2o7DzfwcEesxbJr92BLa5WSX4aaWRcRtwDqIsGlLBMwLC/IAPRipuNUyJPILpZDoZr SYfPJjyBj8hG2gr2rmcUpGIMcKs31UMOT66S1fJZ3BFUPn50ktRo6kHvHdEHafRHsPio 4x9D9x4HOrRIjF8Ppmi0kgw0nUZIxMjY30qdqt1wzJr0ZfXPjGVS+iWgScydDpLlvlx5 epNo9nb3JpFZSk/mFy1H6qvUDIHZp8SVUuSPdfTMqLNCerA9Tig/WwqdicJUziXd4XwB PJQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700602482; x=1701207282; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UcSKcdxnUfKBu2d5/g+3TbLVP4zLtrrfABbMZ6ds6hs=; b=mOn8/13cRVDMr66bfl3iZFRauMNbo7T1UhZj9BDBkUQdDVMRWlgndcK7veOV0rVZib 2okfq5mZlnLXm+AT/cXNPc7kqSOiD6d7tVZucUC3JEhhdP1Vnen9WfN7WPSBNJBxgU4h 8Ykmn2lYin1RYvjxXtSpNX2gUyh4SSk0b8bOTlUVuYq3db7fpp7J7Ssdm5OEQ2N34rhE M4chrbso/XWDdN+dYw5pEhsu5hEcQ12yLoz4SZEaUER2CqmbtY6wq1SQKcMGqV54E7hT +8LNU8L92ZB0Mgc75UgPujkiV0cTUY9gcxvi4HURsv3W+aUTz3Znbd1Px+4SHzUDeZwF hT8Q== X-Gm-Message-State: AOJu0YzEhOhyWFos948i9SCyqZL/pY0VfrqGU0lBLM1SmLAChs2yL30p 8b/rPrOURE//smL6le8iuE9tngJNU+HxG5p8JUo= X-Received: by 2002:a92:d7c3:0:b0:359:d2ed:15f4 with SMTP id g3-20020a92d7c3000000b00359d2ed15f4mr266401ilq.8.1700602482651; Tue, 21 Nov 2023 13:34:42 -0800 (PST) Received: from ?IPV6:2605:a601:adae:4500:9465:402f:4b0a:1116? ([2605:a601:adae:4500:9465:402f:4b0a:1116]) by smtp.gmail.com with ESMTPSA id cn16-20020a056e02389000b00359c464b632sm3413438ilb.52.2023.11.21.13.34.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Nov 2023 13:34:42 -0800 (PST) Message-ID: <28d68897-14e4-4dd2-941f-2352d1313fa7@sifive.com> Date: Tue, 21 Nov 2023 15:34:41 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] riscv: mm: implement pgprot_nx Content-Language: en-US To: Jisheng Zhang Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , Albert Ou References: <20231121160637.3856-1-jszhang@kernel.org> From: Samuel Holland In-Reply-To: <20231121160637.3856-1-jszhang@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 21 Nov 2023 13:34:56 -0800 (PST) On 2023-11-21 10:06 AM, Jisheng Zhang wrote: > commit cca98e9f8b5e ("mm: enforce that vmap can't map pages > executable") enforces the W^X protection by not allowing remapping > existing pages as executable. Add riscv bits so that riscv can benefit > the same protection. > > Signed-off-by: Jisheng Zhang > --- > arch/riscv/include/asm/pgtable.h | 6 ++++++ > 1 file changed, 6 insertions(+) Reviewed-by: Samuel Holland Tested-by: Samuel Holland