Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp926927rwn; Thu, 8 Sep 2022 10:37:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR4C8hziR2AroBWKIp0u10NULlTeGzYY+gf59+n1gWhWhWaIA9J/vo56TSJtd5byyi66/URV X-Received: by 2002:a17:902:e212:b0:178:5c:8248 with SMTP id u18-20020a170902e21200b00178005c8248mr1034670plb.102.1662658656072; Thu, 08 Sep 2022 10:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662658656; cv=none; d=google.com; s=arc-20160816; b=U3R0R5pAKecy9l7rgCOubjl4xVxT5h8Ii8jtzwcpZKCFniLhq4M93kswxWBTtn2BFY Xr+ZTLbySi/C8t0S81sovpg3HU2D7Hew7A2mDqJ/wowhoLwhBgTc8+f2c4u8/C7ZIbEr 8+nfa05uF9S0zcev93ebZwt6+ngI/Wi7s59NzfY33nxFyr8laTPILFTTjPKraPG+teiv IY/rirKWHXor2pfe47nN8mQJ/fz9KUQ44bSzOoHGIOReQhxHN33nYErtsXrJYicEjGY5 /j5AKy7Wp50N5BfSgzBRVoy4xD6xkXklkQOX48cLjSdZzOA6K4U01s95RZLDu0tBa57J Jo2w== 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=bfLbaRY3OEI6NIyVDG7lfBiHKdWozSjwE3PfT7WX9HA=; b=GlxjkYJlcZfaixjSpLagXuc26pG7zbdcmmjTOkLsyLTjChG1RMlR41JHSqY2oyGrbJ /XalAXDlerV8W6bEwIzIlBgUlsvr31E1EeiT7MDaJWB4ZXVN7YevchaQwfRpZTwNlt/g chkuChjh0J4L8giB+3F65pL8GpDV1CyE6jDHIgNtKoJ3VgYvb/jEb+snp8st2Pe6ENwf m4C9kTXUaw7Q49g/bcgMtgksTwllezqyfwsjokUcwoJwLPIwcrJiZEOG8I6DsEFKpeiT 4MEztXObdsFSsoZtsmSSzhILpMaUhXAFPFd5A5wv7a+qh22OYX/qYDh/0+brNRbpEG26 m4Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UxJEIboh; 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 b2-20020a6541c2000000b0042c3a5b6983si18935030pgq.104.2022.09.08.10.37.24; Thu, 08 Sep 2022 10:37:36 -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=UxJEIboh; 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 S231909AbiIHRaZ (ORCPT + 99 others); Thu, 8 Sep 2022 13:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232137AbiIHRaB (ORCPT ); Thu, 8 Sep 2022 13:30:01 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FB0DBF36E for ; Thu, 8 Sep 2022 10:28:36 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id pj10so8046079pjb.2 for ; Thu, 08 Sep 2022 10:28:36 -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=bfLbaRY3OEI6NIyVDG7lfBiHKdWozSjwE3PfT7WX9HA=; b=UxJEIbohV0qzVhZT0mVn+cgfss2A2jRc4w9+kHkJ3AUSa+YbC2kfGSPUTNXy6w/Qw0 M0o4GlG6/UUE9UPiBID4gLI30q+zJKH3P4v0ZzjDCMeQcEeccRYBu0/20o//dtryB1eV yklbRveRfuLzFI9+S2PUvGQOsq6WSYtZBHJUrSXIMMarbQIxiOsnjbpbjynKBdAULxJs rIWQ3VoSambpb1t27x3+ZnxcSUNeJysw5dyJ3soMGjybxuAFMZZOw+q8Wy24Co4xGVjG KrQd/vBWvCTGal67dIeHzJJNPZrEoR1qiQSgbSG1CYbOPolphFVm7ofsNsCIcLAbarKe +pFg== 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=bfLbaRY3OEI6NIyVDG7lfBiHKdWozSjwE3PfT7WX9HA=; b=W85XQBND0q2OybzYsPgkhZwHPyD+Rrxlh6EsyS3NkQ9cwJpY1XEd5ALafQIAvj6w7F VBco3hj3/mI9I2gm8UdwtPQbI+cW0B7pFSURezLB177sPauHVv7u396nXsyV8woCumq1 aHxZCu86+wrfrgraH+CFZBlMM/SmdqQcPVEEcuTeStpiF8oRcZyOVV71K18PqAl3AgFw ll7ivetDZ1KIY8OL3z8SnmaJsau3avUyCl7ykGi6SwklVDaQkc/XRO3Aq8KSQgDuAZex 9E88WDZ1yFedY0HqurLwGI8lUQ+kmaj5PB/TC7vznM94+8ng43wcpz3JlhF8HTxzm6zZ SpaA== X-Gm-Message-State: ACgBeo1XhvM7vC9Pl50FaNK/oixXEa+6K8p0dbqQyhMSAqJZREuNuEN6 O3tx1BzcKXSTUQGfrZFUtQ8SFUV1b+887gs6WFg= X-Received: by 2002:a17:90b:1bc7:b0:202:52ce:a1d with SMTP id oa7-20020a17090b1bc700b0020252ce0a1dmr5308453pjb.110.1662658115376; Thu, 08 Sep 2022 10:28:35 -0700 (PDT) MIME-Version: 1.0 References: <20220908170133.1159747-1-abrestic@rivosinc.com> In-Reply-To: From: SS JieJi Date: Fri, 9 Sep 2022 01:28:24 +0800 Message-ID: Subject: Re: [PATCH] riscv: Allow PROT_WRITE-only mmap() 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 > https://fars.ee/1sPb, showing *inconsistent* read results on -r- pages > before/after a write attempt performed by the kernel. That said, maybe prohibit mmap-ing -w- pages is not the best fix for this issue. If -w- pages are irreplaceable for some use cases (and hence need to be allowed), I'd suggest at least we need to re-fix the read result inconsistency issue somewhere else despite simply reverting the patch. Yours, Pan Ruizhe