From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BCDAEB64D9 for ; Tue, 27 Jun 2023 21:07:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 08A308D0002; Tue, 27 Jun 2023 17:07:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 03A448D0001; Tue, 27 Jun 2023 17:07:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E44698D0002; Tue, 27 Jun 2023 17:07:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D1D138D0001 for ; Tue, 27 Jun 2023 17:07:22 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 9A15B1A01AE for ; Tue, 27 Jun 2023 21:07:22 +0000 (UTC) X-FDA: 80949763524.11.773FE8E Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by imf07.hostedemail.com (Postfix) with ESMTP id 81D2540007 for ; Tue, 27 Jun 2023 21:07:20 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=I7oLfq4K; spf=pass (imf07.hostedemail.com: domain of charlie@rivosinc.com designates 209.85.216.54 as permitted sender) smtp.mailfrom=charlie@rivosinc.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687900040; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=sirRvSov4RuE6Flh2RoZE9PzcNIKlryblf5nf7NWajA=; b=ksQXJpNcuohkTV3PVhpA7jF/HWeaFw9G/LKRFOxxNHOtA9sSXHniE2Hhfybgk7l2b2BN+l 4ffRYPhneXn6R4x4ulqrDbNxVHQh+TpwE3FL/7Mo6qCNf8lSV2EqDgPzeU7YkufmD/O0VV 3SEX+PiNST4r0op/9sHrnjpGUr7lmuc= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=I7oLfq4K; spf=pass (imf07.hostedemail.com: domain of charlie@rivosinc.com designates 209.85.216.54 as permitted sender) smtp.mailfrom=charlie@rivosinc.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687900040; a=rsa-sha256; cv=none; b=8iOxYeINmDGCTgZX+Uxt6UH3r7dhTKFSf9cXqsMAJYjQhx2XbwBdTlsfO/cnpASfFXnAeP O0xXVhKOdwptjtAvdVDmKZqXaJ/ZrAUxRD/hlqlK3jZ4KDxTYBHzR4qLgyFP0PgYsjJ+BO LEqh0rbXziC2rUUrOw2eexF0NwxWsMU= Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-26339ef4212so207562a91.1 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=Y5NH5Mu194Rp5IamOkTlQP48WAImCRWnjoGMCVJdQM7R7a0TKnymDwSyC5qriS/r51 sQPek4ROT+HpfdTQ/B6Z+ud9O2JSPrZpB/+pfea/qjN/jhC8+1/5i9w43vL3yyD3VWc8 ZxwmP8SP8S7u034E6MToX48P1JWw+2VGvd/+WNt25txeqn8Py/Q+gxvmxJKmIPUaTXyn vnViiX4CGunuJibWw7jUBgCG3W5UxmLTktDePc6sqsQxIeESL/KWn5sn1YNsjU9dr8zW MoqIsuGM6YB9GNMqXv0bYSh4GHJA/icj0BEJRyBFA/btPSX0R2RJFznaAcTAbedTIpgT N9Mw== X-Gm-Message-State: AC+VfDxdhEcJ++mJsXJE/YG/APYkYHstWcMPh6G4hBNmo0vs/Tz4/m20 n1Tk+opclHFK6g9fsR26l3x2PwX48BwNU0wuw864ig== X-Google-Smtp-Source: ACHHUZ5Q51IS/tAaF6PaipIVHaMH4/ZWm7RCaYeKfDNSDheaQLI1oupE8xj/yAqDJWqRYjjyAgKlsbVIw4XiC8NsIKM= 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-Rspamd-Queue-Id: 81D2540007 X-Rspam-User: X-Stat-Signature: 4jhhssbzo77jzx78yhpwo7am6ayi9hto X-Rspamd-Server: rspam01 X-HE-Tag: 1687900040-639199 X-HE-Meta: U2FsdGVkX1+v2YrtZyKdSOZ7bW6C0/EZxh9w+nI3tjIqGtGvvAVDUzrP3vgYpakatRFPXUdsCpsUhrTRnSshliO2mCCgIeqZPtEjXfmnay/FOVhyfSEZa+EsUEVAVvNSkEigyB8FB3F+wHCW9TMaSfHhMbZS94De1sx2KjBHzJF0O/+jlPhvaa+dNju6gAd9wtc/FiRdqAxjwSudt3/GR0R+28g6k21Ps1dDnczuSx6jEiPQIYnmIhh2B715d7HZ1q3ozed2YUToY0+nrnx16Cnh/6JHzINQ4zKX3VVAtACpHFZyS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TRogt+R2xBdsNcZpTsLkZ8fvgRjrs+JNIg4fnbsb1nrlCiKsFeHMgcdiErYRFI+DeOYS5uZwHaA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 > > > > >