Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18250976rwd; Tue, 27 Jun 2023 14:07:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5m6SmWU4Tspy525H/x6gGxaSvA4ZDQo6tr54iT920fWqB27cpRbx0t2m5yUF/jyccIKtVH X-Received: by 2002:a17:903:1251:b0:1b0:3a74:7fc4 with SMTP id u17-20020a170903125100b001b03a747fc4mr8450356plh.24.1687900054914; Tue, 27 Jun 2023 14:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687900054; cv=none; d=google.com; s=arc-20160816; b=vlprWFcc0txTDAMUnJgOfoY5ZbXOf/hai2lWXpACNtftTqguz0JtzFBPVqIzWpSq5V fzNGvzsZnCwuG4cf9INKLTFF34JQX1Z+yYB/e7vmFQ5rEy2vSct38yUpv9hT21x7WPU2 WAS1RzwU1wTYXSVU/XPa5PLCZWbTUHJ8aajPt1CvSRTbgukL1vnzX9/L70KzWeglPsFc bqks/Qpi9vKo3AMhgTGkHG/nQgmc9ORmFz/WRN4UCDIihkkUYA1foIBOMCnXEWwnvBwU MaqLnd753uoNL2L5wt9GWpyvSiOQGu6Qu6EIoIOnfRHX+l1BAQb0mQV45bc6XJhLr+Vy WSvw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=U6H5cDFr1dyx2lCsy2AJPNTJs3FzaFbYaxaijcdCN6c=; fh=0MVBtUSF3ycUfXv6Oy7ucBFzD0EK6RHBpZcqB8B7in0=; b=eMaP7fu6eXCOwpaKOyLyblbekFT3/bbZqYMMgTRdeUvPyU27gtx0gkJGPVllRNT00S JByXDt4SiNTZIPZtOe243pbGKC1FSuWkp7aPyS1nqoDryl8aImGwuVrnKD+tX39nIPnG YoNNVnaPej/imzCW+6M+EYSbqth9Mch65MYtaNLnbsAzXc3H6nWtlYQkVvHYgVziK2Z5 O3qxJ/UjSQt2aUyap4z/dmy8cB8WFJpk+1xoz3HtDtTyXBnSPwJqObT7UfUWahJXszX3 TOvZlRDEO+wVEaK/Uky8m1428Cgxf7nRghZ8QebJWSspnPBV9PY0w91mnUx7SjdBoO2T GNfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=HnUnP0vw; 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 o10-20020a170902d4ca00b001b81cea6c0bsi2245658plg.491.2023.06.27.14.07.22; Tue, 27 Jun 2023 14:07:34 -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=HnUnP0vw; 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 S230209AbjF0Uo0 (ORCPT + 99 others); Tue, 27 Jun 2023 16:44:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbjF0UoX (ORCPT ); Tue, 27 Jun 2023 16:44:23 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECCE01BD1 for ; Tue, 27 Jun 2023 13:44:21 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6687466137bso2736339b3a.0 for ; Tue, 27 Jun 2023 13:44:21 -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=djhWmgQsLsLq4HFBmsFGTHP/NqNqjdBUQvov+LwFf9LVq+w/Z99ABvcXB5k0oX+MLZ E1xVGTqGbl1jTPU8xDmZYUjuNlLq1Mxb3XJr+3omyUdxmBIKWNiiwUJWc9615+EeGjTi 9zz3Jb+G+POBn0626PgZct53+r4kZ/bUDbJ3UUNCrrm4PYpSGw28HiaEujn8CQWbHfrt nh8lvx9fRuD7D3q+EAkJMd77JsD320gVSB1q1lsUvzNIpLXWi9Go4VX1/TT0Oz+Hmp5f E0qVH/ErBRYB+IcXDOfe9xMCizm88k8wpLaq489Qs8XISKLcuHgQY481pbu4NNau2t/r gyPQ== X-Gm-Message-State: AC+VfDyv3dZT0Qz2TPAb/2UzYiJcJj9l18YeSQkqDpgxPD7pIz9mw14i MokHb0aLo+U9P1tF5l1v8pfEmw== 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-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=unavailable 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 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 > > >