From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 ABE9D3F23DB for ; Mon, 15 Jun 2026 13:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781529025; cv=none; b=IiKCFPe3BiKbd7wfRDTaZi6+k9ffopsFR7sniyhPUR6ClluoRmFS+OYlvzIBotxDNFbNZ2BVI8oi3u98M6nSXD9uHsYtFkLxcNTSob+LNgEsr056nSHlb4fmREXTH9jWEQfCHZ+ZKH16RH4EkcQSJWNhPD0rC7c0tE6KZ+S1XCU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781529025; c=relaxed/simple; bh=ItgeRk/xZG0D0PMKG8vT1mZwvugZngdNNcNYWbkCq/k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=sookXIbYhPYD8bMGPtClUw/6+4+Mu3yJb1AYuR++LyDf6pvXawjtIpfcU3QnBVpg4Q9Z2R+TTm16NrL5qPEpBumcpzMCX70IYt3Qpe0dOq9uAXL4mGR37GRyq22fo4RXcLs2zGaUltA/Zl8lY5kIBl/Kin4k4Ni6DLG55F1v4KU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OTp+cZD6; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OTp+cZD6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54C801F00A3A; Mon, 15 Jun 2026 13:10:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781529024; bh=zhn4u/RwBJCsFuRZh4UxfYwkjfJ/s+9iZ2A4f5NGClw=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=OTp+cZD6od+PGRGK3BsiGmIDrbHRl9RqcfqylKucq9Rr173WM+mKyKehY0QuC7R5L zCITEeW5dzVI/I0u9S/xPs8Zuu6PEHHzV9M7aFVptWQiNENNU5UKSUESbAGJ181TLm 1w6ghvd2FznDE21Q1264xHJya8xsrgZy9zl9hV3GiKV/VAMhGhNzl5c29eahM1tOfM Qlh2CqHFhkwNR0EQVI2BPme2DpIJYkChENsjJ7hWYYsax8I/p2zKdBFGfPF6GgWuIg ntkW1H7q54VD4TEVOQT/BXiCSJS0BeG5SKdbmkMvr5QZOnU1dwYFOqUCNDT2d/7Rhg A9cdSxqH1UH1Q== From: Pratyush Yadav To: Mike Rapoport Cc: Pratyush Yadav , Pasha Tatashin , Alexander Graf , Muchun Song , Oscar Salvador , David Hildenbrand , Andrew Morton , Jason Miu , Jork Loeser , kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 03/18] kho: return virtual address of mem_map In-Reply-To: <178143855111.2123877.6067087545413454825.b4-review@b4> (Mike Rapoport's message of "Sun, 14 Jun 2026 15:02:31 +0300") References: <20260605183501.3884950-1-pratyush@kernel.org> <20260605183501.3884950-4-pratyush@kernel.org> <178143855111.2123877.6067087545413454825.b4-review@b4> Date: Mon, 15 Jun 2026 15:10:21 +0200 Message-ID: <2vxz7bo0q79e.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Sun, Jun 14 2026, Mike Rapoport wrote: > On Fri, 05 Jun 2026 20:34:36 +0200, Pratyush Yadav wrote: >> diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c >> index e8454dc5b489..d8dd0ede4f87 100644 >> --- a/kernel/liveupdate/kexec_handover.c >> +++ b/kernel/liveupdate/kexec_handover.c >> @@ -521,7 +522,11 @@ static phys_addr_t __init kho_get_mem_map_phys(const void *fdt) >> return 0; > > sashiko: > > Does this error path need to be updated to return NULL? > Since the function signature was changed to return a void pointer > instead of phys_addr_t, returning a plain integer 0 instead of NULL > might trigger static analysis warnings. Good catch, will fix. > >> @@ -1668,8 +1672,8 @@ void __init kho_populate(phys_addr_t fdt_phys, u64 fdt_len, >> goto unmap_fdt; >> } >> >> - mem_map_phys = kho_get_mem_map_phys(fdt); >> - if (!mem_map_phys) >> + mem_map = kho_get_mem_map(fdt); >> + if (!mem_map) > > Here we can't use mem_map as an actual pointer because phys_to_virt() > returns pre-KASLR addres. Ugh, yeah. It also won't work on ARM64 because memstart_addr is not set at this point. > > Since we only call get_mem_map() here to verify that it's available in > the FDT and don't care about the actual virtual address, let's add a > comment about that, drop the mem_map varialble and directly check > > if (!kho_get_mem_map_phys()) Makes sense. Will do. -- Regards, Pratyush Yadav