Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18095779rwd; Tue, 27 Jun 2023 11:32:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7cdnGRNlmERgzOdsWxyBE6tPJluVekC2HZ2y1F5bFSKs014jVVJCnmrYUmhAI0xLkuRi5c X-Received: by 2002:a17:906:9bc2:b0:98d:ef34:c0c8 with SMTP id de2-20020a1709069bc200b0098def34c0c8mr7283018ejc.67.1687890721811; Tue, 27 Jun 2023 11:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687890721; cv=none; d=google.com; s=arc-20160816; b=mZxD4St3bGJG3U0H4Akw4ki5HtN9nxrFx8JSFap0IDXogLDYUgZNA02wsUnjnu+qgJ DA8Pmzjlsp4ql+jZgkx5TchSjKQXy6Ax8qH6xXrBxST8aR4VYLPBi6XaRIcSwkFvt+sR t5dhWKCM/IaDrgg8k6RHUskup1eyn/NWMxUXW9VFOXfgo1Z7RnMDfSPGpHVWE/bv2nTy Jl0pxXkBmAO7wGnzyJ4idMOhf5eysmwmpvCPzNiW/HcJgKZxndJx5wZerAzGNibEBSwf hjekwsy+mkHNLvSjikdh64PKuNURLZVAvdsl0pRAS3UZyY8wJ60vB3Io7ygNOEEz3Pfg sPWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eCvdHteeT1mEMxcIH0E2f1yBw5PKhoBQnvZ9PIXXoo4=; fh=CaLIUirbBPa4CGMuWP8OoqBv1h2Nm3yboyAPDxBVjek=; b=YEE9yXqVkh40bpxt4hBO39HGZf0d13WpKzvoSI0UZsHcF9vqrqyQLPiril85PnLMT8 0jdVpOAvwuoc3cE3gpPvu7V3AeIoY91F7tF/8a6uubw4GkMPybQaWE7WlCGqoyabD+4R 3EsVw/PS6KaN7Yx6enus0UUuHQfKQCnr/Xwo+xRrHNnldkPCXWr6ecjKf5DTPWU4PGOf D7MammkzD0Onld/MFjvxEmZFIhe8EHhmRPaFbKDCSJwoCGKzCw5KaNUJNhHsPWqLOcFa VJY12qLkS95gzw58VePMj2GDhqidDO0TriG5Bqf0dcCnUPJKXCTDd90zo4N0z7mOnSYT TH3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iBWhHyi7; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t1-20020a17090616c100b009920ac37835si1452826ejd.521.2023.06.27.11.31.36; Tue, 27 Jun 2023 11:32:01 -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=@kernel.org header.s=k20201202 header.b=iBWhHyi7; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230421AbjF0SY4 (ORCPT + 99 others); Tue, 27 Jun 2023 14:24:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231131AbjF0SYu (ORCPT ); Tue, 27 Jun 2023 14:24:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CDECB8; Tue, 27 Jun 2023 11:24:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CF1E7611F1; Tue, 27 Jun 2023 18:24:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59CB0C433C0; Tue, 27 Jun 2023 18:24:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687890288; bh=U0Ae3RQ4h+5yMS5yiPM4dAg4Cs5OyI4YsmDbSn9P54M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iBWhHyi7OhQxiwwl1PoY0idtgffmlQUHdUCFfMJgHk+cdg8J3eNys3Slb4cxWnCof X/6NljQ13ZORuOfC5mtqQF6jL5eECEGZWYoycQr3WgWNv4WKTY8mD2Lm/vj5hB2H3U SH3tZN3MLf7ggPvxZ3/YEqEn+B4jcwq4n8Aav6fw81+NT39/M4dfBgxAqymEN+EYaE jqCtAr/PSn/OrT6HJSKM9PK8lixaCmT8U1O3zPdtth3oe3DQRC++0U9f92PFAFLpuV vfR4QLL1J5OWOYZkPMCc1oK33pI/kTdwJEhdoK4B7AseSVcECzgV7/0UJ9rtaRsiat Mk3Z0hx1E77QA== Date: Tue, 27 Jun 2023 19:24:39 +0100 From: Conor Dooley To: Charlie Jenkins Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Eric Biederman , Kees Cook , Shuah Khan , Alexandre Ghiti , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Conor Dooley , Greentime Hu , Zong Li , Andrew Morton , Guo Ren , Andrew Jones , Sergey Matyukevich , David Hildenbrand , Mayuresh Chitale , Qinglin Pan , Anshuman Khandual , Huacai Chen , Brian Cain , "Russell King (Oracle)" , Geert Uytterhoeven , Stafford Horne , Kefeng Wang , Anup Patel , Sunil V L , Evan Green , Guillaume Tucker , Mark Brown , Nick Desaulniers , "open list:DOCUMENTATION" , "open list:RISC-V ARCHITECTURE" , open list , "open list:EXEC & BINFMT API" , "open list:KERNEL SELFTEST FRAMEWORK" Subject: Re: [PATCH 0/2] Restrict address space for sv39,sv48,sv57 Message-ID: <20230627-eternity-mulberry-e1f4babf06a1@spud> References: <20230626183611.40479-1-charlie@rivosinc.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZFVJLaa7EzBd/kk7" Content-Disposition: inline In-Reply-To: <20230626183611.40479-1-charlie@rivosinc.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 --ZFVJLaa7EzBd/kk7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Charlie, On Mon, Jun 26, 2023 at 11:36:02AM -0700, Charlie Jenkins wrote: > Make sv39 the default address space for mmap as some applications > currently depend on this assumption. The RISC-V specification enforces > that bits outside of the virtual address range are not used, so > restricting the size of the default address space as such should be > temporary. A hint address passed to mmap will cause the largest address > space that fits entirely into the hint to be used. If the hint is less > than or equal to 1<<38, a 39-bit address will be used. After an address > space is completely full, the next smallest address space will be used. >=20 > Documentation is also added to the RISC-V virtual memory section to expla= in > these changes. I don't know what went wrong here, but this never ended up in patchwork for some reason, although it has appeared on lore. That seems to be via the docs mailing list, rather than linux-riscv. Could you speak to Atish and see if he knows what went wrong? Cheers, Conor. >=20 > Charlie Jenkins (2): > RISC-V: mm: Restrict address space for sv39,sv48,sv57 > RISC-V: mm: Update documentation and include test >=20 > Documentation/riscv/vm-layout.rst | 20 ++++++++ > arch/riscv/include/asm/elf.h | 2 +- > arch/riscv/include/asm/pgtable.h | 21 ++++++-- > arch/riscv/include/asm/processor.h | 41 +++++++++++++--- > tools/testing/selftests/riscv/Makefile | 2 +- > tools/testing/selftests/riscv/mm/Makefile | 22 +++++++++ > .../selftests/riscv/mm/testcases/mmap.c | 49 +++++++++++++++++++ > 7 files changed, 144 insertions(+), 13 deletions(-) > create mode 100644 tools/testing/selftests/riscv/mm/Makefile > create mode 100644 tools/testing/selftests/riscv/mm/testcases/mmap.c >=20 >=20 > base-commit: eef509789cecdce895020682192d32e8bac790e8 > --=20 > 2.34.1 >=20 --ZFVJLaa7EzBd/kk7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZJspZgAKCRB4tDGHoIJi 0ilsAQC1hx/GF+DR3SpYjaRTOUhL/owNo2aM6O7rh8R9fc3o4QD7Bln7maXQOnuM AlYliIy/ysDkNeLNH5z4t4XUqM/PLgI= =za3L -----END PGP SIGNATURE----- --ZFVJLaa7EzBd/kk7--