From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o55.zoho.eu (sender-of-o55.zoho.eu [136.143.169.55]) (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 56B0D34F49F; Sat, 14 Mar 2026 22:38:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527917; cv=pass; b=CHuS6Xf/uPqWNsLJD1Rly4fkkaez5gto2QvAjpCoQuXw9rBf2M9qP6kZ4xso9lAxmKf/KhFocIW3QUNT7d5AxPOmcIDoB4RLEL3HTi75oX0zMr6pSNoXp2cKLw8rSiBLwF1+twsc6xFTYkgQqO884PE8cirgkY9LFkEEmPJmr30= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527917; c=relaxed/simple; bh=Y9mfWQWziz20z1wZlyGCqiydfBbJQNFNO/oywEYrkow=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=K20WGT4CjH5ADlaKGcbaOsjSrE3++p7Idbmiwa7pTTt20GAKTnt7ZKfomUHOxKb3E2qH+GP/Wz8Aje9CzZmMLBE8NUcLcOc6S4uxSJrCblYRdpXe0sRVjZgeXTbRSStea6BxnP66gF1rL0tt432zpI1mu0dW5f7GBdI3zFZC3d4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=KIjmCrdQ; arc=pass smtp.client-ip=136.143.169.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="KIjmCrdQ" ARC-Seal: i=1; a=rsa-sha256; t=1773527668; cv=none; d=zohomail.eu; s=zohoarc; b=MNxfhLBcytHZsNecvP/CV7NVS8kJnsh/1pck7jX+2RWTnp9HE9tVBWWUay+Gw+DdqAbzvW15uOf6usDxLJIiSdhAWPu2TU1xJ8UlKUT0+rK9672WdBYFzuRMLyHcDstzO77oDfw9Weconx/UUWQE5+owf2FS97xQdhJhRls2iLA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527668; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=hXgtMivk2FUkBDZ0ELim05yAd6enb/8iaNS3/idzO40=; b=XjDOX/jyljwoKEmPBECnk4WmDXgFGgSNV43aIZUCkEwDRGhry07xjQ9wruJumjk+K9dE7CdI5xLfRcfdk9hlnW5SM972P/l9ZR9RZp7UOW0efYUms3pWFDkt7z20Vg3vULklrraYGKnLQrsheRUTDSTn4uwX/E8lgZVg54qGD5Y= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527668; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=hXgtMivk2FUkBDZ0ELim05yAd6enb/8iaNS3/idzO40=; b=KIjmCrdQLMZs9vVfO1kYvvEAMFhVhlk6Cd/ozmDn5M3TI/Vl+wbpwkqWzJJBQTe3 aWF8qXB98OQkePcCUsle7LW/NfTBf2aO3cZGtUqvrLKmG1zb5Ig2+CNExDNEUBsIzRV 3B9ergk3VOjka4XSyax6N2zv8j/JKvZsqO0AnF5I= Received: by mx.zoho.eu with SMTPS id 1773527666944922.5579149566756; Sat, 14 Mar 2026 23:34:26 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 01/17] lib/bootconfig: add missing __init annotations to static helpers Date: Sat, 14 Mar 2026 22:34:09 +0000 Message-Id: <20260314223425.142966-2-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" skip_comment() and skip_spaces_until_newline() are static functions called exclusively from __init code paths but lack the __init annotation themselves. Add it so their memory can be reclaimed after init. Signed-off-by: Josh Law --- lib/bootconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index b0ef1e74e98a..51fd2299ec0f 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -509,7 +509,7 @@ static inline __init bool xbc_valid_keyword(char *key) return *key =3D=3D '\0'; } =20 -static char *skip_comment(char *p) +static char __init *skip_comment(char *p) { char *ret; =20 @@ -522,7 +522,7 @@ static char *skip_comment(char *p) return ret; } =20 -static char *skip_spaces_until_newline(char *p) +static char __init *skip_spaces_until_newline(char *p) { while (isspace(*p) && *p !=3D '\n') p++; --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o55.zoho.eu (sender-of-o55.zoho.eu [136.143.169.55]) (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 B127B139D; Sat, 14 Mar 2026 22:34:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527677; cv=pass; b=Q3vUc3et98eVTCQMX24DkcoXCJLRMYabchEN1jCYCfFVROx51nL0kLHnzY3lOoEkEz3hyIM3TUzMQ30I7gRSw3RedM8n+bjv6MbZ65YXn9rxnqzDV/K53+ZkinLWEAj001QcZjEk20gyPB/Mtl5xvBquBeu7dX+GmqxSEwupIPc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527677; c=relaxed/simple; bh=mOcA5NumuG5htRvRiYXxJV6Vjf0pzLdSrtjWwr+L0hk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uW7fj/X3bKX6509z2dS1EWRXg630R+uq228UTcqNGKBVPSW4rmdZd3IU444YlfO8pOO+f9xDoU1PoEKrC56iEIgK5lO3vgZ9Gowfth1qJEy8PkcDei2ebtSZWg3GZ5Z8oRK8MgIqZJRHY8/2tNwpTVOX5N76j1pywijNYg2Ff+s= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=bIyXpJLk; arc=pass smtp.client-ip=136.143.169.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="bIyXpJLk" ARC-Seal: i=1; a=rsa-sha256; t=1773527669; cv=none; d=zohomail.eu; s=zohoarc; b=kUW56jMHh8l2967Lhrfy0b4rIhPQxmr403rB+Hgj+C7FF5Xk8Tje168wdJ+ViKsWTYB2vxEMFg6/RI3/2Z5P/NSEwYluGaK0Vqx48L6Oe7SNrtFNRPAQ5g1gjyipjaOM902VHOtM1AHhcS5FvrvXlwlAmntDQxYgna79KjA6lKw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527669; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=RNVEZU5OMpS4t6chZVfYPFtX6E6ANKPvlBhC6PXo744=; b=TAq2/jymz7fbXzOCyE2MXAOau37DaqMDOIFi9mxyDC7mSa2wmKNfRKj7xjFTBkijaPh016wBEpREp2WKapuT2kBOqwOTg7romYFHrHYKp3KwUWNV9gCUm6jG893ukw6gpT+i/4vO+LGWJDnpBFXU9Fva2bDcAyDbYloeZer/DB0= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527669; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=RNVEZU5OMpS4t6chZVfYPFtX6E6ANKPvlBhC6PXo744=; b=bIyXpJLkK6/a9z1mg/dPNfkvkw0EaIl/rVgyGiWjwz75ATWcWyo44Bw9XaCHNZBt rQqq/tXuTMZPhEm+MTVfi9eTTGz4DMRRdXMBjdrcyc+Pe44yxkxltknQIXwrS+nHbJd mIBSxH74hjzIU2sZzy13BqABLPYCEdiKqOe1AdRA= Received: by mx.zoho.eu with SMTPS id 1773527667498640.514927790007; Sat, 14 Mar 2026 23:34:27 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 02/17] lib/bootconfig: fix typo "initiized" in xbc_root_node() kerneldoc Date: Sat, 14 Mar 2026 22:34:10 +0000 Message-Id: <20260314223425.142966-3-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" Signed-off-by: Josh Law --- lib/bootconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 51fd2299ec0f..53aedc042f6e 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -112,7 +112,7 @@ static int __init xbc_parse_error(const char *msg, cons= t char *p) * xbc_root_node() - Get the root node of extended boot config * * Return the address of root node of extended boot config. If the - * extended boot config is not initiized, return NULL. + * extended boot config is not initialized, return NULL. */ struct xbc_node * __init xbc_root_node(void) { --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o55.zoho.eu (sender-of-o55.zoho.eu [136.143.169.55]) (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 D1E9B37B03B; Sat, 14 Mar 2026 22:34:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527679; cv=pass; b=A4cxPRXDj9dxgxK/kHzoRL0h5Hfv6/3i4m/lZBnnTCb3m8Pgq1viQ8c/yCTQTDPIaBae888Uwj6Xk9rePDmgbCG8uPKxL4VIF9ACrhlF80/RK1Bb5jq8DS6BKkE8BYtwp2ItdwO9ZPWssNrL3XTo0IqQmyMUqed1dHKX/gx6bak= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527679; c=relaxed/simple; bh=UvLyNGwexYo2cn8ocKvKWmvyhLSh4vWkr9PLO2DssME=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pvfx+KDXQpsmLUk55a77QWriDKieGqEWQ0va77ip8Z9OETq037rbQJigHtFkNGmJUS5D5D20XgOhkK/+Dez1SmXjqx/QvFDkCgboq62TG8UuBRDl576OkFkwwUbdWfjK1nEIYIU8niK74Q6JeGcJY81/pl5S+89a/u/YYyOSvak= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=AC/FymD7; arc=pass smtp.client-ip=136.143.169.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="AC/FymD7" ARC-Seal: i=1; a=rsa-sha256; t=1773527670; cv=none; d=zohomail.eu; s=zohoarc; b=JIqBTv+SDVLxUQmlH7iSGHzThzpFPsp3LcU/U2lZUx0sdw4D0YXAsLRuIrl/O8fghn6643OTKVq0o9RrOOUS+1hLE4WP4aoUgea1Pf0guOL7KQwh1denzeUM5g7E/yrshNwShzSirElC2QFS/xLLu9MG2+WVWMDTPXYF0PL+VBE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527670; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=cBOmSVZK/tdF2G9FHoUjRcgfEXBwIZcdPH0TEKRTIUc=; b=DXonhSLta013tueNyz4610CT1rXaOxIgy/T8AAW5/OmfcGepmIRDkBSQl5Xwu6kQ2wnmuVyWPDCOF8qdqQtnaUK9OGY56kqHQ2nyz4DzRAtsopRAFXZR9tJk28JCHhzYW54l2Jm7prySL0rULu81OWMTSPJKMq9Sxebw1S9mtJc= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527670; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=cBOmSVZK/tdF2G9FHoUjRcgfEXBwIZcdPH0TEKRTIUc=; b=AC/FymD79nKr5SrThmeYmq885sVfwzLR9OlFGJeTli5jHnMvR96PCt/xjFP36T8N 4y4Uu7+zaXZwhYTWa1NwVHVK48WnjObIjivc1B8sAvs8YgpepTSjJF4DUCPp9HcG3lt Ihrh3+0Kx56ejZ/OR1GorTXIqm3GiKoEp+zUCyME= Received: by mx.zoho.eu with SMTPS id 1773527668034625.9864923958036; Sat, 14 Mar 2026 23:34:28 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 03/17] lib/bootconfig: fix typo "uder" in xbc_node_find_next_leaf() Date: Sat, 14 Mar 2026 22:34:11 +0000 Message-Id: <20260314223425.142966-4-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" Signed-off-by: Josh Law --- lib/bootconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 53aedc042f6e..35091617bca5 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -364,7 +364,7 @@ struct xbc_node * __init xbc_node_find_next_leaf(struct= xbc_node *root, node =3D xbc_node_get_parent(node); if (node =3D=3D root) return NULL; - /* User passed a node which is not uder parent */ + /* User passed a node which is not under parent */ if (WARN_ON(!node)) return NULL; } --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o55.zoho.eu (sender-of-o55.zoho.eu [136.143.169.55]) (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 32688386544; Sat, 14 Mar 2026 22:34:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527679; cv=pass; b=Uu6AsbxQizYB0n6ruVbiH9K18vfucQzcjCf9Pka0RAH5pjswyz7QlvMIXKyL8QjR4vSesn8bQ8b+fKhkNOLNAvQIjXGmITYuS8+XpQAs9YmLxVL1wdDKRJI4Em2x5IbCT5jF+MqUh6k0ycaTu4tqTGUowekFRfzycuKDLdLVAFU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527679; c=relaxed/simple; bh=6svVtZsg6MEUjaimzvi33uip35p+FZFQJNiBWVQzsKk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=A4FEgO7Phd5eDd+mn0qsO5IHwiAgyPe7/HVgzYyMOhUydvgbOYSYKzC49NSvw8+JKoXQJe3vrAriSTKMiKjGjjs7rBrrNO1j9kYl6wOgjxYc06+ufmRIZXKzLJDj7j2IkgIStctE2wB2DY0A4/EsGMaAxAZYE5c06S7xuR3jVUA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=mbMSsT33; arc=pass smtp.client-ip=136.143.169.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="mbMSsT33" ARC-Seal: i=1; a=rsa-sha256; t=1773527670; cv=none; d=zohomail.eu; s=zohoarc; b=M5b2c5AOCMXNNGuIFHCvJrJNpX/IZ24YF+mXfGjs5MmiokE30+ma3he88BHsS76qJi5aBEUPehggKUCznG2QOvFsSLACNt84Bm2zXAQ8XlvXimhkPfydeUgNkli0H3h1BwPuNZJg/cxxImOVX+oYw6iDJmAQ0M9fPhgkVJz2hL4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527670; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=fWLmQp+E+iKxPqtXRglbvpsORXtw/1BYKl9r2jjl73I=; b=KwG90d9a178WjB5yYHz76BzOeFlIE9wdJY026jZxkoTaaNK2uaU6x3Xe2rB0Qvng6wMQGj71VpN0xpV4rU7GtmTeZ9KTK6dcE3/k2GNAhT4Yah1psQGAamvh6Nucwvs5WQEbbvDqlIMC0o9q+KDPfFM+OyqEb9b295D8FC4AhQM= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527670; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=fWLmQp+E+iKxPqtXRglbvpsORXtw/1BYKl9r2jjl73I=; b=mbMSsT33C1zb26a2H/Xr8mb7Sz0kXWLj1IbmguQepxwwGRS5bXmJ6vk1hqNiBsAI ugJTQ2Q+obWMjXsM92wKKnSKg8LgiW9BvcJ9IlWbHlIlBOf0IXd1vK0SnwgxBC6ZDIp lsE534TO7B02AfShVZsJRXDoTjLGT3W1Q2fsdzcc= Received: by mx.zoho.eu with SMTPS id 17735276685704.185396304987648; Sat, 14 Mar 2026 23:34:28 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 04/17] lib/bootconfig: add blank line before xbc_get_info() kerneldoc Date: Sat, 14 Mar 2026 22:34:12 +0000 Message-Id: <20260314223425.142966-5-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" Signed-off-by: Josh Law --- lib/bootconfig.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 35091617bca5..e955d2f7e7ca 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -79,6 +79,7 @@ static inline void xbc_free_mem(void *addr, size_t size, = bool early) free(addr); } #endif + /** * xbc_get_info() - Get the information of loaded boot config * @node_size: A pointer to store the number of nodes. --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o55.zoho.eu (sender-of-o55.zoho.eu [136.143.169.55]) (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 4614538D000; Sat, 14 Mar 2026 22:34:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527684; cv=pass; b=ISoHt9illw/zBTVFRt8jkqNZ9NrmXUP8Qn3OcFY/uU74gu01Cj7C96Z4ISjepD7VRzuUbXrMbv4NVgdQOobDP23cBxj1ffMQlIicH/tfGku9CjZ2hWP4ecdfaUrfqeKSg0K0OM0AMphLWA6gGnTubflQLu0Grddrc9vMhqyIuZ4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527684; c=relaxed/simple; bh=Ca2yOMLol0eXm8Z93sdZF0uzxBHDnoJJ5YjTb0UjCSg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jQwc0GNJzCGybA/NhzNUyfZ3Ndet57aLPLCokTYBF63zx0679ZijJaFxNUPz5eFIeSKo05QU4SVzzIl8psMcd74VsHFuLlfJKsQngyHfY91NazjAsllO+9KrzugJtoawniU+SR0PVa13wRa4OhUrWjjzHaP/tZXpd/E+f8XdgPM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=oMt7u4ci; arc=pass smtp.client-ip=136.143.169.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="oMt7u4ci" ARC-Seal: i=1; a=rsa-sha256; t=1773527670; cv=none; d=zohomail.eu; s=zohoarc; b=MUAqpTDbscu86PZTsoA/2VCNBNiQLgybBahUa7455L8augcaHgwh2iurZZ1rxj3pX3oY6sQZ6Dtrj5NwoKUe2UCVEa++JQ5kBFuKXm9OGEzVpVAM7MWlD6Pn0cVdKyq/GjDIM0Nvul8U12BfL/xIrkcsOlrP6LtYTABLhSNXUc0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527670; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=M861Pari/lV9kRCqOVfEViiGvsDrnuYG9MG+0z+YaXE=; b=grJP2wUyC+Li5ZVOI0NdzWbQZptoQ6ROfqKc3QLLCWyWo3Gb0ik7NRd5/BDGrAjmUSouqs2ycDqlN2EYTVpqD/gvmETiAHjqDnsCoggpIa+g8gOCd5FmJ+WdfRRmwlHBhHnKbmNhNmJB4/CosRHZzAP9QC8qmvG82FSjrZdJtDY= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527670; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=M861Pari/lV9kRCqOVfEViiGvsDrnuYG9MG+0z+YaXE=; b=oMt7u4ciJBtgDZWcyk2dy1JttJeJoQ6KnCj4/z6WzuwsIm+iwVqouxg20lQnzD8D r8LvrUz/b3gcGgSjKcHOGUVO+9MAbNgzuvH5HOy26q4TWQyKo9qdcoFlxqGSoNyBZIe GXvSZ+ofyHtHzVnoKndj5MCKaKtU/TYM8J1WEcrI= Received: by mx.zoho.eu with SMTPS id 1773527669077741.3149385166; Sat, 14 Mar 2026 23:34:29 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 05/17] lib/bootconfig: fix inconsistent if/else bracing Date: Sat, 14 Mar 2026 22:34:13 +0000 Message-Id: <20260314223425.142966-6-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" When one branch of a conditional uses braces, both branches should use them per kernel coding style. Signed-off-by: Josh Law --- lib/bootconfig.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index e955d2f7e7ca..45db51bc9cc7 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -473,8 +473,9 @@ static struct xbc_node * __init __xbc_add_sibling(char = *data, uint32_t flag, boo sib->next =3D xbc_node_index(node); } } - } else + } else { xbc_parse_error("Too many nodes", data); + } =20 return node; } @@ -992,8 +993,9 @@ int __init xbc_init(const char *data, size_t size, cons= t char **emsg, int *epos) if (emsg) *emsg =3D xbc_err_msg; _xbc_exit(true); - } else + } else { ret =3D xbc_node_num; + } =20 return ret; } --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o58.zoho.eu (sender-of-o58.zoho.eu [136.143.169.58]) (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 9B97634EEE8; Sat, 14 Mar 2026 22:34:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527679; cv=pass; b=sV1GA+bk/4ScQawnixG9uSzJoxBvSjg00A9xGWSwCQdCgdyXuS6pHZj2yrNZQfHwmYp1BZHzHnmgvPKt/iUgNqyEx2K+3HaNafJ0ugpuRw2RrbsVkIaJ/fZT7sd/8CTXDweBiHiNXN2aYDs9tqWgPQIRAyy5nBYTlC4YYMnop/w= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527679; c=relaxed/simple; bh=DRP0bkR7bPm24iP6Lzhg3tEJBN+s2+Bet778OjDqUXs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OvQ4dzebP+IbqtSaatGU4P1df9c+i7f6P4dXoMeQJCGVzEzOdaKuoQp2vJlDS6zJauCI7waMJp5eXf61DzD7vPoSc+jTJJsvjrY/ZODXrIPFdr5JMSYKscCFHt2436q8T1eXSBMGDPWIoxn2T4hYjv/neoqnt9qxvmkwed3q4Lc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=kMj8tugm; arc=pass smtp.client-ip=136.143.169.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="kMj8tugm" ARC-Seal: i=1; a=rsa-sha256; t=1773527671; cv=none; d=zohomail.eu; s=zohoarc; b=NCsLjLBg0hgY6ifhrDP8uEf4GdfvXtDJ3HYf/YZm4LwQM6QEdxghHFi6EcIEAx8ivA1WIlDN+Qr3+6lm17t4wRcWKxBUmvrPrQd5U7a+hTjIAtmPkVEKoggvocvoROWy4UIzuTFtLapXMGOdPV1z54o+ZxaVQj8aLxy0CC6aBBE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527671; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=Xeupn9cKPxiPKbISrjkPHMR3deW24vI0PqVo9Jq/DYc=; b=bEtK2atRFm7lsVKtoieWUeiV0cPuau7LMW9VK6kabT8fGX7YfD8hrQP+uQUUJdlTb4X9VOPAbHUjYStCyQmFSrlWAEQk4QtTLu1UkVuxiCrr15Dbw2ZkaiXooz1r7ngVc8+LIgR/Wvc75Yy9ZMTD/D+5X49GSyWcf9xmvZSJtU8= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527671; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=Xeupn9cKPxiPKbISrjkPHMR3deW24vI0PqVo9Jq/DYc=; b=kMj8tugmM6l/8tSWVm91PibpAAbmOOOqhAoIx6vTAXNEIqLOLzn8oT4gDv5gDQPB sRuZtxv/gufUBJGVWmnQAp4byvBy/5Ddg5Yckq3MU/ynn6d1VH1z6F6dSjo+STT5/QX jw/nqNqfacuFNVpuhWmUwYQdhHiBfZUNdaPZyClY= Received: by mx.zoho.eu with SMTPS id 1773527669625496.51547251848376; Sat, 14 Mar 2026 23:34:29 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 06/17] lib/bootconfig: narrow flag parameter type from uint32_t to uint16_t Date: Sat, 14 Mar 2026 22:34:14 +0000 Message-Id: <20260314223425.142966-7-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" The flag parameter in the node creation helpers only ever carries XBC_KEY (0) or XBC_VALUE (0x8000), both of which fit in uint16_t. Using uint16_t matches the width of xbc_node.data where the flag is ultimately stored. Signed-off-by: Josh Law --- lib/bootconfig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 45db51bc9cc7..34bdc2d13881 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -408,7 +408,7 @@ const char * __init xbc_node_find_next_key_value(struct= xbc_node *root, =20 /* XBC parse and tree build */ =20 -static int __init xbc_init_node(struct xbc_node *node, char *data, uint32_= t flag) +static int __init xbc_init_node(struct xbc_node *node, char *data, uint16_= t flag) { unsigned long offset =3D data - xbc_data; =20 @@ -422,7 +422,7 @@ static int __init xbc_init_node(struct xbc_node *node, = char *data, uint32_t flag return 0; } =20 -static struct xbc_node * __init xbc_add_node(char *data, uint32_t flag) +static struct xbc_node * __init xbc_add_node(char *data, uint16_t flag) { struct xbc_node *node; =20 @@ -452,7 +452,7 @@ static inline __init struct xbc_node *xbc_last_child(st= ruct xbc_node *node) return node; } =20 -static struct xbc_node * __init __xbc_add_sibling(char *data, uint32_t fla= g, bool head) +static struct xbc_node * __init __xbc_add_sibling(char *data, uint16_t fla= g, bool head) { struct xbc_node *sib, *node =3D xbc_add_node(data, flag); =20 @@ -480,17 +480,17 @@ static struct xbc_node * __init __xbc_add_sibling(cha= r *data, uint32_t flag, boo return node; } =20 -static inline struct xbc_node * __init xbc_add_sibling(char *data, uint32_= t flag) +static inline struct xbc_node * __init xbc_add_sibling(char *data, uint16_= t flag) { return __xbc_add_sibling(data, flag, false); } =20 -static inline struct xbc_node * __init xbc_add_head_sibling(char *data, ui= nt32_t flag) +static inline struct xbc_node * __init xbc_add_head_sibling(char *data, ui= nt16_t flag) { return __xbc_add_sibling(data, flag, true); } =20 -static inline __init struct xbc_node *xbc_add_child(char *data, uint32_t f= lag) +static inline __init struct xbc_node *xbc_add_child(char *data, uint16_t f= lag) { struct xbc_node *node =3D xbc_add_sibling(data, flag); =20 --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o59.zoho.eu (sender-of-o59.zoho.eu [136.143.169.59]) (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 4CE0138837C; Sat, 14 Mar 2026 22:34:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527681; cv=pass; b=feWKztPDJqLhx4q61C6E+wq2n+dNVHiagExMiz6qipgAfIFL5SkVif3Lyf6t3usikRzYrlFyg/z4BKkX87MM+JvCUdedAajkHdQSud1JA2WHoCpbC5B4pA/uZabyYXvxu3Rr6qxIPDlCvv83bENDRoO3/t7l3OLtLqa1GhhjKNk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527681; c=relaxed/simple; bh=MjX+L5BkroUgaRrcSwrGDKK9It5hNznJ9Ds+whNCQGc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GIzwg9opZVATAkd4D/4OkfHkPGfAiEZseMGSRUJamAX5rQSFqlkv5PawBEiIsQjxSYMRsm4ft55h63Cm4/My8DmnFqHA/y7frLVATRwLMdJkmnGmlz4qGbJaTfuLNctI5zNbfgL+aGT7TL+kEN+sJSVRxODCehAWkE/2NPJ3bQM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=kB3EJ9k/; arc=pass smtp.client-ip=136.143.169.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="kB3EJ9k/" ARC-Seal: i=1; a=rsa-sha256; t=1773527672; cv=none; d=zohomail.eu; s=zohoarc; b=D2CZOAHgdbNhzWdxaJmYuXWJ89p1NXl9gAZyKPbO/bClG3nNfQPXj3reNULQfd4teuGiKFl11RnU+Usvaslu/KyURMWis9ccOrmK/LtOzKbLLbjVsvvG+LUyastRvJfqEVTz6pYbl59z8PJuu+QCEGk7G2LYNivRh6fVnVyDfSA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527672; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=6vqu+catdL+p5SuHEICmEvrCdVO4BKlL3X6/JARWFjI=; b=cinVIvmg8Gx+6i8Kic3BmJHrK9NRr0aAAT4CTl37n/KtLKC0L6G/5+kWB1sVoUxhd45x6+6GTXix66+tOHu/ZF9aKP9lvKtDvHa7nDTrdpaaueZ9aVj1jID70gDWsfdBCJG5yfxhz6nFXPHKZuwO2tv+vgBhWM7Pzqs2QQ1kYA8= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527672; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=6vqu+catdL+p5SuHEICmEvrCdVO4BKlL3X6/JARWFjI=; b=kB3EJ9k//29P4FQrdR69zm8/+0K2EnndPrAnKipun66Kw9IUmz6izGxatihlcQYw thrfSJ1cmkaQpNJc0rI0rgrXYdvcuuo2csgkxpomKyltwN7nm2XgmpV3Yn+6B1JM3/V iM9HAzqXF8A5AgzQR1FBzCSOA/zS0nCaufUocM78= Received: by mx.zoho.eu with SMTPS id 177352767023938.11398809248021; Sat, 14 Mar 2026 23:34:30 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 07/17] lib/bootconfig: fix inconsistent if/else bracing in __xbc_add_key() Date: Sat, 14 Mar 2026 22:34:15 +0000 Message-Id: <20260314223425.142966-8-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" Signed-off-by: Josh Law --- lib/bootconfig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 34bdc2d13881..58d6ae297280 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -657,9 +657,9 @@ static int __init __xbc_add_key(char *k) if (unlikely(xbc_node_num =3D=3D 0)) goto add_node; =20 - if (!last_parent) /* the first level */ + if (!last_parent) { /* the first level */ node =3D find_match_node(xbc_nodes, k); - else { + } else { child =3D xbc_node_get_child(last_parent); /* Since the value node is the first child, skip it. */ if (child && xbc_node_is_value(child)) @@ -667,9 +667,9 @@ static int __init __xbc_add_key(char *k) node =3D find_match_node(child, k); } =20 - if (node) + if (node) { last_parent =3D node; - else { + } else { add_node: node =3D xbc_add_child(k, XBC_KEY); if (!node) --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o53.zoho.eu (sender-of-o53.zoho.eu [136.143.169.53]) (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 E5CCC3890E7; Sat, 14 Mar 2026 22:34:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527681; cv=pass; b=pej4vfg9kd1hNFLjmgLn/czrtSlq5t1saqjEpvFipAzrI7/Jc903pIpFelfrxsJdogs4FIt9jho3Es+40wtv/m5wqoX+9+BMujtka7EgwwNgq5mlbvHx9Xky21GCgl6Xhq6K32FbjiPE3gI1gCO+Ny4hspPBDP48nwZD//7VRp4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527681; c=relaxed/simple; bh=kDcgT5gXzTP1fqOGMdxALgedri0gVcD3is/FfzavjKc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KJcTLHJQa6xVdT5VRfnQCluNtkwnNp4sHlYsZKutLzYYI+Z6LROlMzA1g6XBDVxRWgH2j0IQSLUnhPOpKupooN1Cu0xYpfl5g9A6AL+/TJIPr89CWmQIWoBThO9Nfxd1qiakeTLrX9PIcqK7l6YvTaCfx+r27/yeWqPXdRRpiTA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=hlUQX9Cf; arc=pass smtp.client-ip=136.143.169.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="hlUQX9Cf" ARC-Seal: i=1; a=rsa-sha256; t=1773527672; cv=none; d=zohomail.eu; s=zohoarc; b=GxdHUyYn+CwQ/6Y3A2/j7ELjdDSCq5R9gKCV2EU+afdiIAF/SXbb1xcAcNpktA6VHtMkO7Ebn5vpQU+mZlXOTKzfZAlDqjuFBZ7X8aJDK4hAlQ7UwwoEewsPGg/FVZcQuPhAPF+RSci5mcTlhKRRfBym1iBUBQd4ryRenwMa47U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527672; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=7bmeZKaQTYKiPdWWEUmU4EJNbpBFQlYVqCIGyMl5PZg=; b=IGmtg9jox5eIDRPtO4+dOHrpkjMB5Hz4FiHmrv3EtZRN77ErOFh5nIfUErdQgEKTSGkQ68GBKS6v8iPNVSJXXOQBhxB/oiwQsLlT13QfYYCSgkmkSQ2Hk4vLGeSoAHE18l9rqC36m7IzeET8vDWWLAnBhApqyvkuZCpENN9w2Iw= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527672; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=7bmeZKaQTYKiPdWWEUmU4EJNbpBFQlYVqCIGyMl5PZg=; b=hlUQX9CfPnFFh0ZiKtcC7qdC2K3S6m77zmFsUdIX1fuw36ueY3OZ2UWocUI72H+t sZtTVltO9stGeRMUu6Uzv9hKyKwj0v2uKWZl/wrkEv9EEV5s6kmQuampZjv7YV9CG8U 2P1TkqWycnplocqg0BodFNWAvzRVhcEyYjGG+L34= Received: by mx.zoho.eu with SMTPS id 1773527670807699.9089571616523; Sat, 14 Mar 2026 23:34:30 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 08/17] lib/bootconfig: fix off-by-one in xbc_verify_tree() next node check Date: Sat, 14 Mar 2026 22:34:16 +0000 Message-Id: <20260314223425.142966-9-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" Valid node indices are 0 to xbc_node_num-1, so a next value equal to xbc_node_num is out of bounds. Use >=3D instead of > to catch this. Signed-off-by: Josh Law --- lib/bootconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 58d6ae297280..56fbedc9e725 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -816,7 +816,7 @@ static int __init xbc_verify_tree(void) } =20 for (i =3D 0; i < xbc_node_num; i++) { - if (xbc_nodes[i].next > xbc_node_num) { + if (xbc_nodes[i].next >=3D xbc_node_num) { return xbc_parse_error("No closing brace", xbc_node_get_data(xbc_nodes + i)); } --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o58.zoho.eu (sender-of-o58.zoho.eu [136.143.169.58]) (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 BAEEB38D010; Sat, 14 Mar 2026 22:34:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527684; cv=pass; b=u7o/kTtf9Fdzi5xbt+v36v7EKBQD/Xg2H6xUBbuJTrrHMK6UbvhoXA/dtBeTAOdrexQnZUcLtReTD3B0cxKw9gY5vrouNroLHgqmk40iMFMefdzCIeLn1dIIkxoWjfFdQ/qhzeQL2kZ4WweR38Oh5WSIPBnZUgqRZgVJYmH/3ug= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527684; c=relaxed/simple; bh=5AnzfG0vkdEgFClTKvrYV4qYqkz7cUXrau3pFlOkbfI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XPzqdct5tmDoKIAqvOBFPADcTGOttNDEBZ1tC8EEBWGftJnVPa7JyMMsefrpXTHUTsnF8Ip104ONpVDrev33NeDde+jhESTZGUCfxtuoPdZiYO2veTy9wynEbzyWMjk2ZJus2d7YyJt+ss8QiBhjt4xdU6Fkjw5EXxqxIQieyB0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=F0l+4khf; arc=pass smtp.client-ip=136.143.169.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="F0l+4khf" ARC-Seal: i=1; a=rsa-sha256; t=1773527674; cv=none; d=zohomail.eu; s=zohoarc; b=QbsTvfk9JUmaLbPP9SLIbEYtswqROzqn6Iu1k/OUeRo04audVrxU9LxZ7hWGP7opa1pbf1gkOR9UW2ib7saJQKtac/FRDoTFDs0l0ExpYBpUAKMa13ZVjd7vRZuXXQrNFERLkkYC/76THyREvKRPo1wvHo9sGsO+QJLYpg1l5Bc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527674; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZkP6e7kBnlhV26QlBiganTloqfVRgfHEXYKYC2UlxIQ=; b=MvYqgV2J/svBDBe3pAETeAvrl7pSH+0AJNb++ab9If88Tvj/6EEvWDFbnwQGtD34I5O+/Cma0y/1wnkDMjhdrm1x/tHLymO5epch2xi9JjmxE7D7SaDMnklQDpsJpvrIUo35O9J4Rzl//aTAYM0inaolX+QCXb5j5lAd4f8ytF8= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527674; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=ZkP6e7kBnlhV26QlBiganTloqfVRgfHEXYKYC2UlxIQ=; b=F0l+4khflTpwgaWvLLCOCBiAllhK2dbGB5XD9pUGxv3cT4i8dXoctgwIrk5SIH1D xtfKUAXBcnSGkFpaJc3EN+064TagBvrda5z9wYoQxqTHxS5tJsCaZ5wDImsAuVfmHgZ u+yezBWEBeYYNuUborXvB1JHErIn99UwzPGiT/Fg= Received: by mx.zoho.eu with SMTPS id 1773527671326675.9968998598603; Sat, 14 Mar 2026 23:34:31 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 09/17] lib/bootconfig: increment xbc_node_num after node init succeeds Date: Sat, 14 Mar 2026 22:34:17 +0000 Message-Id: <20260314223425.142966-10-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" Move the xbc_node_num increment to after xbc_init_node() so a failed init does not leave a partially initialized node counted in the array. Signed-off-by: Josh Law --- lib/bootconfig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 56fbedc9e725..06e8a79ab472 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -429,9 +429,10 @@ static struct xbc_node * __init xbc_add_node(char *dat= a, uint16_t flag) if (xbc_node_num =3D=3D XBC_NODE_MAX) return NULL; =20 - node =3D &xbc_nodes[xbc_node_num++]; + node =3D &xbc_nodes[xbc_node_num]; if (xbc_init_node(node, data, flag) < 0) return NULL; + xbc_node_num++; =20 return node; } --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o59.zoho.eu (sender-of-o59.zoho.eu [136.143.169.59]) (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 3868A38C2D2; Sat, 14 Mar 2026 22:34:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527682; cv=pass; b=FT5sBLJeDKOGQnm1+zWO3uBqnif1u8uDYYPwVwc5zsA0rmsTrZoB4UuAO23yi3fWuDFoK/Gg5pG6YhvP35t24bqfp5de1raTYdHBWrMULhtNeoud/nzOwtFiRg5AqOuqdNp/5iRWqImiAR36jHaMJeYgGRzRPftyxzg++XrKW5U= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527682; c=relaxed/simple; bh=EWCRpZBNHCZU8iztguL/vt47WImiwDpV31hec4mL7Lw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CQ8ZIQy5uqEzxVfBKeAifo3ewy4dZYVp0IwIgLO5LloMOhAQlp1RgWMcbNPY43/oX1vPs/HKwedfiy/lfI5hdtHQ5bGYu2ptREuuDUMWcLcMtgsv/6J23kxGO+Bv4Hux2gmpnaVre9o723o+2TfdOYxf2Cd/gl/UBeIL6fuPdwk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=dTuzt+f1; arc=pass smtp.client-ip=136.143.169.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="dTuzt+f1" ARC-Seal: i=1; a=rsa-sha256; t=1773527673; cv=none; d=zohomail.eu; s=zohoarc; b=KvtHFjb7gnEwrCuo4KC/aV4jjeFgGdSuNHF80LKoFxoUiqr2zre40NIG2yoMOmfpWqDOHKu1cx2ajSIS9dvHGYntxMg7I5NM4B1IbGu/B33Z8vNKTZJAdwdVCjng+lcrAKvC65JnAScersMtl+GpfBxQARlk3Dx6b1mcaM9dFEM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527673; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=Y3g/gWcuZygcqvX4QpGo9gnBChjnwRu7NCitJ/yvsXM=; b=WLyvAdaNsQwRt+mkwPGTo5Jhr8R73poZRYJP3Kkn0ccOxHNQ3ZhdOnQIpuZItpyZxNazPnjv8tKJ1cLVpWbpj0tB5QWT7iJPGkzagi14R2rpjGvRO+NCGsEvtFHwze3D5+LgMGYTre9MwXL8npslSfBHwhH8XwSkXjWi5u2aqQM= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527673; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=Y3g/gWcuZygcqvX4QpGo9gnBChjnwRu7NCitJ/yvsXM=; b=dTuzt+f1UQOXUdTKRtr4Ox+8yZG7PDeKfHTNyIO7ydL4v6w0cLeF6msJG5UTdIO7 hhwavKBC6QZw8269pxfZGv8NXu5zPVyfiJyu22RHQ7adVVdNVQROUezwi0MW9vZODR8 WKOW6Im5D9eZALMnj2/0qgf438TK9Y8r47Kb3ki4= Received: by mx.zoho.eu with SMTPS id 1773527671841275.953282250141; Sat, 14 Mar 2026 23:34:31 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 10/17] lib/bootconfig: drop redundant memset of xbc_nodes Date: Sat, 14 Mar 2026 22:34:18 +0000 Message-Id: <20260314223425.142966-11-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" memblock_alloc() already returns zeroed memory, so the explicit memset in xbc_init() is redundant. Switch the userspace xbc_alloc_mem() from malloc() to calloc() so both paths return zeroed memory, and remove the separate memset call. Signed-off-by: Josh Law --- lib/bootconfig.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 06e8a79ab472..fe1053043752 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -71,7 +71,7 @@ static inline void __init xbc_free_mem(void *addr, size_t= size, bool early) =20 static inline void *xbc_alloc_mem(size_t size) { - return malloc(size); + return calloc(1, size); } =20 static inline void xbc_free_mem(void *addr, size_t size, bool early) @@ -982,7 +982,6 @@ int __init xbc_init(const char *data, size_t size, cons= t char **emsg, int *epos) _xbc_exit(true); return -ENOMEM; } - memset(xbc_nodes, 0, sizeof(struct xbc_node) * XBC_NODE_MAX); =20 ret =3D xbc_parse_tree(); if (!ret) --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o59.zoho.eu (sender-of-o59.zoho.eu [136.143.169.59]) (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 CA6B038CFE6; Sat, 14 Mar 2026 22:34:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527683; cv=pass; b=GDRDoa9AlJlf6OQqzeRiaRLis8Ecjk7a+lZfY0wCRQz3DA7SUsvFHncehRsRXJPVx1TieFa4hfkEDCuW6kLEqrb2uWfGodtpeYSFu7BsHz0Oz4314kUYwTB2Q+zmVHT0t899RDQ4OjCqc43Kak82ZUdQXHTw2l0V6nTYO+RjfWk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527683; c=relaxed/simple; bh=FXNMbqg55SqbPOuJegAqlqm+AJvfK6co4zCLBLrw5Q0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tXIs1G2CEwUAktFdjclrT2VNzXLJ94ptlcqQrppYYTEXoSRan81X2BUQ7mnnCgdJLi4tD0hzpiwvN6uBNMSuOzDUZsNp1kVIq+PUi4XIpbR69VcfCx/dGMf4ns+IxD91pwscfvVwhe2lMSPFcmq8GJz3X+b6sSrVPcvILcUgQzo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=U1+gEK5Z; arc=pass smtp.client-ip=136.143.169.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="U1+gEK5Z" ARC-Seal: i=1; a=rsa-sha256; t=1773527674; cv=none; d=zohomail.eu; s=zohoarc; b=GUcPE8gG07jxUGUxxPZq1G/GsNA1BOOBJkUj9TqEYK57KJsj/Cyrc5hYiUbnStdEMI7kurHDx/YaFDaDqKOA9YExtfDvjqfFnKlJo69pcA1ZF0yGBQt+zNcBU9pieqs79L5mMj3slAnSkaPgzJWbaLoUUaxZqOuvA9HIhzpEEXk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527674; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=WR9vliQJfdjZlPD0h9WaXzdDRa+2M90wAFjtK+1BE/I=; b=QUaX1c2cMccCGziPpYwvSM3jrkj8JdJmbOAdBlnKrnd7H/KplR9ByQJQzi42JwHic+8FV7v8HMq14V48T/c9TJC2exwMdxssGf0/FiO5eEC8ATMUsWQ8CDAqCW2qFRZhnuGrad4I5AKE0yKvWLEsQi4QJnreiqTGYDRY/iCJumM= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527674; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=WR9vliQJfdjZlPD0h9WaXzdDRa+2M90wAFjtK+1BE/I=; b=U1+gEK5ZmaCr7wZi5Br9NRyDmAxN23f6HUTJ1Jw7seUUHR+4HXjWVC7R5729GgEt Rx2h0VeyxDUAN6rpC7BHES7HEJKEzShdG6LR0uxNcYEAon0tJPLDbJMknjcMMgJq8c1 l0PzM0MNgZ+WdafHtWNwbyfMyYLnGk7qDD3hUKpY= Received: by mx.zoho.eu with SMTPS id 1773527672398159.3961345633245; Sat, 14 Mar 2026 23:34:32 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 11/17] bootconfig: use __packed macro for struct xbc_node Date: Sat, 14 Mar 2026 22:34:19 +0000 Message-Id: <20260314223425.142966-12-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" Replace the open-coded __attribute__((__packed__)) with the kernel __packed macro for consistency with the rest of the kernel. Signed-off-by: Josh Law --- include/linux/bootconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h index 25df9260d206..c37e0096c4f1 100644 --- a/include/linux/bootconfig.h +++ b/include/linux/bootconfig.h @@ -53,7 +53,7 @@ struct xbc_node { uint16_t child; uint16_t parent; uint16_t data; -} __attribute__ ((__packed__)); +} __packed; =20 #define XBC_KEY 0 #define XBC_VALUE (1 << 15) --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o59.zoho.eu (sender-of-o59.zoho.eu [136.143.169.59]) (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 2A06138C2CB; Sat, 14 Mar 2026 22:34:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527682; cv=pass; b=ZvvJnnCgWbLJnphHa1UVG7BmTYqoU+eQcjkMyTfUJNEOPvu9+cOZ4rLJ1TPqaukHUMKFjxM740G5PVbq6kSNSivm4Ei8x4yB0TC34S+eGdHoWxnoTn6ttoBhzGQ5sXjVLNhA0cw+OQMVk/kGy37jGmsNF7sDEF2fbAnA/iPKcfI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527682; c=relaxed/simple; bh=g0gLOzGvGgBaDelQ1nQAH+bFpUg7Z1FFbkCEaYNyQHI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=B2Y/muagMu8qrC5AYpGpxlWZGNl1B03V0VM2DLxm7UkIHxJ007x2Wm9rbxOBP3DUqO+pKAGc0ER6mZO1EYI/SEdHgu7InVF1A6wAwVJI7GTPfflG07bOAJa5Ztf6HCiTbk64D6zpSabZwe5tEjKbFCUYyeD5mWu/ZElHk5Xmxk4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=PsPLy1ay; arc=pass smtp.client-ip=136.143.169.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="PsPLy1ay" ARC-Seal: i=1; a=rsa-sha256; t=1773527674; cv=none; d=zohomail.eu; s=zohoarc; b=HGVn34mySdNeBKaoQVyiwU2aftE6z0iZQPhKUGvLbzxfM9nylB1+pzNEwao5WryiKiYput42jZvgxP6nYGNkhqFLdOqpZZWyZkIIpk/ZkUH5+2b1QtyyRdntkBX6y9QUTtmvM89wVA9dNGs94AzyQRhJ+CRcRvS0RWFgtT/suGk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527674; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=/qCjNtdUtGuqj2pRl8MUrYP2ntfBCQat1rATubD3gRk=; b=DVOTapKHUAr2/IlsS1gdgPHhX6c+wLBvgQBIMBYimVKSx4vMgbujHNf68xdfHboGi3kYuKVgEpQQ+s/oCUxZ4IIZcOiAt49jhv731wApmq0ou151T3hX1H1SNcvc3i12mDTg11NjoZIfDL32JyoM962Jrrl0aW3r7AVng4YKDXg= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527674; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=/qCjNtdUtGuqj2pRl8MUrYP2ntfBCQat1rATubD3gRk=; b=PsPLy1ayPpEbeQdzQVaKPReUkcVVN052YiXYoOnlBazaLmG8nxQ+5Dvi67vS6IiX NRgJ92OzSCpX40BBuzsJIssAwQL9FplMp6UuEcUHTAIp9tcXBeOu+g/jEDcbNfZ3b/X ItdRJLsbrs/I4MbdlnBuJ1+u/5BjXyTF+BSJH/MU= Received: by mx.zoho.eu with SMTPS id 1773527672913396.42157960141435; Sat, 14 Mar 2026 23:34:32 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 12/17] bootconfig: constify xbc_calc_checksum() data parameter Date: Sat, 14 Mar 2026 22:34:20 +0000 Message-Id: <20260314223425.142966-13-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" xbc_calc_checksum() only reads the data buffer, so mark the parameter as const void * and the internal pointer as const unsigned char *. Signed-off-by: Josh Law --- include/linux/bootconfig.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h index c37e0096c4f1..d78c2b62debf 100644 --- a/include/linux/bootconfig.h +++ b/include/linux/bootconfig.h @@ -36,9 +36,9 @@ bool __init cmdline_has_extra_options(void); * The checksum will be used with the BOOTCONFIG_MAGIC and the size for * embedding the bootconfig in the initrd image. */ -static inline __init uint32_t xbc_calc_checksum(void *data, uint32_t size) +static inline __init uint32_t xbc_calc_checksum(const void *data, uint32_t= size) { - unsigned char *p =3D data; + const unsigned char *p =3D data; uint32_t ret =3D 0; =20 while (size--) --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o58.zoho.eu (sender-of-o58.zoho.eu [136.143.169.58]) (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 D2701386435; Sat, 14 Mar 2026 22:34:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527683; cv=pass; b=iYemA3KomXy7ohmFqo+GS/jcrpiUrCykR+Bj18xe8derc1ePGbay9xBkp9uR3MJ/IDpPwuY/eRnmKAD5lg1vPkG81vV2D6vmR2xbNMfTEwz7kCw54DjMMUG7EEjN7N9P6wpzc/PIdbuLgwylQoKo2jCDuMG+u498+6ZJNZU+ng0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527683; c=relaxed/simple; bh=5jHlNQbA4ax5oxWy6TmNNrMnctsyCd5kWbRwYKqDhJE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KHY4bssp6COq2vvs6Y4LSUheTIARRRRfEPXRiK5pfukxK/pp/MTjupQFQeBCb4glzVDlN68WUoA23D8hbWkGmUE/IY49FNYIvdzWGesjOev0rOaf5NGVWEmsSrgLQMu87WOdwVg7BDN6zFyHilNtr25omUCj2O50d1FPIGGUv4o= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=S0M0P7Cm; arc=pass smtp.client-ip=136.143.169.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="S0M0P7Cm" ARC-Seal: i=1; a=rsa-sha256; t=1773527675; cv=none; d=zohomail.eu; s=zohoarc; b=PYgQqtNjYshu9yYu9gcKCtGBdv+zrpS5MjUFidazoT6/JNRiPAZ9DNskm0pICbxOWF124SoZWiPRX00tmGm9D2ewQPs0dJIIwN1glVP+6oSecxSxp010aUJ5J4YRJwEAi7cuqVkdWfxbYt+lr/sI1AP3o2rSeqXW1m/jZxTHMWs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527675; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=RAInAapaPEVVIMyMy0xQq48ym4WbDouBno9PBv2kGos=; b=Ut4z5HLpLK1WAPLMI8EdKwi6yJYwiVZqJDFRWETOACvDCd9qjBzZOy0fTs6/4pjlUrPUJADWljO0ddms/8LlXwbdMMafxrBfG/XIueqNXke5a2b9BEgDDygQsTIp2BLoQ6pateuehALai6+MYC2bnaR7ZFAxqNQtiUIarSduFlw= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527675; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=RAInAapaPEVVIMyMy0xQq48ym4WbDouBno9PBv2kGos=; b=S0M0P7Cm8FCVGF9PVCo0zM7po8ZbEQl4iKZ8LI1yt9yPdEQ/g4wgZAVQwzuu2LN/ ETtF/8JFwnt/dhHva+YZexJwHBs7cL2P/eO8Aihw7An0mnZM38Mb8qKTRt+3aO6Tx/s vUE8Q0p3jB6ZoSyYnkhdZ+Up58MamMK/pxuS2lp8= Received: by mx.zoho.eu with SMTPS id 177352767343368.48492945401745; Sat, 14 Mar 2026 23:34:33 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 13/17] lib/bootconfig: replace linux/kernel.h with specific includes Date: Sat, 14 Mar 2026 22:34:21 +0000 Message-Id: <20260314223425.142966-14-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" linux/kernel.h is a legacy catch-all header. Replace it with the specific headers actually needed: linux/cache.h for SMP_CACHE_BYTES, linux/compiler.h for unlikely(), and linux/sprintf.h for snprintf(). Signed-off-by: Josh Law --- lib/bootconfig.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index fe1053043752..0823491221f4 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -17,7 +17,9 @@ #include #include #include -#include +#include +#include +#include #include #include =20 --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o58.zoho.eu (sender-of-o58.zoho.eu [136.143.169.58]) (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 EE0C138F641; Sat, 14 Mar 2026 22:34:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527685; cv=pass; b=qZTqatSKWjbWcQ8+5sGhSPjGKy/zdDikpytjbyt/omi/Msocn1HqMLHstekHiofoZBDoR4Y9CP5bhLrejVII4tTiRajF37HGsLfyJdjn+mO3/nXo6zA4cz4VxjiEkB6S45rvS81OVTo4Vsbr+OCYDou96XkjE/T0F+BA1xyvDUE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527685; c=relaxed/simple; bh=6I0hpTbxvzM0MrqqhLwejv2QuzQNDU3b1q7ISIjV9Vw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aLkPmON/Voo4P+lJo2jC+qgN9tHOskicfYXv7tWUOWZ9A/XKv5EefrUyMKS6FY458ZgGuBib15GWAitUrApz5iXB+6P5Wmdngf9a+mgmTyo81QsgoymgTmOLmx2SlHz16S3saKVIlzyWcyWwoKTao0w+EZRtHZXmhnTPnbQRaio= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=S+6Xx2gg; arc=pass smtp.client-ip=136.143.169.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="S+6Xx2gg" ARC-Seal: i=1; a=rsa-sha256; t=1773527676; cv=none; d=zohomail.eu; s=zohoarc; b=Q9cxx5Z1q1JrI8Lne992emwju4tuyoACr8J+vaVkn2pquowaong6NfwDMMu07vfq1v0KbjUNqBBKoZObXMIG2q8bqxJGSscQcL2MSG5CP8BK3WMFMhAI3/JVrMu8WKHph2/eHEMfLfxIrMzWU33JTLkW5OfY+8Jv4xpaqjGF+aY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527676; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=1AD6D9MidV6Fkfxyg/iT9A9sDWNhqE7cnbV+HIFl0WI=; b=kbAbIe8q+oL5vQnIyc8BCaJGtVKgOTG8UmFAkStl+iBE7dMerHWE5VIsKgbqQJqsiOw6tKPNUwvbh2eV+BoMNbcVVRwaq5SNU5egJWlMbZilI4vFA4Uut5bbNBS5UHnPX+WVs0kdteOA8fFKhkDDCvWM2m5wIP9izs9nYTqDLWs= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527676; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=1AD6D9MidV6Fkfxyg/iT9A9sDWNhqE7cnbV+HIFl0WI=; b=S+6Xx2ggomHXMMHgZcGBGddkod8q4kv6RYLBB5+DJTLn8zPLjW0TxGmqFNTtzoBv 0Knn99PJRzXTS4jpX9uuylO8NNQlMdXt7TBMu7gLdTTxyFgrPOWuJ1snvE1OJMpqtdJ MAoDGxJGNLoYE8torqfnFzA80wkp/ioJVetJZdBA= Received: by mx.zoho.eu with SMTPS id 1773527673949838.9845325686828; Sat, 14 Mar 2026 23:34:33 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 14/17] bootconfig: add __packed definition to tools/bootconfig shim header Date: Sat, 14 Mar 2026 22:34:22 +0000 Message-Id: <20260314223425.142966-15-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" The tools/bootconfig userspace build includes the main bootconfig.h via a shim header that defines kernel macros for userspace. Add the __packed macro so the struct xbc_node declaration works after the conversion from open-coded __attribute__((__packed__)). Signed-off-by: Josh Law --- tools/bootconfig/include/linux/bootconfig.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/bootconfig/include/linux/bootconfig.h b/tools/bootconfig= /include/linux/bootconfig.h index 6784296a0692..41c50ab95ba5 100644 --- a/tools/bootconfig/include/linux/bootconfig.h +++ b/tools/bootconfig/include/linux/bootconfig.h @@ -48,6 +48,7 @@ static inline char *strim(char *s) =20 #define __init #define __initdata +#define __packed __attribute__((__packed__)) =20 #include "../../../../include/linux/bootconfig.h" =20 --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o59.zoho.eu (sender-of-o59.zoho.eu [136.143.169.59]) (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 4F6043859C8; Sat, 14 Mar 2026 22:34:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527684; cv=pass; b=fomLFL2EWOhTSSXbu7Z7+3g0RHVS3hKTiJn6CKmXqAZrPYUVtS44/TdcGfYArlxbk2LVGB6o0uv7YOxrjkKFrPEH4zGyiqoW9yr0JhX+dFFzHomwPoh8VeHSoUDWs8XxtPM5ov2QaNAcVNxBxKfHq0bC4hcJUvMnMxwcyDuxfFs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527684; c=relaxed/simple; bh=EyQa2yiCR3sisK7A/Krl1IC09X8Q7RdNked45ipt3G0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=teDDiV2dtSL0TMTpHNdCwLfQ2I/JAsP3WTsKtPjrO9BlJTqie4du+9bW4/kKZNLQ9BxxPzwXc9R2+U/7VELHVwlTp5Q928mlqXfmS7DCimdKP1SZqL0dd0ujAyVrEEbrIU4B4a3rFlyp+2Y5qgLqfbSIy06XP/YwE+svrXxYDaE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=nhwuJKvi; arc=pass smtp.client-ip=136.143.169.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="nhwuJKvi" ARC-Seal: i=1; a=rsa-sha256; t=1773527676; cv=none; d=zohomail.eu; s=zohoarc; b=bydEujns4hDvrdxEs7PzqaGuhQVpqTmbfqVOdog8puCogiKGZ31j6y4Fw0EN97HkAocpBH6RBMSyxPABL6lDu6Wyj2o9exHrcLnR3jHklM8XqgfOSvYsZ5LOdmmka88GyZ7n08bCSSkq8d9uWRLH9FlKcZ8OaMGmUwt91f2lRRk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527676; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=Q+C7ggGoU4QHs0Fn4FuoB2kR86tEhBwFbzmCOlWlA0A=; b=M8A7OjmSgsE9EIbuzdj/AAFM5WYbT9gFfNF2pQhls2DQ7ETTWOzL55gNvwZgt0ufiU/auRlDheSKgmOhO7OYvFPym33xgEWsn9f7WDnkHE+bSG1RgMmkzT//f/9CKh3xH3c5EvxNc6NbGd2hMKRAItOSZTLlIUXReBTxsJraKGQ= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527676; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=Q+C7ggGoU4QHs0Fn4FuoB2kR86tEhBwFbzmCOlWlA0A=; b=nhwuJKviRtwMwkAqm782ObXqT3ITKEZzyDw5oWr07EApv/lwtCQeLPDhh4YaEToK bsUVIdJz36W7lmTrD7t2vWEzgv2edHLGeXuQhNF95jmO1+l8Gmkj/VqyBHKz+k70CuP Al7UTUJAsWNLlexZGiK9ZNcv/rO5iGQNf1MSxgno= Received: by mx.zoho.eu with SMTPS id 1773527674466602.1923633326625; Sat, 14 Mar 2026 23:34:34 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 15/17] lib/bootconfig: validate child node index in xbc_verify_tree() Date: Sat, 14 Mar 2026 22:34:23 +0000 Message-Id: <20260314223425.142966-16-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" xbc_verify_tree() validates that each node's next index is within bounds, but does not check the child index. If a parser bug ever sets an out-of-bounds child value, xbc_node_get_child() would return a pointer outside the xbc_nodes array. Add the same bounds check for the child field. Signed-off-by: Josh Law --- lib/bootconfig.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 0823491221f4..038f56689a48 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -823,6 +823,10 @@ static int __init xbc_verify_tree(void) return xbc_parse_error("No closing brace", xbc_node_get_data(xbc_nodes + i)); } + if (xbc_nodes[i].child >=3D xbc_node_num) { + return xbc_parse_error("Broken child node", + xbc_node_get_data(xbc_nodes + i)); + } } =20 /* Key tree limitation check */ --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o59.zoho.eu (sender-of-o59.zoho.eu [136.143.169.59]) (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 EF88138F643; Sat, 14 Mar 2026 22:34:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527685; cv=pass; b=MBFs/PcqDWnGY+QkZf3WTCCzw4B1u8YJhud1T0IFInW5FNmy1wiQzKcxO1dMZVXTLACKksMNc4GPWfigqSL3NMA/MILFskpUBlz7yL6tbPfCGY7mfUCFPgRonB8nHXea39FbvjOFCgHjskic8E/OzNhSr7AyZ3h53ql2ILAO61c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527685; c=relaxed/simple; bh=6vJJkObBhfsNyQS+M22eHRqf8Wr8/6ywp4gTDNMOTqQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kgmG087sGvNobzfBU2VFW970D4eQUVUfQW4zJwtXgq1CU+k6tY3aQPRQwMNZNWgWz9Y8jkncNeAEHzNJvIz71tlUQYY/3dQfg9NDDyma7lqURGnh4dxgFXmhOQIzC3zXLOPoxpzhVDYT8NJ33OME+1rXlE7r57GpNlOw1HoOlP4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=S+db/pPc; arc=pass smtp.client-ip=136.143.169.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="S+db/pPc" ARC-Seal: i=1; a=rsa-sha256; t=1773527676; cv=none; d=zohomail.eu; s=zohoarc; b=YATn7pr6TON6I8uD7K1ikbkMNTtIW1E6mZ3rwnSYg1w0R4iHUUnYdIurJVvr0zhyz1rHqd0pBIKsSBvDiPbGqklYLbk/U4h1YZEfPMSFRzeCIbSSQp6hqi9p3GdlDPLkhJ7IfuS6GJ3gx+TBsS1zOAF5osPNV/8DXAwnRqOceLs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527676; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=wuwpjgw+yCW4f5PVQmIgF59vQTrbva8ITO8a3v7fL6w=; b=Djal/24cSUXKjViau62ijXBuZb1j6Rhg0PWQkC0k6Bw1q2DXa8p9dwCoQTyyQ5i9dKE7saq+qwJRcvA+N+qBURNRXkKnhu7/Ewo7JTY0wXM0eFHVuiIKomPKr5hGssGjS+CXaZYjRuFtiIw9sLcYXZgR9c+Swl1XoCHNE3lLy8Y= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527676; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=wuwpjgw+yCW4f5PVQmIgF59vQTrbva8ITO8a3v7fL6w=; b=S+db/pPcdSR6v0aKuphZ39HKTYT+PL4Zh/WTWB9er8R1FGvJVH1V4OjNWly8Aa9r OrSl4Esy06HZ3AzJbL8M/1QmNU9JQ8c5TZN8JcNCxf+TF2uGQPuflPNNBaJ0VIrXPh0 cIiA6lTcFTjAidIN+bLRM0nf/J91wrG5e9KtQFio= Received: by mx.zoho.eu with SMTPS id 1773527674987635.4224193154647; Sat, 14 Mar 2026 23:34:34 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 16/17] lib/bootconfig: check xbc_init_node() return in override path Date: Sat, 14 Mar 2026 22:34:24 +0000 Message-Id: <20260314223425.142966-17-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" The ':=3D' override path in xbc_parse_kv() calls xbc_init_node() to re-initialize an existing value node but does not check the return value. If xbc_init_node() fails (data offset out of range), parsing silently continues with stale node data. Add the missing error check to match the xbc_add_node() call path which already checks for failure. Signed-off-by: Josh Law --- lib/bootconfig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bootconfig.c b/lib/bootconfig.c index 038f56689a48..182d9d9bc5a6 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -728,7 +728,8 @@ static int __init xbc_parse_kv(char **k, char *v, int o= p) if (op =3D=3D ':') { unsigned short nidx =3D child->next; =20 - xbc_init_node(child, v, XBC_VALUE); + if (xbc_init_node(child, v, XBC_VALUE) < 0) + return xbc_parse_error("Failed to override value", v); child->next =3D nidx; /* keep subkeys */ goto array; } --=20 2.34.1 From nobody Tue Apr 7 07:29:20 2026 Received: from sender-of-o53.zoho.eu (sender-of-o53.zoho.eu [136.143.169.53]) (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 4C3B839021A; Sat, 14 Mar 2026 22:34:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527686; cv=pass; b=qSf+lHYqdAchHM6FFrEbTo7INalCWQzgdg8m/JrfqctKqj2OlaKM8uq1UQcyIlknW34EtDoSfepENg9fk6csLD0Y+eLfPF0lMBWqhjaGz/g++xxKm70XeRQudGyRb3ewR7UShkwLO1QnT74yyRNUodSw1Qyl1hAghG7OQLNGnFA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773527686; c=relaxed/simple; bh=4hvIdsyU/LaVH9Cl+UZr7yonHlF2t2i6TR6b+vGdeIY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=i0+OEusrliEzl/rADABiKCFSLROpXXr49cmno4xeao+DCc/sWFqWt+L6DRR48TZDRWxC7+fLngniX0tJlwK7SMzDio3inMmviIeHjKnCvxK5rYHHxJER9gu6V3s+Ze1k2RvmJG/j1SDL0dGI6e8HiE6j5zQFzln1eb+tQHZuYLw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=DQJMKYBG; arc=pass smtp.client-ip=136.143.169.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="DQJMKYBG" ARC-Seal: i=1; a=rsa-sha256; t=1773527677; cv=none; d=zohomail.eu; s=zohoarc; b=d3pbmz6jKNEuFw2TnM56puEBtyiLuAHLR+buneMjD+vpS6fFO7bvUbS9mP2EyYRy+r6/I5aHYOrjh56R5lvtG2anRpNPzANeZCi2SbGuNp4+kYAzma5y187ca7cpSZ2w90bLEpw6MAYXjmzF6fzr98nhigOP0vLh0DLEHN8vdZk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773527677; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZmbCE6oHGMaPEvykEN4WTjS/8fklO687Fi9eR6U7ss0=; b=gZI5yvS9NXqEaE4j+fAqrrx3qPlDMs7wOjYIQArXzErg8gUogljAZs9BfWR0WFa0rcfznTQPJMruC1NPv3yZaZCCKzEwB8PYx4csFHEWRE7AlRXY33xgJObCKNB16KqL/MSDh2X1ZFBoe+XPf4Kxx9ZRTj3gI9oDlDsO0Y5OiJw= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1773527677; s=zmail; d=objecting.org; i=objecting@objecting.org; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=ZmbCE6oHGMaPEvykEN4WTjS/8fklO687Fi9eR6U7ss0=; b=DQJMKYBGdudBXWk5uv32ElWLqzQI8xQqFkstwSBoq4q/m/1HXwG52IsmWo8CBu67 BfzGEPX9TTumk9bvuRS9w6YWZ110n1iL20JfEZ7DJqsawJxg9bdfk3s3mv79HSJRlsg sAmnihCo1jNbQM5xveLPzt0CFKTcjWEHRR09440Y= Received: by mx.zoho.eu with SMTPS id 1773527675504893.5611690036359; Sat, 14 Mar 2026 23:34:35 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Law Subject: [PATCH v3 17/17] tools/bootconfig: fix fd leak in load_xbc_file() on fstat failure Date: Sat, 14 Mar 2026 22:34:25 +0000 Message-Id: <20260314223425.142966-18-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314223425.142966-1-objecting@objecting.org> References: <20260314223425.142966-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" If fstat() fails after open() succeeds, load_xbc_file() returns -errno without closing the file descriptor. Add the missing close() call on the error path. Signed-off-by: Josh Law --- tools/bootconfig/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c index 55d59ed507d5..8078fee0b75b 100644 --- a/tools/bootconfig/main.c +++ b/tools/bootconfig/main.c @@ -162,8 +162,10 @@ static int load_xbc_file(const char *path, char **buf) if (fd < 0) return -errno; ret =3D fstat(fd, &stat); - if (ret < 0) + if (ret < 0) { + close(fd); return -errno; + } =20 ret =3D load_xbc_fd(fd, buf, stat.st_size); =20 --=20 2.34.1