From nobody Tue Apr 7 07:29:15 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 7AB76385510; Sat, 14 Mar 2026 21:46:14 +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=1773524776; cv=pass; b=jBT2nU2XGNds6cjm+2SoFXhc4wN7n99ZKaL1NbM5+eXJ+cCzEaZ0xz6pYHrDHELgUe2YCk1YfPmc7HDrtEKaynHciXLZL3rqoz4JJa/K5CJPEO5QtXiR71OZPEOTqdRPA7l5eqnCYMoHWILIgfAMVZ+86+Lh9ygZoPOREU4tsV0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524776; c=relaxed/simple; bh=Y9mfWQWziz20z1wZlyGCqiydfBbJQNFNO/oywEYrkow=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VdCFpiYL5NK420ERJe0sdCYheS9+H93hbgM7dr5BMbdJVeB0jnls9pjVGf74Bo/dPNTnP3YscC5pYAC3Jk7HYdeFVQ/P2PoJJk3DcgpViRJx6J4fhUbIwcn8Xbm/sM6y00/hcME/owbzbkpDtnBjosfz11DmVQPX/FFdhN2TBN4= 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=oVdRCtwu; 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="oVdRCtwu" ARC-Seal: i=1; a=rsa-sha256; t=1773524760; cv=none; d=zohomail.eu; s=zohoarc; b=OoxLI6lgDK7CjgSOOvQPrVgvwEXqANKxHo8vlBzGjaG4ks1au+5Pa33Ucjyg3F63aQlRuYQgJSfI4JekreywrL5AfcMWCEUiEONLvvMSzCeyh5PVaolkUH16V3yde2K3vqbVThMpEhsMR87OhfQ2UuMiVRdkUFlqUo3GqiD2v9s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524760; 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=E1Nxsd/Kkk0ZcPG2m9VaBhfEuLyGFVr6LM5dDT7XVzaNmBflvAJUNUDkDfoROkHuEZ2Gn2qessalZU2b8T1uKOd4IFiWTbRB0sfQH1Q0AldyVJsBLsj4dVqXgYK4jzWS+SHQAnPt28DoX8lmAPxg59z643n2aIWdfevW7GFR248= 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=1773524760; 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=oVdRCtwurLZWXjz+LuWGP+AVYri8XmSwvJGqSqlNHLmaxfP1da3ZI7SP75YAck+S ztKZns/AklsyihRrGW/wBFrdvlhLVzlNh8S/Kd54iLpzKXrT0jr6Yc3ZmPHKL5ZPuE2 Hu2GruhiA/LaHaQNM1fktEh8rb9vkeU6a8fV7n10= Received: by mx.zoho.eu with SMTPS id 1773524758047454.75902255180154; Sat, 14 Mar 2026 22:45:58 +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 01/15] lib/bootconfig: add missing __init annotations to static helpers Date: Sat, 14 Mar 2026 21:45:41 +0000 Message-Id: <20260314214555.96217-2-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 DF1893246F0; Sat, 14 Mar 2026 21:46:11 +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=1773524773; cv=pass; b=IWo7vAhBjnk4OUyavVFBh4w5mbDlz98/mEkM+pQOR8FMWO3fkCGFvq5Fg0ZnNrG17s3/mdXz2ubsb4cBdlBs+xriQp/wihnfdCRn0iRBkuTvPX6rSS8ZgA7oLHTdE8x+x/gdCzlSE/jUMRpPbyMEkB7lUHRWSX8g/a1cCZhvf7c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524773; c=relaxed/simple; bh=mOcA5NumuG5htRvRiYXxJV6Vjf0pzLdSrtjWwr+L0hk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AlWrg7tFb9DHwVPM+LYGf9LWaEyYUhwdcKN1SKYhoSxX9R6aNJnhtHNIvWxq4nMkPAAyrKPnz3m4sWes1CrVMZieyhFYrpBa5orPysxX0zA1AbBsFUAAAvOvWT3IHuYZYxjEhlbvn+SKWnGwF+ROsoM+PeRBfRrrT7vr/ieV5Jc= 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=F0d2qFzW; 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="F0d2qFzW" ARC-Seal: i=1; a=rsa-sha256; t=1773524759; cv=none; d=zohomail.eu; s=zohoarc; b=L0JdAFptlufiKnS5g5xhAg0zszJqP6jVtOX/46L4GeCPH1nXQuJxRq5LN+V2YRhfubGOd1gVt8F/HnIrgy1ZoMiZYah+Cp50um3E5O2wkcc1UIYoz/WAB8EmQjY/AGWXIRb7ILG1lrQABKZSjH7DrnQG8keQfiYioZrcOR4rOGM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524759; 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=QN+RTiTTJqhfVV4CLreAmcIUpe6U1kj0UwINxOHzy5Cyi+WJwXEJiDhtQU0oDsOUSvLD3mcq7vId785IoULP51mj7mxj59FtHseqx3h/lAun4L/+r3EWhPqdpLSgmMlO0t+91TRbdp7JpL+jtEcM2sfoF2XphhiDSInqUcGzWF0= 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=1773524759; 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=F0d2qFzWdBeyM2LKZSaeptKUW2/UMDHWa0qO98VqlxZgBrizXoTUqi001VrkJUoj Ge5pQ5NFq8y4vb6oXuQXhuJgqBOcn21w0e+Q0+zPN3Rr5CwJ7iO+k0qFUWpJJ09QQcn XXByHt/82D6fsIcrYmnwrKb31cs/xLWKpOQ5ifFY= Received: by mx.zoho.eu with SMTPS id 1773524758686449.92300632525917; Sat, 14 Mar 2026 22:45:58 +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 02/15] lib/bootconfig: fix typo "initiized" in xbc_root_node() kerneldoc Date: Sat, 14 Mar 2026 21:45:42 +0000 Message-Id: <20260314214555.96217-3-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 7AAEB3845DB; Sat, 14 Mar 2026 21:46:14 +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=1773524776; cv=pass; b=VKjLddGjgwyeUGpMrhFhwDft1odcqrYX7A+Ilr7EQRyDs74jldvz7rNOuvQECbNRDXUbvABnZDAUIVIqh16SsJUDYeQwfm5nG5R6WHzWQMZXp5Or7rrS1ZqnpxyfORCWqrETuT/jSVZ4nto2DECpLkVa57Atj0XbAF9Jb7Cu0z0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524776; c=relaxed/simple; bh=UvLyNGwexYo2cn8ocKvKWmvyhLSh4vWkr9PLO2DssME=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q+2x/I3ZMqa9eSVYBOZmDtM8XFPhrWi5i6K8JjStHkMHQY/cPUGvGWAZjtnD/tmKQMpgmILwntJRpd0ajpmKaJt+IM7LnD2Ou9G5b9I+J+A/2tXDVgdfTNFsdY5BrZN3xUP13A40X3jWiebrHLi/rGrqSGV5JR9W8poBhFa7vTg= 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=OCEAeCgy; 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="OCEAeCgy" ARC-Seal: i=1; a=rsa-sha256; t=1773524760; cv=none; d=zohomail.eu; s=zohoarc; b=GzYI//ZYCk4l2nzAmFq2H6e26sUAjiE07b5xjPWk7u5H5kuUhpjGV8imm3GEP0rkUM/ciXFkCBH4OLmzoRhTdp/VwszwMBxApmZab7F/B5+u2wQnvPVi/9MgHnOUnLLj3saxHYj8Sre/cAcX+iGpQzM/HVf+DsLaxNIwREVVQr4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524760; 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=gL5ODOhzZ6FSo0RyZxIIcEy7HrVjOs3BsAsMKuUu91BuEBD8YYSYp9yEFj7d4k9gHqm4O4GJRDDAYu2NvNC454v2qgnNCW50UVbBZstEAuMMlO61SBB2Cbeq1+dd6Yv0UuNT+IiHTLJUqDtioOtlibVsBkZg/pUYQPN523ZJfXE= 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=1773524760; 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=OCEAeCgyHRvQZGC5cSApMVRClc9QB9BWR8jvQTZWAI7/JflNSwXT2h4lP/4+hjTD lAKnSVNPsMzaEV6X6Je9uB0axZp5Q9eYZpMYC0YDBH5/JubjZ09dRUPUL9nWXUdYn6f jROkqeSYkUhtEbN44LDkU4egk7+itp3MmvRFIFCs= Received: by mx.zoho.eu with SMTPS id 1773524759263252.44955296371552; Sat, 14 Mar 2026 22:45:59 +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 03/15] lib/bootconfig: fix typo "uder" in xbc_node_find_next_leaf() Date: Sat, 14 Mar 2026 21:45:43 +0000 Message-Id: <20260314214555.96217-4-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 7ACA3385536; Sat, 14 Mar 2026 21:46:14 +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=1773524776; cv=pass; b=rUhgKodLSH3puGhPYXiNnegOYLE+TDVcbXgc0nDxFdTAJzFq0cSE/Um0R7RQKkr6YxWOCKlnWkMQ5NV+9Dj0ozSi9uGPhB5hDxyODU5KKRP7uIIo5fWnCVyfGGqjpkT1w1T2XVCXiIX2oMaLD0FINGxN9lb8sQ2gDDzI5EaAPDA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524776; c=relaxed/simple; bh=6svVtZsg6MEUjaimzvi33uip35p+FZFQJNiBWVQzsKk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IMr/MuMGPktvA8LunrDCk+y5qaebVGdCD/8VVbFMWA/FCrCaAL2LRDSDhF+zXfY7TPehHoKOcK2N+Gf05hNv62t4maQCwhB6FFq8nrntCiVV722wOggDD53MrngYSCsNjLDD4I77dnRyzCxS7dfuMhteq1nh2wMLiPpdJ4Vs7Ok= 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=KfmS1RdQ; 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="KfmS1RdQ" ARC-Seal: i=1; a=rsa-sha256; t=1773524761; cv=none; d=zohomail.eu; s=zohoarc; b=JxebKwoqawuNWPcFGpGQDMYf3kIEu+ixnySc74yy6GaSYg3HZg7Z+jWFUpfkDTpzOzTh267Pgx9JnwnisDdaDanPaTZQpRFDPZhuPLwkUnqJ8qY0Cil+U1cplEmBU/oriRcmlLQYJKE29LGup+WW6oJr5v0mZwev0hpC7xQ5nLk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524761; 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=U5xksHDTW2R0uQrKbk4xJQmoVV0+DZm02kxZOOLquOM2dix+Clq+VhHhelRDKTmyOBXhx+jT5+M6ul8Nmdt/rT4T3t2weilq5q3L7faesUtr2hycljZX1WcYbDwqkE0dOwl13vnY8baEVet/2yU7Xp5v8ahZEQCz6psPaOIpxSA= 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=1773524761; 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=KfmS1RdQ9D0z4L88NwJy+x2kZa1UWZThOF/Ofi8gc08TQGicV76V12jjdKKqpm8p Ppda9lK2ccKEcVzNribp+CniYrLsCVQg38ih5Ha4lVdCeZNrKkoJi+WnON9tQ6wKO1n +sQ1r35IzKtyhcuDPctxQYr82jDIhNUvOUUsq9uc= Received: by mx.zoho.eu with SMTPS id 1773524759836201.83145947128344; Sat, 14 Mar 2026 22:45:59 +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 04/15] lib/bootconfig: add blank line before xbc_get_info() kerneldoc Date: Sat, 14 Mar 2026 21:45:44 +0000 Message-Id: <20260314214555.96217-5-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 5CFCA38643A; Sat, 14 Mar 2026 21:46:15 +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=1773524777; cv=pass; b=lNLk3GaO5JLX+zywKAigFXuQAuTZcMwEhOnW4+zi3g1hGBN65sAB8v3OdMR09Zz82GWcbLfse/HN4gm41LyrFQWwkEa/HCXnOhV4vffWDQ5De3nsr949iK5fwZHo/apbMc/6EsJN4x8xbdjPXg1r5W0Whnf/xTjJiGPbFIZ6QXc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524777; c=relaxed/simple; bh=Ca2yOMLol0eXm8Z93sdZF0uzxBHDnoJJ5YjTb0UjCSg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dbaUUsTRAOLUnwGj1kIjKaXuBtNyVs9XtyqAgxAQ0RaT8WWkObvZHoBIf98qFiTtD6/Hpv0y//6rFRjv9TzZbVcJaSXINt9jB+39uLh+6G0XBxGkXJgAKpVtGXQwb5F5TiK6fIRwApEdjD4xJJHdh5U3q63tez5EJiV73ac1Nag= 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=b1TI2XIj; 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="b1TI2XIj" ARC-Seal: i=1; a=rsa-sha256; t=1773524764; cv=none; d=zohomail.eu; s=zohoarc; b=cf6gVdB3L+eTalFWfxmj6LtzWBvFYKErzQbztnblVxbdTbE0a/ex80qs8EB9zGJvS9FEw7sc4x7TeFW5NYH0Ijjuj8FlqH1cUFNS6JWKE3VuTpwhq4mBCpGa1GzVG106oPULzUsfEdbdmK6bEqyPd5N++/7JcYLPp/Em6gU1H/U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524764; 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=kB4d19ZRdZSNfYDfeIPGjX6vS07G7rvD7M2/xU3CTzuhmSC4i+jWAWqIRLbpCN/LkA/gPHnOSTYSFbeP/pMbuuXgy8ReQxURPXLJkfpBj4MtOCPDgAZ8Ns9VUXImQjjTjCjnPa+o2cJaaeoIztMmvGLhGk6thmIGrYG7YqetyN4= 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=1773524764; 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=b1TI2XIjAwe3PuvuR2JCmGjHdP92SPthuY1f2cuyhfz/ftPnwgcqqSW12Y7UCnNE p15/N3Zx/Q0uB6yJh9PGPjRuJCeGBh5q433IieH9g3+Qz6LkQ5FFhQBtRD9KS6al6hV ANFDwGwmhmi5hR79WjKyNSfd+cfSLmHQeiYL+5HA= Received: by mx.zoho.eu with SMTPS id 177352476103285.71315154004913; Sat, 14 Mar 2026 22:46:01 +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 05/15] lib/bootconfig: fix inconsistent if/else bracing Date: Sat, 14 Mar 2026 21:45:45 +0000 Message-Id: <20260314214555.96217-6-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 89B53386577; Sat, 14 Mar 2026 21:46:21 +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=1773524784; cv=pass; b=OGhTCzegPvMgqSgIOD0BzOjx8OHw6ncrp6XRtjodCpKCEO4UX8lzoWsx5Kp5giasuTBKfRemmb46nNz3lPkOMzfLM/utYPX7bkMPG2CNaOs7d2oQy+7lu6uu/NKd5uz1wFbL+kD7MlC3cRJjdA/TP9IkMxKmYWfA5ENkI1DPAlE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524784; c=relaxed/simple; bh=DRP0bkR7bPm24iP6Lzhg3tEJBN+s2+Bet778OjDqUXs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=A03IzB7o1wPK3uQb3RPlTnFrysW2mL24tUjbA0sq0HDSPmm+gPAQqtnTJuOLc27EB5jCQj4jIVkjLBR/R4Xjyag+QzqR9CtEpxXP0YXy62ky6odDdJjzFEFAnWa/nifJ3j7cvSOFthnB/OMBkhaekaULH4BTVvWG4FWVOoAMJjU= 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=oMrimjIB; 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="oMrimjIB" ARC-Seal: i=1; a=rsa-sha256; t=1773524763; cv=none; d=zohomail.eu; s=zohoarc; b=Sc1ygsYkZJF2dxJ6ltNvsD9opthRxJziY/mpv0eif90QSZasTq974TN+v5Js5ZeH+QEOGmEKp0JOB6r9hFnRnAV7KhzuLf2AwfKzaVj83JdxfY+0T0ZEFTsLM0G6K85aKTauJQMhqgNtT9efFHtqQcWA1MT288yhn9jboB08Zuo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524763; 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=gJYESOtmHiojjIBH++HY6oQIdpbU1J9EONQnnedTqrFRXMgC4Wjh02tyLYVNCsI10MstClENY7Hm0Y6noCnowrRS1maOdjRnq9kdDtkHYj6RtTjqsjXNd0cFxWeyRHO8+Qu73s6dlE5at0L1BNxdvfCrUeyzSS+bAgFsxmzwOss= 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=1773524763; 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=oMrimjIBfrZ1iENf6XGFzsFwJOXK/gcoWXXcwYkbkf46IgZlzQUTyqOBf94Zn/6r bvL+9ij8OyLXvkecDMcgHzPqgPjhSsbcAxZBzswDeJ0bDyDW368x14A+rjbGmQQNoz4 I1zfIaddZRtpKRcMNSFGtSdGk/PtCb24gFFCwAyw= Received: by mx.zoho.eu with SMTPS id 1773524761819259.98526413524905; Sat, 14 Mar 2026 22:46:01 +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 06/15] lib/bootconfig: narrow flag parameter type from uint32_t to uint16_t Date: Sat, 14 Mar 2026 21:45:46 +0000 Message-Id: <20260314214555.96217-7-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 EDC41331220; Sat, 14 Mar 2026 21:48:13 +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=1773524895; cv=pass; b=r/LoK6/Jz5frXBYY62xdVSKPlQO7ZI52MqsrLyJDU0PDIHc8RN7W5edRbAghrUPpB4IA2RdM8vGYjGQYto4DbjqWByCts8vApYITqehmGwGhw9W/UTqFhiAlV/cOSbbmnIE74hTE6cC6mWQ0QED4UJPk9BLwHF9Wl98A3pqBYew= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524895; c=relaxed/simple; bh=MjX+L5BkroUgaRrcSwrGDKK9It5hNznJ9Ds+whNCQGc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q9FoEEOLFEgYqu0FVT9KKIl5rIs0jTeVtraSSlo8USqWLssi+/bBl9CwaEJsfG5v8bdbb6yitrAtNxXX4WC+mS8nQ4mnBqkcryue1bfa9Q73CtmUU1lvm4mg3TtzlSUpPmdaCXN09ulZjRVbP/3ZUBWL+fl9jujcdEwDlIhV09A= 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=n34Z2P0E; 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="n34Z2P0E" ARC-Seal: i=1; a=rsa-sha256; t=1773524765; cv=none; d=zohomail.eu; s=zohoarc; b=f4do+Nu6iPpGvRctvHPxoL0xUEwgXqzqGwCtt/BE6bv9CMN0GtM0wq3g7cQi/fHZqW93Lqn0FXPGKQenxNgDHli//BK1GnqPOIaJAJ2zNFOL4OT9ybGmY8FGfv0fcbf5HuJY1V8eclc13xiMc06J8dRbfZ5Xm77a0n1FCm17M6c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524765; 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=Ct9UqahVrHCrksJKGrp9fmmjY4+O4mYKoGDQuCJM/uhJ0xVul7i9dxhxW2NA5fe2EY+RQYZx7Mt0cNVN5POMhJGZEe7ouZKvbuj3QwcjnmgCoQdqRdeny1pDXnUbDPVuYO6v+nXWI2+3dvmh4zpZSbY7R+O3HZ/9FLSBXgV4FMo= 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=1773524765; 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=n34Z2P0EGRZLnOLALcAhD3NUpP4wJ/C7yHfJVHof4kBUVnjPtFBo7eBGnJKolZ98 W6U10xd+HpPSBVzl4u1UfkTaK2ucmLvREsPQBx+Qc0e4hDxCVpTl+ex95emaIq4nalt /r+vThukOQqe+bgv6vsLvH8GU+6fgjLY7NYywEjg= Received: by mx.zoho.eu with SMTPS id 1773524762373783.2366676984439; Sat, 14 Mar 2026 22:46:02 +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 07/15] lib/bootconfig: fix inconsistent if/else bracing in __xbc_add_key() Date: Sat, 14 Mar 2026 21:45:47 +0000 Message-Id: <20260314214555.96217-8-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 6F54E385510; Sat, 14 Mar 2026 21:46:19 +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=1773524781; cv=pass; b=PCBp33o6kIxpFOjdCNwYyxDIvoW3bVP/T0jv99W9jXfwostmfMtjiF4q3oj8f5qv4NTRAeEGaO/drcDG0UihcPipxcgc1rLekd7qu+CgvA+n+EI7tV4GzlKtbwxSmTtR40Nn31v6PHBD4dFEVOSmzHsreQxBoQi9BdhSGYwsZLg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524781; c=relaxed/simple; bh=kDcgT5gXzTP1fqOGMdxALgedri0gVcD3is/FfzavjKc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IkpwgWWWvCayCstf+PvpmoyjfuO0cNh3BTAra+XsXyWha6yyvELt0Y4ZhkbKrb5ZLw7U6aP71Z/mTyMPH7xkfXy/KjJr6PuEqBYr9sk20iXFKKqWdj1qeOi4sb9YpypPdez4a/vlv4MWDLqHfjkeGEFtPHdLFf/2RxB3VMY0gK8= 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=n+6fTkPC; 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="n+6fTkPC" ARC-Seal: i=1; a=rsa-sha256; t=1773524765; cv=none; d=zohomail.eu; s=zohoarc; b=VgLMMtChlqeo/lEN1F+BcB9+2Oe8HyYRKPXaqRczrTlLQpWC4Ar0cxgzUbKl87rIJlfaBNc7Ds86v5XtWfy0sEpnMGUjDfrN499GJT+i7CIZcfUpR7uvMGWOG2LqMKbAlzeBJx8iXnmzuatDRA+1u6O5kT4K54Bi6CefuXgv/gc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524765; 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=AkZtZfYwXNT78AaLfZLdgmnQs5+RsCrcwgvoZ2VDExYxY6l/6z6YLhRgW1lTWotvkaSsjyER16bkOThBeb1q5hlcIw/v1qAAOq7vlnj9M7LF3MAXA3Co1ZWVYzPbYr84bBQj/I1MOVhst29am+07ViK07V70AWpnzalwpfP2+dY= 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=1773524765; 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=n+6fTkPCW8ZVFlUmXcpAZh8bT7jF4xKnRrDdApZuMoz5OlKfSb10pOi5llI9FaXn 75sarm2/Em79ETpTUFm7dsCd4NHXm0QCWs7MjxacR60RmSdscZKLG8jihKtw1tJjRhT 2PZZvO4nR+Eau3EM0qP7uXihcgJ+FvueUNxyhBvU= Received: by mx.zoho.eu with SMTPS id 1773524762982831.3987582938475; Sat, 14 Mar 2026 22:46:02 +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 08/15] lib/bootconfig: fix off-by-one in xbc_verify_tree() next node check Date: Sat, 14 Mar 2026 21:45:48 +0000 Message-Id: <20260314214555.96217-9-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 B87C038944C for ; Sat, 14 Mar 2026 21:46:25 +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=1773524788; cv=pass; b=QYARlVS96W5GOclj87c9kgm5dvYBZXofUNvJxC37qEf5PDPXKO2OqlCSXTwE1QQlPuzGeVUJiWFvpfVBC1ZlVSxaruwltBWBA/7u8KSJvlPKalU4QB1VN/7GJfwopN4ObYNSN7NkTc/LK+C07M4ATMiIbaTJ54vvmmOqMnene0Y= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524788; c=relaxed/simple; bh=5AnzfG0vkdEgFClTKvrYV4qYqkz7cUXrau3pFlOkbfI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aHVjumuwNo9zUgUX4BcjESTAiPu2ae+Z1uvb35jfYKKvrwn/5wiVZlfSW9b572PsolHJ+j2QXe0/jcBegZBc/bF5DdCAvjgJtZ9GJShc96v+kbRuT5OuWzcWiO8qpjVoMiGZ03jngVZ+jlOvUSfgnI7Q5ovAyEL5bwz3uhysFag= 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=oWba+CSd; 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="oWba+CSd" ARC-Seal: i=1; a=rsa-sha256; t=1773524766; cv=none; d=zohomail.eu; s=zohoarc; b=N32MCFhkEK/HSTm1Ou7X2mtlYhvcSoZBgGivvtjCIYu/66iY0wXKn19vl9E/xsJyIbI12/6ZOi658d6ZTrhW1KkxW5mwJ0/uU/YgzXDfAxCEACw6hULPdNtp61In+HPpPEB87Nj/7beQpF2yHUmN2oxXUuK8e9uygL1aMtZaVWk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524766; 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=VX1vsX9wW49TvareQPU7Obmjd5KIwSHsnspRYMF1VMXpRNu3CySjiJFhCXA+IawL0ChXKPLNaeVwl1Fx6Ni307bvssspE2pSwuO1sz16vSzehI0RHi6i7zkW2lw2fraRuImsFwYoEZsjCzt+IVV+kgRGFI/puT3bHA0bmcY8884= 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=1773524766; 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=oWba+CSd88l6ahshQlzTEgD8rkcJED9k87ZlzqCsgUEWCWGC+q40w5zzeDtKBMpC KLkgUTWZOIRDv6KS1RroYzA9H2/iPqqvSy5C08Acec3zyewdn3puyA2No3ZdoeE6Rsv 7wPjrJilNSMymvVqa1ICWUjcnAL9VxoRh/JjIm5A= Received: by mx.zoho.eu with SMTPS id 1773524763526571.1415931431779; Sat, 14 Mar 2026 22:46:03 +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 09/15] lib/bootconfig: increment xbc_node_num after node init succeeds Date: Sat, 14 Mar 2026 21:45:49 +0000 Message-Id: <20260314214555.96217-10-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 7780B38758C; Sat, 14 Mar 2026 21:46:18 +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=1773524780; cv=pass; b=akAjWtc+KYA7/p7OOJqxmN+VfAVQqaYxqKyjcs7pJ2vaPaIJanYBQLjj37TtdJOhmC8jo2tfN9Nf9Q890GOLLgXOO99texQpVDBinY8d+o2Oe4xfPmrVA+0xSG07WVs5rArr9qbOYIkt48oUeynoHqb7+8zRW4471Cb8pXUicYI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524780; c=relaxed/simple; bh=EWCRpZBNHCZU8iztguL/vt47WImiwDpV31hec4mL7Lw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Qmw+yfeB1OGH8SLnRrBAbwEO+Ez9FpIWwaLHxPBXoIhXAMU7Us0w7CTQacBXneTgbWm84jHf3X2FkRtT6qP4UkYaZV9sRwR9XRPwsNJbw9E3QGSBniIla19zFrqv7y4WVgXFT5g+lkjBxZGjLdEThAsIAbYPRBDSeYtSC9iicc4= 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=N3asMWgb; 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="N3asMWgb" ARC-Seal: i=1; a=rsa-sha256; t=1773524765; cv=none; d=zohomail.eu; s=zohoarc; b=XzDrZqO6KsCkC9iprvw6oHAyoyp7QXsPI15h+UVrVcpUR+pYr6vZlAyXDhoe67YEd73nlaI2SyrXgI9VDqOgcMZbKQ09frqUWbRztoGIwzmICH6R+StRofyWKj0MULCaRk2My6jSxOtDpV+xpejUDBuyg4v63DXmV8CnIWJS990= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524765; 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=P9f2l044hJ447Unr/it6Pt+8XCKzd71mii7ihJS6wP7u2PtMjSOnD6wbAegRcWCEO0WLkec85fDagIDpMiZmSGG1fusAoAbyftDmFmQ0q2yqfvLB2t0ydHsWDhjemMrNf4B42SU5pAq9cywfmQ55yAKNLxfhbNWqV9yIT/QxTEM= 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=1773524765; 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=N3asMWgbylSi4XzumSzq7ur7uPDKaNHkJbdovaaaYNgUcT8Syce85MYsBp5a76uI nXP1l7ZYHyk0O80JBrCA/fzEB1TkKAOMw6CaUQtHmhRr0YuSqwjQe7anccqLcaBL7hG LqqiNU40DjnIHtl5FVoDd6prOdHyaabGrpW4ZbcI= Received: by mx.zoho.eu with SMTPS id 1773524764082419.1804522832923; Sat, 14 Mar 2026 22:46:04 +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 10/15] lib/bootconfig: drop redundant memset of xbc_nodes Date: Sat, 14 Mar 2026 21:45:50 +0000 Message-Id: <20260314214555.96217-11-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 70078386C17; Sat, 14 Mar 2026 21:46:23 +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=1773524787; cv=pass; b=r7fvWPqfZ1GSuEBSQerM9dTi8o1oQ9NOJrTValREdNeCeqZDesxUZ2Pbw6SPZSBZlgfXMpTPZupdJN7I0+O1GYqiBQCwbng/qWPa7PWzuuKA/eTEJI07Hm6Ykci44oRASUAfy0Vm/elNZrMmZ1DQbNS2ptRbZNxSkpXvwMx3QxU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524787; c=relaxed/simple; bh=FXNMbqg55SqbPOuJegAqlqm+AJvfK6co4zCLBLrw5Q0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=vAvID5jeiblM9zFuwQ0yS9WiEFj8O4KHw8cD8kB/5CYVxyybSWG17fbE5xL0udmoN3brFAK0LsApalyllfZwd13b5CgNGbAwtMrLkNqa4mXfdbuW52RI4PAGFV37f8Q0Vun9AK01xJ0UWiUI9P0bkpSfAOglOfhdfx/qUnORelY= 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=Ef8j29gw; 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="Ef8j29gw" ARC-Seal: i=1; a=rsa-sha256; t=1773524766; cv=none; d=zohomail.eu; s=zohoarc; b=CJdjcv719rmq8DykinWv63Q8zh91huAMJQe5xkJvu0iDKsvgsQzs72m1ilhrSEBbbwXKkukiYNRjy+c1wvKtI0RTWEcohKOEmD5XWA8KHz4I5odykcRlR8RThTTRrW54xSk0WalKA25tngWa4rUHrtElkEWuTc1oQq2I/ERhV6k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524766; 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=isLOBtwU1JaZm10hNVvBY8j8mUTn36gk2nep0HzQP2KlMpdSCOA/0wdukLKCscsltkZoVSBFf1I0YvR9luJbiRriuR5KISQy7eheomb2quzFkJCu6MWinomeUe4B5Tpt23SkNZ3WPe2kM2shIBltgR3XWcfkigodNn9JYLyMQAA= 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=1773524766; 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=Ef8j29gwtjQaiaiysTX5P7pu3J/JHgXGAaMNVrG4xJtnHv6/++Qy6W9wKDC9Hz6g e2rvt4+xNwsQheqywObUscOVOWiAoD+8AyGhQNl08hpfRPOqbEpzkKyc6o6ky3jHD1F AQ1EnVi79UK8yjWUA1vW5NgRMVxKQKm7YZlvqIe8= Received: by mx.zoho.eu with SMTPS id 1773524764667721.0396314285333; Sat, 14 Mar 2026 22:46:04 +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 11/15] bootconfig: use __packed macro for struct xbc_node Date: Sat, 14 Mar 2026 21:45:51 +0000 Message-Id: <20260314214555.96217-12-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 7789938758E; Sat, 14 Mar 2026 21:46:18 +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=1773524780; cv=pass; b=tvl/BSz1NOQM4DXMi/BOXs2A65MMfX7JcU50Kiiw+gw3cxHx7L9WVnz83pHh8oP2zNCpmm3yhf0U4Ewivkm0Bjyqp8Yd9o9XZSd1ymKvrZOqOiIhZoxNp2KMFLP7g3EBwqXkL0bfU1QdhX+RBeJOzXaoBE3i8rsFzPUA1Ojmwn8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524780; c=relaxed/simple; bh=g0gLOzGvGgBaDelQ1nQAH+bFpUg7Z1FFbkCEaYNyQHI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q9fXIz14jO5xBKtxZez5vQklkOrEQhewWkILdI6ZYwfojbdZ0oM4rUmbppBIXLLWfh9pqRNx5f4EZHPVsxsmXImwRC/1tJK96GmJvj99nTOntdfzLkOLzSr0iU23Hk02w0Ny0d4vvY8urFWMmfKzqvz+1ivt46A97F3Cpbwy6sU= 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=YdXVVKR4; 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="YdXVVKR4" ARC-Seal: i=1; a=rsa-sha256; t=1773524767; cv=none; d=zohomail.eu; s=zohoarc; b=bKtLt7izo+AsAEgsF7alxRYQmmws1n72Mf5KDx9pAyls+pq0+0XVDVkktqZL4dCB9BpdHvgjr5kfaZCu5sWFSYRXQDGwO+Dp9yBVgZmlO/rmbKgLKGArvo8diHNma3isz1v0NYeMK3HJC2M9+03Nd/BM0JPI2gdy3dXYvag0iso= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524767; 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=jLa6UJ8gdELDhJmsDLujw1Warvd6uFQe4Sv2/3QnWkpY0g/16T9nnmTm/0ypUgUv12uLnzx08/jERKWN+qvyqxPRKybAT2AngUzQnNUc9oVNTCflb3V3OskNEbEyqGuKarjIgI9N/K7tYtHjS3UUTa7p6qnfH/EzNygwOO30VEw= 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=1773524767; 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=YdXVVKR46Ku7L0Pod15rOju8cKjLkM/oJzfcWCDqp30BnPLIraJIsX027ChwJNzC e9q18JouG0chwBxPA0o0mYmvgeuPQWR3OJ6nCZMV0rzDK2DbQ2p2mkLgy38vHbV5uHf 4vdBVhJxGW0+OxYMhMtGZoTlWCsHgPP8BhqHcoI4= Received: by mx.zoho.eu with SMTPS id 1773524765216912.3233082346866; Sat, 14 Mar 2026 22:46:05 +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 12/15] bootconfig: constify xbc_calc_checksum() data parameter Date: Sat, 14 Mar 2026 21:45:52 +0000 Message-Id: <20260314214555.96217-13-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 43706386457 for ; Sat, 14 Mar 2026 21:46:29 +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=1773524792; cv=pass; b=f3xjHF8IuXgCA4NjKVdeHeVFz7EQ1fB1yG4saCZtkxsf+Lf4zEV9ll6eZDdEv51/G9ev2awWU557XJxEK0X0xpT71hcIcuncYY/9y7KENav+N74/Elx5iJm4dU4AFRqZFFNeC7OiiUU8EElny1s/+7StnrM9Yck1wzkz04R2r/c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524792; c=relaxed/simple; bh=5jHlNQbA4ax5oxWy6TmNNrMnctsyCd5kWbRwYKqDhJE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Fn3mbXtbOaTO91b3c4rMIEJhjZJ/3qXOwVn2qJiVtqjqQhR9HLYZtNtYFtvPt/8MG966WmgaYmbMoVadgrWdu1g2gcTaLPkOSqaseR3mjb7FxNUZOr+kJM7C5p1E2cqKPTl8b18kZwImLmZyKpo9pUvpS4giS3cEMvTesmJ548I= 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=PhDKTk65; 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="PhDKTk65" ARC-Seal: i=1; a=rsa-sha256; t=1773524768; cv=none; d=zohomail.eu; s=zohoarc; b=JMSsjQncB7GohxpNEAOsx649si4o54twz+duLWHrbPKkRHMDEzWYOvQODE7zmmnRmmKChHgmTz7KCqtb/YBRwAob/+fRiDUpZp1uEheHjss2gje6Nv1RrhVBnbS4Jqz57+BsV96gaKC5ikVhQyPQm4qf8/80oLdefVCLUxfBXsQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524768; 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=MPevvqTNDa8eOHY8iH7hdV0tKa3vNBBaIbiZMmn+G+CiNYcSAQOitM29zG1U77oXk7oQFdcYlvpme6GvMWhiFtvaDZfBFOJfsHcODvIZhJiWw6/3GzhrOcyYsgIq12VztmdqADWlMpKK8FG6Xow+U31hDii0F3LRfCwPBkUsdjk= 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=1773524768; 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=PhDKTk65NSkEyTW6nOcx/dCqVPggxcIjjWJS3jeTZ45dLE6rx61CS+rHii1dC6TT ZPtfcHxiti8TNqVFHkMoFz35Rwg8XB0z3j1H4Ns/VrM6kTDNCnnGsauaERA9xVx0eMM 26tWa+rXPTrQts8JKklDrDCyT+sbwJg+cvj+LnTo= Received: by mx.zoho.eu with SMTPS id 1773524766014303.04632553709996; Sat, 14 Mar 2026 22:46:06 +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 13/15] lib/bootconfig: replace linux/kernel.h with specific includes Date: Sat, 14 Mar 2026 21:45:53 +0000 Message-Id: <20260314214555.96217-14-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 89BE338838B; Sat, 14 Mar 2026 21:46:21 +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=1773524783; cv=pass; b=Y7NlM+vNu85S+6wSpWo/m3bT/dPcznIBbmZ8/4b6WiTRXNtoBrLc2DHyOMRp7OzjtyyWdOfi7LYNQF48aU138jHjZYbjzAZyRCUBvHGEsP4RsypMLh2L2wYS8EHnrvSxAzdB0Je3FDXXUHzGihFGgpI4S3xtUEpwPmhrMAJqP84= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524783; c=relaxed/simple; bh=6I0hpTbxvzM0MrqqhLwejv2QuzQNDU3b1q7ISIjV9Vw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oXhFEY97FfmqMNf6ui48K4GHP2Pk30BwSdSzLda461Pqhx1E0wBXniAG1eYFMUC9GqTM71Fp8U4TCCGstwLbkWCUdImXe5JDW4vGQZNuiBiwg3zvtPrQLERZ8FWhPQlXSQSd50guSWgjyYABFzjM1WBEP88C9CI9aSHM7n+5+1g= 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=muUJOtZm; 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="muUJOtZm" ARC-Seal: i=1; a=rsa-sha256; t=1773524769; cv=none; d=zohomail.eu; s=zohoarc; b=Wd2iI0UeHDdXxt6guo6ySu2ok5OO7vmFLeA28Wv3fG0Eur1IRt2UJJ5gXTH0HVlgkGCO6cwc+usqnt+bc0njDk8/BVjAVt1tm35VdB62vot1M48bTtQBiRruBw+LUANSWz0igl43EHv+9EikzNIbnSNqJXHVgneoTTvXpgf1+ks= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524769; 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=acfLOrG7RcVxXMh9paUpenAg7dqqMXexMjhAT3iXys+2jFW1c1a+UQFTqLxZd7AYq7TFGISIoYxGJbYrz023mTo0HYQ8c/QmTl6szWBlq3DKvGo5QQ9IQeRieTPLKuOIsafQNS07+MSSSOQhGXIaA6UHbX4i0KkzhwDxSIAb/Qs= 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=1773524769; 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=muUJOtZm4MwAGqpaOz+3yxUHkpyjNP8uCq/dmFMvqrU1E6Ck+qHMFDHFzsfgTbGN s+Qzwr4mYCpdTPeMjr5SRvuZBpM9/yFcsBt8gDIecWZXM3bgIZMz5DsxwyImld5Wj5y bSQMdhHmYVCWLBjlId/bor6AZO39W/qbk4kP8ozo= Received: by mx.zoho.eu with SMTPS id 177352476656732.248834389593526; Sat, 14 Mar 2026 22:46:06 +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 14/15] bootconfig: add __packed definition to tools/bootconfig shim header Date: Sat, 14 Mar 2026 21:45:54 +0000 Message-Id: <20260314214555.96217-15-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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:15 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 30B2B386558 for ; Sat, 14 Mar 2026 21:46:31 +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=1773524797; cv=pass; b=OLSISBU/lvIqJje5kBcU1t+w1l5IyqlpSA6bJIs0jVUdOGmo2B93ZZNvgcvIpy6lKHzw7EQFdp2VjwTARcyjHPDn3tE9SXCzs7B0vcAPullQ6WHChGKtXKnk/S+xIPRHA7jKK5wJa6srdFAfVGpwD8L74zdFAfXjx52l19u/UI4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773524797; c=relaxed/simple; bh=zi4t+/DJAIIM5IKXISn7PUWm3n4Atoo9xTtBef2wQxI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OJDDVDm8AOHyjFQEpgngnHsXDN3jY8/gPt6Cs2+OfiAMuK3rQI3XkfMZ4odkfOG1df/mBYd/lyAPUx/RzVkS3MK+LLsOIsMzVEwS5YVxs7Ih/KyDb2Qwi9iYJMBMSgSBT8RbAtwkDD2bjJeAjTgSqqXj4NF7kMlVAvblBBQ2X48= 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=kk5FdPON; 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="kk5FdPON" ARC-Seal: i=1; a=rsa-sha256; t=1773524768; cv=none; d=zohomail.eu; s=zohoarc; b=AntJOQGpnw00zMFdma772NMbSoVMYA1NFxUdLIeeD1vgjYvsV0mv/TEhEoeMcgFWKuCKBmLPzLiYIdfHW/wlaMb7ITUXlSjtZmfAznaiTTp2eR4Yjkk/OS+rTskCH2PMeMv7SokUwKvvp6K4n0W45ExawkwIh7CUNYr2mGa6lzs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773524768; 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=f2OYTYVjLEsrHaVLhk0f1BPPR2x/RSxXyE30GvVS6lQ=; b=dDil81GPa+Qzf02498sG+m6ckyy1p4OtpQQHIpGBeOPp4MXmBvpSPHvKFLBAqjeEO9oMNEqMMgajcN6Nu1ZwGK9Ul2jAFmLDko0XeB0NQ8miJhTls9kRXvlnDg8a3NyfpGwXwP8fC+JJG2L2+Q83vxbrwut46QqBdKSbydiGalc= 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=1773524768; 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=f2OYTYVjLEsrHaVLhk0f1BPPR2x/RSxXyE30GvVS6lQ=; b=kk5FdPONbqUBNf7WKcAxLFiKEXJSb4qmyVhozKzeZQMmzqV0/KmH+Yrr0y0OiM/B 4/5kcrsy6JGDZaso+r8fYaeF9oUgNbvTCSwIwoaPeb1Qhn3y7fnnoWfKZyMHOfymtga s6CRRLwGAnsN2bj6Iy3dSetQmJslEBorR4Gf2F7w= Received: by mx.zoho.eu with SMTPS id 1773524767163269.0816044695938; Sat, 14 Mar 2026 22:46:07 +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 15/15] lib/bootconfig: return empty string instead of NULL from xbc_node_get_data() Date: Sat, 14 Mar 2026 21:45:55 +0000 Message-Id: <20260314214555.96217-16-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260314214555.96217-1-objecting@objecting.org> References: <20260314214555.96217-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_node_get_data() uses WARN_ON (non-fatal) when it detects an invalid data offset, but returns NULL. Multiple callers pass the result directly to strlen() or strcmp() without NULL checks, which would cause a NULL pointer dereference after the non-fatal warning: - xbc_node_match_prefix(): strlen(p) on line 197 - find_match_node(): strcmp(xbc_node_get_data(node), k) on line 644 - xbc_verify_tree(): strlen(xbc_node_get_data(n)) on lines 832, 853 - xbc_node_find_next_key_value(): returns NULL to caller on line 404 Return an empty string instead so the WARN_ON remains non-fatal as intended. The warning backtrace still signals corruption, but the kernel won't crash in the callers. 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 0823491221f4..fae4e6790f34 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -179,14 +179,14 @@ struct xbc_node * __init xbc_node_get_next(struct xbc= _node *node) * @node: An XBC node. * * Return the data (which is always a null terminated string) of @node. - * If the node has invalid data, warn and return NULL. + * If the node has invalid data, warn and return an empty string. */ const char * __init xbc_node_get_data(struct xbc_node *node) { int offset =3D node->data & ~XBC_VALUE; =20 if (WARN_ON(offset >=3D xbc_data_size)) - return NULL; + return ""; =20 return xbc_data + offset; } --=20 2.34.1