Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1010190rdb; Fri, 2 Feb 2024 10:29:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsd8Pi1RL/6Pp1tKnM/IyP1v5xL5SXZf4FNV6803K/ozLBe/LD/e96/XJ46OyKtkPpSoo1 X-Received: by 2002:a17:90a:ad93:b0:296:1d67:10d1 with SMTP id s19-20020a17090aad9300b002961d6710d1mr2727955pjq.24.1706898578350; Fri, 02 Feb 2024 10:29:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706898578; cv=pass; d=google.com; s=arc-20160816; b=dxoSV+K0clnBWOd02nnC9MBxjG27uLydCqFaH7Xkpdoeooy8I1zpcxZXxHCdpuqOjM S99v8qS6GNF04te6UEaVyKyi6JTInRTFrdIYdTCzmrlByTPuzzTSTnRqZbzADVWujrF8 6ReG1YrZQuFMKK5HlfeeU50bMamWNpYg+Ce0zwWSQ3uSm0osngFMV65ooElSTzPX/hNP raH4BkwWRXdzKuvvDUVl9cCIDcv7D5E/EtSnCpj27pcUhqckbLnykjPzSVf5gjNCO4Rp aC9WACLIJHVykrrHKFz1zPLKyBIlsIz3IQodlLeSVzbVv07C4nqCbqzRrH2ZYWJ2a1Ar BGAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=JQjh2aEDgI384MZGXSK/RwX5/SXsTP/oQbxAfd75RMM=; fh=3Gs74XT9PbfUp+7w0jipven4V2lRPKQlPgt3WDXZlB0=; b=r8M/AsektnK5VJWlxCQDobb2cbqbATf2lJHwgYG7UmpLg/8ROzsVFTLF+kh3f9md18 HFqscX2rDz7Zz4R1dZQk7FLR38oSJpB5xxB5S/2eRa4mIUnUYICxBw0jUmvGTuBv9g+x GMGxu91Y19yOmD0LZ6djx/5x3dtcOtW9LkZfK6w2wr6Sd0PqTKY7dU2/uNUkJA8aqp3c hAxGV0KIc5Ns/MlNT0RAqNhPhRwGHaGRXRfMnjrthOJKonGdUWBdTFfeShjB8UPYhORp JSRpiY2FaFcWQgBAHiKqt7vOaeLx8E+FWcrkPqM+1ETlZcaPGkbIie1NADfD2U5ZRnIk 575A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iS18l0nn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWwTIZVW1XG/NUQ5tUqiWTbU5jrANChlaJtdpusQSF6WTS2Ud4K+XpzvQ/tPfLfjIuZ8WiHSc/A8yG/V2yXjsumIj0+YVnfl038X028+A== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p10-20020a63f44a000000b00565e0624182si2009502pgk.404.2024.02.02.10.29.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 10:29:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iS18l0nn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BDD0E283A61 for ; Fri, 2 Feb 2024 18:29:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1AF1814D43E; Fri, 2 Feb 2024 18:29:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iS18l0nn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4381214A4DB; Fri, 2 Feb 2024 18:29:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898548; cv=none; b=UeW6ERBg8LLkRd830BgP7yaj3pZr24aWRI8VY74HkSRSnFDTuxE0j9TZqWg1/5lIGE+042/fbuXeTC/SSjhPX6iupyT6q5gjUkl1C7qnfaf16TFeuBsTrVJYoznU8zFEhy9nuquVM256O1AozbgtiQXMCG1fh81nHqrmVpiXuto= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898548; c=relaxed/simple; bh=1zslocAyDz7T0m3A7m1ZKz5UdxjqSVhRiZTB0J75KZs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=YTMOZ4W8ofmqdBt98GCmSPGUVEzjFLLsiYe5J2pmP0nEF+YoU6Xz3n8V5nnabtK84shGlCOCAsTB+UiWaxAUTovX9rqymCMDKpef/rsDArEtz2ngxCrRrZcIOfxl1j9Muju5hAE3D4HXCyHpsacfFlWQVH4QOnf/PYs69qzIGEE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iS18l0nn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C18CEC433A6; Fri, 2 Feb 2024 18:29:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706898547; bh=1zslocAyDz7T0m3A7m1ZKz5UdxjqSVhRiZTB0J75KZs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=iS18l0nnP+SmAJmWyQRIfxT2qLS40WOWuolrE7ToKRmSKZKOKFy4d7503KFS3Y5Ob xotbpYOir87hFxJ9mwrnKizU3vaaEM6UvZYB5ajBkzHc+pxtQX+yRu649cqHDlYXo2 xq4IRqFDWJsO8GzAmRV0gH5AEdlx8KjYFqFRJulp3wCGlrVLq4KhUdtbGU80RQUx/+ 0y0GSbaxu7UCjiAJChAwcSiO6Trg7u0NkzaB60/tQvQFnpZmwE3qrcqHneiWVsgjZh qeyjkMN5q7Ib84M4qb8nT0n/4hL5/S2u9CujMdQrircDsMjiiAeJ9kH5lQLX+BiN6k kXPVZjsPC7Zzg== Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-51025cafb51so3687744e87.2; Fri, 02 Feb 2024 10:29:07 -0800 (PST) X-Gm-Message-State: AOJu0YzSItJR9RFDQasdyStxShz6xXxZD9GfzmIsAZfLdKnvaQkc5eWB 03G7/9NKlQJjDjcxnlihJjhDg1cTeNj77QrWLVafig57i0wz13BZKFJHa1ZLKmD3tdakLBWuYr+ b0LwO53wUrBFW4UVeeMfRaCCL4nk= X-Received: by 2002:ac2:562f:0:b0:511:1ed7:61b9 with SMTP id b15-20020ac2562f000000b005111ed761b9mr1845123lff.39.1706898545983; Fri, 02 Feb 2024 10:29:05 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240202180704.808766-1-abrestic@rivosinc.com> In-Reply-To: <20240202180704.808766-1-abrestic@rivosinc.com> From: Ard Biesheuvel Date: Fri, 2 Feb 2024 19:28:54 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/2] efi: Fixes for EFI_MEMORY_SP memory on RISC-V and ARM64 To: Andrew Bresticker Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" On Fri, 2 Feb 2024 at 19:07, Andrew Bresticker wrote: > > Two small fixes to enable the use soft-reserved/special-purpose memory > (EFI_MEMORY_SP) with dax_kmem on RISC-V (and ARM64, I think, though I > don't have a platform to test it on). > > Patch 1 fixes a trivial integer narrowing bug. Patch 2 prevents adding > memblocks for soft-reserved memory so that it can later be hotplugged by > dax_kmem. > > Tested on a RISC-V platform that presents a range of EFI_MEMORY_SP with > Bjorn's MEMORY_HOTPLUG series[0] applied. > > [0]: https://lore.kernel.org/lkml/20230512145737.985671-1-bjorn@kernel.org/ > > v1->v2: address comments from Ard > > Andrew Bresticker (2): > efi: runtime: Fix potential overflow of soft-reserved region size > efi: Don't add memblocks for soft-reserved memory > Thanks, I'll take these both as fixes.