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 21683C001B3 for ; Tue, 27 Jun 2023 20:44:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5750D8D0002; Tue, 27 Jun 2023 16:44:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4FDDD8D0001; Tue, 27 Jun 2023 16:44:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 350578D0002; Tue, 27 Jun 2023 16:44:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 231598D0001 for ; Tue, 27 Jun 2023 16:44:25 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id C05531C8980 for ; Tue, 27 Jun 2023 20:44:24 +0000 (UTC) X-FDA: 80949705648.21.CA68917 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by imf05.hostedemail.com (Postfix) with ESMTP id A4076100018 for ; Tue, 27 Jun 2023 20:44:22 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=HnUnP0vw; spf=pass (imf05.hostedemail.com: domain of charlie@rivosinc.com designates 209.85.210.178 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=1687898662; 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=U6H5cDFr1dyx2lCsy2AJPNTJs3FzaFbYaxaijcdCN6c=; b=jCwo+3UhOqvKFMLG64SKslZgpFblw9jxNz107pOqdDNgXLPnbkLh4Bo4NBFvXT/V2ICtAt wpmupNBD4uBVO2BxUiCeRPzXlgDJFHXEM6tkItTmKXgxyeASOQAgjPCI7XuuUlPBiQYphL FzEbml11MkPtGNqAJkPHEgdYKaOojUI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687898662; a=rsa-sha256; cv=none; b=nGd/Vt/jppOGVAsTEHEFMbl/mx55rL9G0hW8hcnXDh5gbcaz4WSJNwNWKuPXKy7BaOI0Ro xQMq4u5FLi7B60W7DzSJao8inhWprs3UPLKGQMgPcmbzauSjISQIkv0cLVqr72C5vw4ink BDevLIkL6mYDJRcGIJxCZMDVfG8Ha30= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=HnUnP0vw; spf=pass (imf05.hostedemail.com: domain of charlie@rivosinc.com designates 209.85.210.178 as permitted sender) smtp.mailfrom=charlie@rivosinc.com; dmarc=none Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-666e97fcc60so2729578b3a.3 for ; Tue, 27 Jun 2023 13:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1687898661; x=1690490661; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=U6H5cDFr1dyx2lCsy2AJPNTJs3FzaFbYaxaijcdCN6c=; b=HnUnP0vwso/w9ndQv/pgq0gNpsaF7bZzRGOM3mn/GAVklFx34b8NPAaL7sUyHk6qP8 TscFXAhsCRRRCjMXxq4JtP67y8CIDf/nsGEfyRTfL68tyxoXM5JjeRZVQSpJevIrjXzQ VJ5zf1a1qZPrc1Esj+4IolnS3L3jzjFcCBLA2MGTe3rDQO7WWm3M//XqBvXsxXVYm6ng Hg8/UR1Zn1BwBmpfGVWa5CTfCYGbL2453fVUHPbZYlZP1pRzbhOSf1PmEc09JniHtujp WQEXzfnygKQV8nLVvSI5/36pi8KJScrN3YK3lkUXteD1d7obO6u8OR5PXCFiH0IxPR90 ZMaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687898661; x=1690490661; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=U6H5cDFr1dyx2lCsy2AJPNTJs3FzaFbYaxaijcdCN6c=; b=HUQlc39MmAHKkVBBwWSzLO6APnpt9lhLKkPsl4JE128mnwMCYV9lKJOd0iN4q1d/Sy +uYbXCr+eF8V8qR/nbpaykWTmrMiMMGWL1WdUJpevDMFOxVrMJsSBpJVtvDs6W1M3Ivn BZ1A7DSeqqrdbupnMUZ4hpjRYiftRupgOjk/RCotlvUpi/3a/V2hMCL4chvSBtRFw+dy 6+G9taDr78RxLCC1cLiauvTNvMHGYn7BYIKPha7Dulf0AohTZQO3m8Z6tDZQVbSR4ELw h67StrRVxlv4aMi488B8WCpG3DBEMpJTzTb6yqoXkKdowAMbUTd/EWQDhC8o8sfNq9i/ m/QQ== X-Gm-Message-State: AC+VfDzyxbrgQu1iCnX+H1DEhHu3YD65QGI53d0MZcHm9G5i6XSioZGB POC/7Bvzc7yzZjNImbF/gF8BfA== X-Google-Smtp-Source: ACHHUZ6yr8dixKzuikEVp36MwS6CX2PzvlrNDk/YH/WpQYExSF1m6bblfriT2qtqDBzbeyosRgtKBA== X-Received: by 2002:a05:6a00:190a:b0:66c:9e97:aece with SMTP id y10-20020a056a00190a00b0066c9e97aecemr7488833pfi.10.1687898661261; Tue, 27 Jun 2023 13:44:21 -0700 (PDT) Received: from ghost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id g6-20020aa78746000000b00666b6dc10desm5238976pfo.56.2023.06.27.13.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 13:44:20 -0700 (PDT) Date: Tue, 27 Jun 2023 13:44:18 -0700 From: Charles Jenkins To: Conor Dooley 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" , Atish Kumar Patra Subject: Re: [PATCH 0/2] Restrict address space for sv39,sv48,sv57 Message-ID: References: <20230626183611.40479-1-charlie@rivosinc.com> <20230627-eternity-mulberry-e1f4babf06a1@spud> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230627-eternity-mulberry-e1f4babf06a1@spud> X-Rspamd-Queue-Id: A4076100018 X-Rspam-User: X-Stat-Signature: 4qdxcsbm8u3zhnytb7f4gf91aebnnfaf X-Rspamd-Server: rspam03 X-HE-Tag: 1687898662-281720 X-HE-Meta: U2FsdGVkX1+M8crGcK7Sve7aZTnsviUFchlaLptvMJeiDlKZRA4pyL4m2QtBXk21dO63QOeCFC5hFcNu1aLWuYwS9UDooO9VTpO/sMrhqxPHAgS4VWBtHr5ZNEYDwRvAoBmW4vPImN36OV1v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Whf0jtEUGGYTWSaugXE+LQjG1uvPKoToqhojdJcSLv8rpuD5sYFEvgTWKeOf1oellqx5qpGZpDTeyanUelL57b1/bqwHUek4qtRKortpc3xM6NyPJ/YsjYOpBStHCXOjCtm+67WOrWtFAZF+gACs0AaClu9W/QR6Dg1eFiWeuI4kjdzMuI2w3dq/OhPfX9/T9B2tAfDbHVqKwcmr7dfalobbMT3FHUuk8J7waRie9qY1r7jWPD8cgspUlOkTBrN/EFXvcbiypKVuKfP0unmJww== 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 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 AM 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 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. > > > > 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 Atish > 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 > > >