Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18275311rwd; Tue, 27 Jun 2023 14:33:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6nHKR/DNT7wJYgOGF5WvxSe3CZbrwA5XmDt8Jr836NCS9OCCYEFV9+MMRapm5Z8qS3kSGX X-Received: by 2002:a17:907:6d8a:b0:988:9621:d855 with SMTP id sb10-20020a1709076d8a00b009889621d855mr21502214ejc.61.1687901639437; Tue, 27 Jun 2023 14:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687901639; cv=none; d=google.com; s=arc-20160816; b=YoYunCRBQdULSE3Uq9UmpInKxTteCWAYcvTs0KDK9Xe9kkoGNJBX3fOVSm2Ijg0n2f 8KL/TUWIIVScMcia0dNLkQMUuqSjTXyJ92kyYeLN1+onv3+opNkQkGPMqJRr5yJOmXXo AXzbF1ctyEp2Bb8uIOh5IDzbTrzuAw3t/j2qBjA2oL9wfbuAf+NJEtM42/21Hr4D0TVw y8rJb5lsU3rboe2c1I0Ovgi2HBQmG1GA0qv/dLLU6/jniNkR4hz05IeNL7+47e6eogKz 0uKbGBXWSFquyv9nIU+zBq1o2dQZvkGVCvJ8RP3pGVsW5gCBbrLLI8QNTngUXOQBWnaL HEqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=sirRvSov4RuE6Flh2RoZE9PzcNIKlryblf5nf7NWajA=; fh=EpI4nmXFSu8Hne+W7ZxQcz4NPPeBU94POX3kV4Dr9Po=; b=KFOc2vHXTcHRNmniSrXEdGZ2HNhFF03iFDmFRZU0dNmuQcSuUglXzVVspqJXuyBRZ3 NKSXNqd1PHVaMe1Zcdo+DdJt4QspUHFP804a0BH00U6v2MWK94mWxdp/sg0gVBip4Hzr UovDghzdB8wRe7MuEWE1xIs3uFHZUIiEEYQ9gV27q0bQQePr8VDZoj0otkFfR/b5l6Fb jlk0x2KnJfzkKsgCuok84TO+NfR+iEVz7fStmq7NNqSc7ACAAyO+4Lkw/2LYyuLxmi5O hJSsVfmv9JvfhqXLPVbhBmcmrixDjJ87sNccnql8JV9gNvNGs4LkagLerkfeGSarKoxY VtbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=I7oLfq4K; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e17-20020a170906081100b00988788f44d2si4748492ejd.974.2023.06.27.14.33.34; Tue, 27 Jun 2023 14:33:59 -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=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=I7oLfq4K; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229746AbjF0VHW (ORCPT + 99 others); Tue, 27 Jun 2023 17:07:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbjF0VHV (ORCPT ); Tue, 27 Jun 2023 17:07:21 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B9CE1BD1 for ; Tue, 27 Jun 2023 14:07:20 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-262d9e75438so2734394a91.2 for ; Tue, 27 Jun 2023 14:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1687900039; x=1690492039; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=sirRvSov4RuE6Flh2RoZE9PzcNIKlryblf5nf7NWajA=; b=I7oLfq4KpGkW6eVaiiOLhvIZWSmjmi1emjZklKf+bs+mVe2Y/rBp86DxEkDUzFbYWB rB7Hsc6H3S3zI90tVgW7XSWyAOOCNjhtXeLBd/OKrrfmZw4/bwADF7DALuDS2bBkHL6w PMi+U/jAUXGMHJ9Q4B/k3RGkKrHOtqOd/JwKAf4vWOJnJJcCj8lF8OyvIl1+dEjBbRLX y1aDrBXI8eG0gsholAKLTe+oQ38sMzmZb5SPwNzVWZqHrzRHkYmlM0tRBSxhV6oN/lzq cJHJRzCMmqHJATkHwsNmlxp/m+CWI38VwV/l3KBrgH6zRmfzvIlwn7ObbbdCrt9dIWQE pcKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687900039; x=1690492039; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sirRvSov4RuE6Flh2RoZE9PzcNIKlryblf5nf7NWajA=; b=XR8UD1CMRPFH5AJ2YEKmjviDeO22joQ6C3xfowubxXIkJUKYo5dqqoudrbtCLsZuEi o5gddwPwU0xdhfkbt8v3mNepXiT5BiYqanAmOLnZewFzcozhkJvOnrAcq1TBoU+WGdhD BaGn9TXWeGre1H4LTwT176Nmg+vIBkUa+1W2MqeIW7m3ZqqobYGikaHQEPW2wLGx37EA bAjJ1kxdj+eBYo4tb5YM6qdfdeydj9WJK1eUtObIwC2SyxJth5iLQzIOGtH6iWwsPyjP cCgBNzkt+JtTN+AyIKBCwHjucdBZzQ2OLQYD3vftJQeFV3WTPR4iIKE9LzQYXse61/kt RQlw== X-Gm-Message-State: AC+VfDyfZ/P48ho5+kEzrDbTO9Xe9aB21TZI+59bvgYAx4WNdkCbxPBe IpGqtIA+WxNeH8UhInpshqc7QkVdwPlAuTw3PCingw== X-Received: by 2002:a17:90b:1648:b0:262:d661:75e4 with SMTP id il8-20020a17090b164800b00262d66175e4mr9330028pjb.0.1687900039345; Tue, 27 Jun 2023 14:07:19 -0700 (PDT) MIME-Version: 1.0 References: <20230626183611.40479-1-charlie@rivosinc.com> <20230627-eternity-mulberry-e1f4babf06a1@spud> In-Reply-To: From: Charlie Jenkins Date: Tue, 27 Jun 2023 14:07:08 -0700 Message-ID: Subject: Re: [PATCH 0/2] Restrict address space for sv39,sv48,sv57 To: Conor Dooley Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Eric Biederman , Kees Cook , Shuah Khan , Alexandre Ghiti , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , 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" , Atish Kumar Patra Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 I see it in patchwork here: https://patchwork.kernel.org/project/linux-mm/cover/20230626183611.40479-1-= charlie@rivosinc.com/. On Tue, Jun 27, 2023 at 1:44=E2=80=AFPM Charles Jenkins wrote: > > I talked to Atish, he's not sure what's going on here either. I am going > to add him to the CC list. > > On Tue, Jun 27, 2023 at 11:24=E2=80=AFAM Conor Dooley = wrote: > > > 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 enforce= s > > > 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 addre= ss > > > space that fits entirely into the hint to be used. If the hint is les= s > > > than or equal to 1<<38, a 39-bit address will be used. After an addre= ss > > > space is completely full, the next smallest address space will be use= d. > > > > > > Documentation is also added to the RISC-V virtual memory section to > > explain > > > 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 Atis= h > > and see if he knows what went wrong? > > > > Cheers, > > Conor. > > > > > > > > Charlie Jenkins (2): > > > RISC-V: mm: Restrict address space for sv39,sv48,sv57 > > > RISC-V: mm: Update documentation and include test > > > > > > 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 > > > > > > > > > base-commit: eef509789cecdce895020682192d32e8bac790e8 > > > -- > > > 2.34.1 > > > > >