From nobody Sat Feb 7 20:57:04 2026 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32E0822578A for ; Tue, 27 Jan 2026 09:31:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769506286; cv=none; b=rQr0tgofIZHPmtG5S6fmpKz37KzJ2MGcK1U9UmZOZDQqAJQ78TXkT378TXRdkA6Gns579MB5a8TKWyZV1w61TEUBkJGbG6nuL+ot7n02xOFBu4Ob1noKRZl80Hxi/IaZxPXeohNRbRhxej8pnfli3O46TdFdl2PqbR7mEwIrMKk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769506286; c=relaxed/simple; bh=5vuZw+X7adFX8VxWvWfRaybAAb51HErm58SijHTE8i4=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=mQfiNMxLo6xD07lQYUp5M7xHK/LdSjwQPk8UtLrwgyZnL2i4eVdUetn68LGTMzmvbN/Njm3XwzIf4b16jJohaA+MaNr0gIqqMuP/7xL8/L2fHDtm73JjiNtrR7tE7FvBEkaJWiKSKtMjON4k+niu9qcupTCyDv1kjc5xf1EkoWc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QqzwLiTd; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QqzwLiTd" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2a0834769f0so35608855ad.2 for ; Tue, 27 Jan 2026 01:31:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769506284; x=1770111084; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=Nvr2xv+8/kE2Yaa160xiVghqX5wMbpe9ZaewCjQfr5c=; b=QqzwLiTdUTfeKhkvDaERANi8X/OBKpsiwn1qwUTWRvCyZSJJNMejsrmFZRC+6F8yyk NnoyE0zWu+AuCbCN2/hKtuOl1uxTVm9nCU0V48PGvKtt3nXW9ID9zX7Rwka8vEIXtJ1S uY9MCjcpdVaiD4aUa1bsmj2041iKxLka9PLie5oZWAUKcXguL/tFR6tEqrqwH+TvnVf2 bSyLL/JHemosVcffu7ZkQL76gqJMvDq4vLpyMkkG3OHg0s+G177E2qbPTSNa8OM/CBa4 Lj6bF72ApjouuZVNkuz1GeAr0d5g6ttedGiSdFk6vHxAu71h1/XyBxtO7+1rl3LZTBxO n5Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769506284; x=1770111084; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Nvr2xv+8/kE2Yaa160xiVghqX5wMbpe9ZaewCjQfr5c=; b=qXtdnjDTLGF3gl1XAoDw9lD1j5fjpDbYCObgOF2FRBD3Tia7hZhRG6hL6HwJBW9rEH cyzRCmY822q/0AEPZ1xXMn7ag2jhFku2J36ojPcqQjf91e7pYPQnLFYUnqlrJtGZNfFs +d6okH8aKR0qQbnObl7D9QJixYK7Fx2fbKfxB9kGmA3Ib3FwcxzTpaxDU62R0doPuqn7 5FnkE+pQSKoeB42X1Luj0A0JnrwjMmnG2+eBKsfCz44kE5//3v/gyiny2Iv4fA+8ClGk j4LUi/4vKQHaMWsAgujZUnsQ4Qhk2RWhhX6Rt27yQCtE+VuyTExaxsRhK9GN/7zjt76k oVVg== X-Gm-Message-State: AOJu0YziezOVg6SnQ68GIIygnQub4feZ/4eW7McTSWhw3EzUrvi/LFvx h567fC/d/9NcUSbHchLFIb0q2IWp9XNhIrqSm+kLgK1Pr3+1wzb7uqrK X-Gm-Gg: AZuq6aIONoAA4YW+q5jdFV6NlNKM4x6iU7qDL2vektEf5F2DZz1d4hHk1WLRMl0Of/7 z/3fjl1ynrkqsxQCflwvTDJkPZU7Icaj0YJdnYQMeyHkr8uHBV03D5Vce9A7kNn9tUoHDB8K4Xx SZlnU23ctKtpXH9ANBOM2ECp068vKFtfide421am27buc2m/Ta+T7hqUHQ9o9lwUjR5/IG1ZPYE SwGGji5X6KIa8HD1yERVyYZadpJmzmnMpefxudaMXD4tA5sqpP+5tT6kxworeOmkiQRRuEWNuUV zRSHgC+RcO+t2qS0Ul4LXDPJLxCOAgl2gnuqmaIl2Oad92UHPiYrrPCN1/m85pWX6cIPBnpmyoP PazG5MzpD1YDQVyqiSKWX8HbxX1WdCKiySxyVVdJ3PbH3XfOJl+ykOhvZVPO9vUw6iDT1Qp2yT2 vLXR7I37m6bVeebbtfo71tghuhxc4= X-Received: by 2002:a17:903:2b0f:b0:2a0:97d2:a264 with SMTP id d9443c01a7336-2a870dd5709mr10270305ad.37.1769506284518; Tue, 27 Jan 2026 01:31:24 -0800 (PST) Received: from adminpc-PowerEdge-R7525 ([27.122.242.81]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a802daa8ecsm112363425ad.17.2026.01.27.01.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 01:31:23 -0800 (PST) Date: Tue, 27 Jan 2026 18:31:19 +0900 From: Austin Kim To: Paul Walmsley , Palmer Dabbelt , Alexandre Ghiti , Albert Ou Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, austindh.kim@gmail.com Subject: [PATCH] riscv: export kaslr offset and satp in VMCOREINFO ELF notes Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Austin Kim The following options are required by the kdump crash utility for RISC-V=20 based vmcore file: - kaslr: If the vmcore is generated from a KASLR-enabled Linux kernel,=20 the KASLR offset is required for the crash utility to load=20 the vmcore. Without the proper kaslr option, the crash utility=20 fails to load the vmcore file. - satp: The exact root page table address helps determine the correct base=20 PGD address. With this patch, RISC-V VMCOREINFO ELF notes now include both kaslr=20 and satp information. Signed-off-by: Austin Kim --- arch/riscv/kernel/vmcore_info.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/riscv/kernel/vmcore_info.c b/arch/riscv/kernel/vmcore_inf= o.c index d5e448aa9..682ba423c 100644 --- a/arch/riscv/kernel/vmcore_info.c +++ b/arch/riscv/kernel/vmcore_info.c @@ -3,6 +3,11 @@ #include #include =20 +static inline u64 get_satp_value(void) +{ + return csr_read(CSR_SATP); +} + void arch_crash_save_vmcoreinfo(void) { VMCOREINFO_NUMBER(phys_ram_base); @@ -27,5 +32,7 @@ void arch_crash_save_vmcoreinfo(void) #else vmcoreinfo_append_str("NUMBER(va_kernel_pa_offset)=3D0x%lx\n", kernel_map.va_kernel_pa_offset); + vmcoreinfo_append_str("KERNELOFFSET=3D%lx\n", kaslr_offset()); + vmcoreinfo_append_str("NUMBER(satp)=3D0x%llx\n", get_satp_value()); #endif } --=20 2.34.1