Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1073996rwn; Thu, 8 Sep 2022 13:01:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR61l5Lw6IjrcbbwmX74bYBKgd8S8ZtZZTdXW5nIRdSdo3fh+ixf9VDHqTzlXSeOQ1jV/akW X-Received: by 2002:a2e:9781:0:b0:26a:c579:d421 with SMTP id y1-20020a2e9781000000b0026ac579d421mr3036570lji.320.1662667307388; Thu, 08 Sep 2022 13:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662667307; cv=none; d=google.com; s=arc-20160816; b=dH3zfwR0KDjI8NzrZT7fgPfSdlzlnQYzc6TEGqAIsZlLFa5N1S5+v0tsFmxxg4hFpg CNwr6k8DtXtR1A8gnHx3WY5Q/HBTlHeJShGI398dCf5awJg+F/HRb5J6B5/qpinYXeo+ a4MHT/QhI9aGubGpToLXpz2bKkMUak8A82bIxcuf4TMga32rrceL30YMZCNsei6knTue YtKorIlkUXvymtvM7YeFHqKFPOXA/lXUj/3ZqndUDtF/x9V3ZV25ONHUJHjV9Ivj27oo WYXaWfZvAuAlFH8Mg5J0WDrBOEloiXuk47mRJoB8R3fReQDzgwIpW4N2wKvf5egNyiQO aeBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Pm28BmGQbrW5Gi0MeI52+kjIwgWThKQThYJFme0LBgA=; b=U/z2A7cvwkziuE4hrCPl9er/98aJRtMZNMN0fIYvRSltvp1R09acpk1G0QDf5J9h5o VGvBxF47pRFvwyfKN9vU6HGBANFSyKiSfkQhHJi3J/MIheVUYZmnE9WNRYY1ykTakfpf 10cbcGW4KgAvcKZhRWNlaAUppU9xRBNoJfii+uo7IDvmY7WJT80CiygZuxdpCKqV7BJl m0DNcc9j/rhGSS/VKTxDBF3fBAvUMisvWLrvTEi7Dn5ZF1QSgBA1sEB4nvnN5Jbdd3/X ny7RineB3dM5wiXWHMTm1Lrj+yrxDAkKGCjAedMRrCyxnNI85nQCwWV/Qv7mCgqgSGUm pKZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fBSZPfGc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e10-20020a05651c04ca00b00264a0d00cc4si9929612lji.418.2022.09.08.13.01.16; Thu, 08 Sep 2022 13:01:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fBSZPfGc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232101AbiIHS5L (ORCPT + 99 others); Thu, 8 Sep 2022 14:57:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232369AbiIHS5J (ORCPT ); Thu, 8 Sep 2022 14:57:09 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91457F411C for ; Thu, 8 Sep 2022 11:57:08 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id y136so13914822pfb.3 for ; Thu, 08 Sep 2022 11:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=Pm28BmGQbrW5Gi0MeI52+kjIwgWThKQThYJFme0LBgA=; b=fBSZPfGc/DVDWJvkB24mLjrwq2DPhyoU3WiqW9rmLQu8Cm9UMsp5TxezenEhz1eClA 0Xe2hCH07b9SOO89K4rSo/x91qCANkwordHm3BWHzPjnNKDVEn6fCSPsHQXLKKc/v+J+ 1peBSLTKnwgAM4Z8Ucy0A8+mmcTo8dTvvXrI3rgkZG8kvkPnXeOdASCRR7Css1igEuq7 t3RVbfRwH83XwGpHxj7Ylt4qT/ZOiBOJbc4nTPgg+s/JAiESHaHnry42KPXoRVKme8wR msgZJnqTDRbBVQklV+Ch2CgbVPDX8zi8fAc8/f2PWPPE5me2juDMWUPP2prjfefMiqBS C4Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=Pm28BmGQbrW5Gi0MeI52+kjIwgWThKQThYJFme0LBgA=; b=AKRlUicrIKKjMKCH2uogJOTLfoR5VspL3FvZbmI9kXynnayz3kZxhaK/WmQh+jS5yM CG2zr4hVHMHIZe7EkYsVhEcaVP2aMlhq6kdMaRa6oW93N7zJqy93vZMbS2YxtW8BGSyd SVyicFxtoDGCY7g3qD5BrAIgByOsJJwrA9KeVo9up2L14rtEnRf+Lmp1HNpg9ebau7uM 5TyhFDWNnY+V47C9JADnq1Kdu/vDlI05upFVyLtj2zsCormjHAIChg1ORDkeNQYbb9OV CnfjsYH9RPdL9N742l5+sR00SNqx56626RGk8FtC0yi9VL91Zxiyc4jFuuvpB9Z6UvY6 8YNw== X-Gm-Message-State: ACgBeo1KrKR7E3EnWRS1Fw3xLrtBodPpXJQKiRl+Qkc7Hxu6UnEQZTeD 7LM8f5ZtIC4hzUNaWxiw7uftnau81GGToJcd/p4= X-Received: by 2002:a63:5d4e:0:b0:41d:2966:74e7 with SMTP id o14-20020a635d4e000000b0041d296674e7mr8860484pgm.526.1662663427960; Thu, 08 Sep 2022 11:57:07 -0700 (PDT) MIME-Version: 1.0 References: <20220908170133.1159747-1-abrestic@rivosinc.com> <20220908185006.1212126-1-abrestic@rivosinc.com> In-Reply-To: <20220908185006.1212126-1-abrestic@rivosinc.com> From: SS JieJi Date: Fri, 9 Sep 2022 02:56:57 +0800 Message-ID: Subject: Re: [PATCH v2] riscv: Make mmap() with PROT_WRITE imply PROT_READ To: Andrew Bresticker Cc: Palmer Dabbelt , Paul Walmsley , Atish Patra , Celeste Liu , dram , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The v2 patch looks great, > - if (unlikely((prot & PROT_WRITE) && !(prot & PROT_READ))) > - return -EINVAL; > - This also removes the check for --x pages, which used to be present in previous versions (before the submission of the to-be-reverted patch). Is this intended? Thanks!