Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp964176rdb; Wed, 6 Dec 2023 05:14:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCzdhrTsMJhK0DuJSoUgoynJuLLHAnSPjgEZe8xqTzeofbHzbH6j/N0BYM1p9BO1bP7OUu X-Received: by 2002:a05:6a00:f97:b0:6ce:2731:47b4 with SMTP id ct23-20020a056a000f9700b006ce273147b4mr1087037pfb.20.1701868474367; Wed, 06 Dec 2023 05:14:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701868474; cv=none; d=google.com; s=arc-20160816; b=f+iNne82JM2IcUtvAd7jqcks0XvpmJXs83pTYfiNx7ahwb4XPTE6MmZpA7CItqALpB v4WR5FZ8zKOL8HVPbo+rUtLLdDR/lwzUv5uLUa84C7R2NC8kPbgQdsc7pA8VKaS6g0l0 lNoL7LyxjURNAfxB+BIXeKPm035U2VgTSWqLeaCoOzjrx47dqQ72ZMYAhShrcNeXcKSV XNKW+gZO/6tlb3KxbkC+BlVPHFM+spz0djn+5VKJVZJkblNC+EUHe+xKuEAgXNPgtKVB tQerAR8T6PfzbOUoF36aj60hX66bnrx1uGCnV8Uy55L7mK1HnZOdRJbY5cAurltxrVCM do2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=6m8NNJ96xoL22f3J2mj0pcMGx/C1e265J+kyF1R2z8o=; fh=VJhd01N6q9F80E9lkf9XNQ7rN/z2E+qDFxKx12MmQpo=; b=PBOsbljBbRNRby3fWusvyDVS5a799Ib9QF105Vsfjw4HaaDq0aiJ2FViEOyNMSOonR tnJUY6rSTjZDqxkSS4sD7ZjMDj+giA84x53HoUIDVVVhFssjNY7D2m2vDThI90u/C/ou 7mOxQgvA1hBbMP0GkDxxwM8T+qRHPqvPxw3P6besgHaTHLKMOGtMKz8b+ThKjsPHmu4X HNOlFKtITiDZ12Uu4tqnIpDu4HB1KHkQzBAOgA5FqGGs0986AvbAgUhgmh7oZ4zAYvv2 rNfN69OzA04YgggKnFc9shYaRtFq5BWvMZAGS4Rq2kwxJ5mdJVKJ54qVktc7TdV3kuN1 fa6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20230601.gappssmtp.com header.s=20230601 header.b="Gg2/jy1+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id de12-20020a056a00468c00b006cb8cf06613si11031522pfb.2.2023.12.06.05.14.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 05:14:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20230601.gappssmtp.com header.s=20230601 header.b="Gg2/jy1+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1A17F802A6EB; Wed, 6 Dec 2023 05:14:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378437AbjLFNOW (ORCPT + 99 others); Wed, 6 Dec 2023 08:14:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378416AbjLFNOV (ORCPT ); Wed, 6 Dec 2023 08:14:21 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA1259E for ; Wed, 6 Dec 2023 05:14:27 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1d075392ff6so6773925ad.1 for ; Wed, 06 Dec 2023 05:14:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20230601.gappssmtp.com; s=20230601; t=1701868467; x=1702473267; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=6m8NNJ96xoL22f3J2mj0pcMGx/C1e265J+kyF1R2z8o=; b=Gg2/jy1+p8R4muds1hZSZcq3WS5KKs0cqJ6ED+0J+4oPq06qEg541yX1/G/FvX3Sg7 8DGob7E1cliKdQsSzs2GbhrUxLNw/NqNwlEgtfaN3FyusyvX71hTil3nvjbAw5+UjzOf xg6fi0bXHOETZS00eWBrcymewYve4qYkoepjNEjwKrtMbtuS+QpGmGU4NCYJm4G36/BD PbRNOS7e9erHcGbSKVw6YFcV+OmApdJ5p12dwyV8JKjJGn0CymvfQPCZCHVO0GZ24Idp IYg2Cto7CpPpIkTE1fQzC5G2NBxlobCv624YU1tx8vxK/lbyosg6foSjQuXMzUUAakTq d4+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701868467; x=1702473267; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6m8NNJ96xoL22f3J2mj0pcMGx/C1e265J+kyF1R2z8o=; b=WvUhsfijYPefRyDwOwdl72ohiu6FgmliB+qRkvLHgi5gffzWm7hd5DPDjCVbUN2wOC F1zKWCHB6i+H6DFOSek0IBHAn6UwnGHcENVaAbkzJCXUiNMXXbotj+tlVO+SvFubUgcw b30qw3zH0rqPSMaxDZHNLLasqzzPz+hDQN7AH4e3qG1/5meBv6vx+ljvip63lZnnjKjQ wjwMZdyAcil1ZuoiYUCI3WUuNOp9aRyLpxoLpdSBBlmb45cO1bYCpSw4etnlIbBS4EaC FcxclXPhSbNaa1AWXd35A+CNOjD27S627hl/lHXsLMsMAAPfOA66M60rsfewHYqyW0w2 W5FA== X-Gm-Message-State: AOJu0YxKdMQb32IwfALicgHMlHRIxiOsLRdHpRLQSErKbdirRS5U5zB7 8/Zi9U3dDjUQnbgBzqeL7ge8qA== X-Received: by 2002:a17:902:dac4:b0:1cf:59df:23e with SMTP id q4-20020a170902dac400b001cf59df023emr1270027plx.12.1701868467222; Wed, 06 Dec 2023 05:14:27 -0800 (PST) Received: from localhost ([192.184.165.199]) by smtp.gmail.com with ESMTPSA id p24-20020a170902b09800b001b86dd825e7sm12082582plr.108.2023.12.06.05.14.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 05:14:26 -0800 (PST) Date: Wed, 06 Dec 2023 05:14:26 -0800 (PST) X-Google-Original-Date: Wed, 06 Dec 2023 05:14:24 PST (-0800) Subject: Re: [PATCH 0/2] riscv: Increase mmap_rnd_bits_max on Sv48/57 In-Reply-To: <20230929211155.3910949-4-samitolvanen@google.com> CC: Paul Walmsley , aou@eecs.berkeley.edu, akpm@linux-foundation.org, keescook@chromium.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, samitolvanen@google.com From: Palmer Dabbelt To: samitolvanen@google.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 05:14:33 -0800 (PST) On Fri, 29 Sep 2023 14:11:56 PDT (-0700), samitolvanen@google.com wrote: > Hi all, > > We noticed that 64-bit RISC-V kernels limit mmap_rnd_bits to 24 > even if the hardware supports a larger virtual address space size > [1]. These two patches allow mmap_rnd_bits_max to be changed during > init, and bumps up the maximum randomness if we end up setting up > 4/5-level paging at boot. Sorry for missing this, I'm just poking through old stuff in patchwork. As far as I can tell this is still relevant, the discussions are just on the mmap() bits (but we'd already screwed that one up and have since fixed it). So Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt in case someone else wants to take it, but I'm OK taking that MM patch with Kees' review. > > Sami > > [1] https://github.com/google/android-riscv64/issues/1 > > > Sami Tolvanen (2): > mm: Change mmap_rnd_bits_max to __ro_after_init > riscv: mm: Update mmap_rnd_bits_max > > arch/riscv/mm/init.c | 6 ++++++ > include/linux/mm.h | 2 +- > mm/mmap.c | 2 +- > 3 files changed, 8 insertions(+), 2 deletions(-) > > > base-commit: 6465e260f48790807eef06b583b38ca9789b6072