From nobody Sun Feb 8 10:04:07 2026 Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com [209.85.222.47]) (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 D8B813A7846 for ; Thu, 22 Jan 2026 12:27:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769084830; cv=none; b=t05uGgpCO2WPxxJrllUBaSPLA6heXiWxbdrzUZ6VR0b69VDw3DNySjvKSI8QmepIHQjgX8dF/lpRs3QQ3T/OjwWn6CajkEf3aettIN8C6eyMIYZuB9dlx4x6bZ+oZlZWaUaTlhELku+9m5VHfh9vRQphxRlcD9qhBPsGgY7dg9c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769084830; c=relaxed/simple; bh=vie5t8xzGr4ypRxubPZM9v9pvxz+F+pBWG6PJJK06g4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=eyvUO4C3rgR8GA+cNDqgbLtCSNeThnwU7D+4m+ZZYrt6teiJmFLRV9KC9R6AGaWf1p5b0JoT2eeMPR2xTdwV4mGBf51t0Nh522VUwg3GpKhL9avjx6l3u9axDUSQGt4tLTsJeVfdE/pGr/Mky4mSQTo9qbzoxuDFf2r3Dc7ucDo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.222.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ua1-f47.google.com with SMTP id a1e0cc1a2514c-944168e8c5fso524818241.2 for ; Thu, 22 Jan 2026 04:27:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769084827; x=1769689627; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=S3Hqqk4JBROcEFoFino8FJqENlE3zxT2KuDHMgfUmzY=; b=JcXUEAacHyhrT0uWY+BVw34xiuU63Gs1wVFyTrrp3bIvfFtyVWjLrnbzm8gnAsgMLk rBltF74hRwIAmdOD0bEraVqCglPcs5lJLnGF/S5T27cS1V5UsWT5QeN2cG4Pv4kiDQtH OABsKk0VHqwWK/oh7sz//ic6uQsyppzw5sd7SXuGHVDV49JXvR6XNEO7Y0r1+ugr9uDV Kdhn9539cQzRCtpSee+OJd3kyAUD4tT1eHg9NS4iqPRsSRL613iZitIvxEbi36DuLaEs ArZjHNzAiSHkFHis6mslm/R2IsGjYBPY6vnROv+KMC/8A3Z+RZUcdFaUxFxxRrPal+9Z hAXA== X-Forwarded-Encrypted: i=1; AJvYcCV8Wzdya5JybPtYthuY023mSn8xB/n5//ozDMc0Q4kTfApb28PURdBN6XHnhHco2EbpULyZmL0R+y+dDJk=@vger.kernel.org X-Gm-Message-State: AOJu0YwsfmCzQ4OiqJpdUkRAo7m/wibEzucsfOJYBDZo1rUoHKhCW/Pe A1Lqg1QA3+SLmaYi3ucyvFZ7uxPzKfPPqhDP5Upx0/caVOwUpUfM9jzh X-Gm-Gg: AZuq6aLpf0qYp+r9q7T0LbuDSdvhQL762RNh8evzdwcSBOafgXt8V/cE7mCgqLMcOlL vnjmYkLr3fuBsjYDhVWSWB7LNgcQ3swhlVkK9FAVQbUGfykMy+kUBqfmh12KsE/mugnpk7vcwdC Owfsi7GaVajEAN8K4PyZ32AacSHn6UfNfF5Q1hLyNmMLzXHo0urMtcGWRXq1SnQUfMxuwCjGJqv kVUHBHyXwBso93FNCYScnnFM85Llz6CKrHl5/89mqCVrK0e/CvoepEQ29pFS2tkJseZ7QllgfGI gCy2RcTVn3HnJNs2uCY4SQq9hUTYn6HAhamJ9bRqkp7pKYCPipPxj4WzbRIQOuNq4QeuYYpFQE1 +TYGnfWbHN5lNsNVD/ud3tVwDtcr2QtCInec4n5B31UbauzXWtYpZcyFjyioUycfO3fbYVGmwsu Allw== X-Received: by 2002:a05:6871:414b:b0:3ec:a4ed:cf6a with SMTP id 586e51a60fabf-4044cf8c8d8mr9382874fac.38.1769078389093; Thu, 22 Jan 2026 02:39:49 -0800 (PST) Received: from localhost ([2a03:2880:10ff:56::]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4044baf613dsm12981513fac.3.2026.01.22.02.39.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jan 2026 02:39:48 -0800 (PST) From: Breno Leitao Date: Thu, 22 Jan 2026 02:39:36 -0800 Subject: [PATCH v2] vmcoreinfo: make hwerr_data visible for debugging Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260122-fix_vmcoreinfo-v2-1-2d6311f9e36c@debian.org> X-B4-Tracking: v=1; b=H4sIAGj+cWkC/3XN0QqDIBTG8VeRc51DHSl1tfcYMayOdQbT0CaN8 N1H7XqXH/z5fTskjIQJWrZDxEyJgoeWqYrBMFs/IacRWgZKKC2kktzR9sivIUQk7wIXsm6UM6K 2xkDFYInoaDvBe/fb6d0/cVgP5ShmSmuIn/Mxy6P7i2fJJb822Ghne20E3kbsyfpLiBN0pZQvF oU6z78AAAA= X-Change-ID: 20260121-fix_vmcoreinfo-01592f705a77 To: akpm@linux-foundation.org, bhe@redhat.com Cc: vgoyal@redhat.com, dyoung@redhat.com, xueshuai@linux.alibaba.com, tony.luck@intel.com, linux-kernel@vger.kernel.org, osandov@osandov.com, kernel-team@meta.com, Breno Leitao X-Mailer: b4 0.15-dev-47773 X-Developer-Signature: v=1; a=openpgp-sha256; l=1598; i=leitao@debian.org; h=from:subject:message-id; bh=vie5t8xzGr4ypRxubPZM9v9pvxz+F+pBWG6PJJK06g4=; b=owEBbQKS/ZANAwAIATWjk5/8eHdtAcsmYgBpcf5z9Kvrt4Ntu9JahjPZKm4WfgQ7K0fhIHRI0 Zy+B3t0hpaJAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCaXH+cwAKCRA1o5Of/Hh3 bcysD/0R3p0PaB6w0PwqnOLuCPvyAnH8n31qqz18jrrqV4p4hVeXNIRuH9wEF3INVFWOZXwyjz2 Ty7/ZdIWBEnhGw2tL7hQhOAb/jZVFx003l7AtHIO7xrwqzU4g+NH4gJWjG2kGx23v54rT6hqQw0 wW+0siNN7PsmEWMBKBJiwUgqM5lA2YQIF0uCv55Nc/XOiS2Y0oQO4m4ak5fGhsLkNE2rFXH9wow Kgo7dp7ScZqK0n1++AxpslHL0brHXLd7bxgNK/QVSD3bu1vDhEUDcPtAP5f+oKwqNyW3YwIScEh 1zxIWQRvU0KcG0l6dEUzBT2rol08x/DPOiXVsw/3qiLdlZMK4nOseItTWpDG2HyME9r9Qtg4o1u b/BOWA0NCZ8d0wubICdheSiwfHXxF7xf58/yYNMYcfDxjB0bW05fMyFjmqa8in0C0zk87lqHIlT otlMq6BMUxvUf80ALRRCUlSNLGaaqMA/KNukSvpZQyVZEpPiEziUwiR4yem2RicWvNpjOrAEI3q 7iO0k0M7gMHOhPas5BU3ojXflV9ujvJLv8mvBifPk0bYM2ootVp5IYeCEpgWnsSulZaNFf8WBh6 XjzGi+984BA7BtakBiTkA+ciADHwbVtTPuAEAoUKGcp+QRvwkt2OGhR6xRFKMNiAPgAW6KG9Eju H9YJ1O5C4Ro8dSg== X-Developer-Key: i=leitao@debian.org; a=openpgp; fpr=AC8539A6E8F46702CA4A439B35A3939FFC78776D If the kernel is compiled with LTO, hwerr_data symbol might be lost, and vmcoreinfo doesn't have it dumped. This is currently seen in some production kernels with LTO enabled. Remove the static qualifier from hwerr_data so that the information is still preserved when the kernel is built with LTO. Making hwerr_data a global symbol ensures its debug info survives the LTO link process and appears in kallsyms. Also document it, so, it doesn't get removed in the future as suggested by akpm. Signed-off-by: Breno Leitao Acked-by: Baoquan He --- Changes in v2: - Add a comment to explain why the array is global (akpm) - Link to v1: https://patch.msgid.link/20260121-fix_vmcoreinfo-v1-1-39e96fa= b670e@debian.org --- kernel/vmcore_info.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/vmcore_info.c b/kernel/vmcore_info.c index 22b3205dd4dc5..46198580373a4 100644 --- a/kernel/vmcore_info.c +++ b/kernel/vmcore_info.c @@ -36,7 +36,11 @@ struct hwerr_info { time64_t timestamp; }; =20 -static struct hwerr_info hwerr_data[HWERR_RECOV_MAX]; +/* + * The hwerr_data[] array is declared with global scope so that it remains + * accessible to vmcoreinfo even when Link Time Optimization (LTO) is enab= led. + */ +struct hwerr_info hwerr_data[HWERR_RECOV_MAX]; =20 Elf_Word *append_elf_note(Elf_Word *buf, char *name, unsigned int type, void *data, size_t data_len) --- base-commit: 053966c344dbd346e71305f530e91ea77916189f change-id: 20260121-fix_vmcoreinfo-01592f705a77 Best regards, -- =20 Breno Leitao