From mboxrd@z Thu Jan 1 00:00:00 1970 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 3CBC23F23B4; Wed, 18 Mar 2026 15:59: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=1773849582; cv=pass; b=Lco8rI5VSNYwb01njiMwDfHR8QlX3ySc4CZwaHMZl0ePtdwOVIWCJQrlVgsOj3WyqY2y9e1j6Rn3vZWNWpiwQWl+L719n/FSPl4wqnLkYXOvo8eFy2zaepiyqVdUjSnasfuKrxNqZ/TjOAZwO2txk0Yhl4m1emaN3QqouSdtyYs= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773849582; c=relaxed/simple; bh=EqMWAUq5/avE1mG8HKfM7kQJ2gUsjJ6VbsxnUKQBLpE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WU7wKQc1mqbW8GYKaPNDmJ8I1NQGvAP5l4Uit1l4RE2J+CiqzefWGRyZib9RsSqaMZh3191VKV/8SDOYUiOpmMZsmeUB57UOhcXFc4MbF382mz73KcK+OxJ3OXGV3nQVSfilx3juByloHjQHcQ4iRAJbDbjU/OiWWjwAl97dfgQ= 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=KgrQrXDd; 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="KgrQrXDd" ARC-Seal: i=1; a=rsa-sha256; t=1773849567; cv=none; d=zohomail.eu; s=zohoarc; b=ammtEqbAkIFlbyM+FeE8LKGIKXxWYJw9CM2oTejAqYoJB+inDL8+EGeK5Hf8gyI8AeV2UdJ1mRP79uoi6VEHcVOaCTrrcci2H4JfgJjFNqPQ0FOHwgsH6ezIjii6g58+BQbRsjJFgj1zVSlx1tz0p+gzAON61OOshbRrIDtBI9I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1773849567; 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=e5e02utD/W21D5SULgd/Z0p2eCKtDuMDRU7p34F6Lik=; b=TyoHP0Vcf7gPHeizGUAIBLJNkwFfytgFPQazv9T6pkKpC0RxS5lc7F2jFUTuW25LDoYQBthU2GibkJ3UbDfny2Dx3yV9m8rSqemZ5k4AYaY19JcDH/+kdNMTzkmjjrlnp2bPkqIkbmrBiPLZLQDEVilYzXyz5s6Hy0FHMP3uDuY= 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=1773849567; 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=e5e02utD/W21D5SULgd/Z0p2eCKtDuMDRU7p34F6Lik=; b=KgrQrXDd6Z3jWaHLlnyaNtu4Tg1qR0zvdnGmC51l4PHOY4XWjTKG/Je3qYQB1fTw 7s71SXUX61Xi/BwMj2rzBgXdANp22t4PmyJDSFkPBWBCIF23MJUs970CkphdxNXRF81 cycic6lGKvlKXJN9iy0kJ1GYYzT43x1UjMq4AkGA= Received: by mx.zoho.eu with SMTPS id 1773849566234938.1525443983288; Wed, 18 Mar 2026 16:59:26 +0100 (CET) From: Josh Law To: Masami Hiramatsu , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Josh Law Subject: [PATCH v8 12/13] lib/bootconfig: use size_t for key length tracking in xbc_verify_tree() Date: Wed, 18 Mar 2026 15:59:18 +0000 Message-Id: <20260318155919.78168-13-objecting@objecting.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260318155919.78168-1-objecting@objecting.org> References: <20260318155919.78168-1-objecting@objecting.org> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External lib/bootconfig.c:839:24: warning: conversion from 'size_t' to 'int' may change value [-Wconversion] lib/bootconfig.c:860:32: warning: conversion from 'size_t' to 'int' may change value [-Wconversion] lib/bootconfig.c:860:29: warning: conversion to 'size_t' from 'int' may change the sign of the result [-Wsign-conversion] The key length variables len and wlen accumulate strlen() results but were declared as int, causing truncation and sign-conversion warnings. Change both to size_t to match the strlen() return type and avoid mixed-sign arithmetic. 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 119c3d429c1f..272d9427e879 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -803,7 +803,8 @@ static int __init xbc_close_brace(char **k, char *n) static int __init xbc_verify_tree(void) { - int i, depth, len, wlen; + int i, depth; + size_t len, wlen; struct xbc_node *n, *m; /* Brace closing */ -- 2.34.1