From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6D80B1A0712 for ; Wed, 7 Jan 2026 20:35:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767818111; cv=none; b=RLuYm11cx5fCYyHHmNz+6RcFwufXqV8+tqRzYg7ZvQhefieSB4/RRSeTezR9zyp6YdiTZ7GQjJbS1i40oYZzLNCC4ebfZm9hZUaPLmdaXkX2aa06hKgmB6Cu4VLnxH3i0NiEgkRYW4hiqbY3qELWpEEbdH7svge0scv7DH3eCws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767818111; c=relaxed/simple; bh=h4cBJCAS8phBjTuPRVfF5cC3Xcc24GNcSSX7Gqlqono=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O/iM0AGYBlXAH8kpCCmSmeMz67TWiZBFWNAW8nqD/ic03bvo4Fdnh/RMTPrS2T5//hp3Xgbi6+amzudvmvHDsJq081oiol+FhYH6RAt+kH2uMahsBg8AesJkr/S5m4aO99ZEQ+0oQGWBoTakpfit8LrtThJGQralfUG+4hSCBr8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jWgZr9Kv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jWgZr9Kv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E1E3C16AAE; Wed, 7 Jan 2026 20:35:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767818111; bh=h4cBJCAS8phBjTuPRVfF5cC3Xcc24GNcSSX7Gqlqono=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jWgZr9KvnalUp/1JfMjgY+amZynxXQApAEqF19vObH8hKdki+r5H6t2SC9RPpaFFn 3vRfXAq/kRYDoeQ3MiCAwytjCKJJl7nyGv3fkAy8c8WfdWWOnXFQqk9mvRgWlgFKNI npGXKe5LUSxxN/pbq5GD5NLzfGMy+i1gRePSoYoSJ0fLKaEBs7MLScAZ7lRyK5xG+t mEMlYqwP+4BsHOg4SLsBisRPYkT23vZz8OabeqHZfBMb3SeimCotE9W4SAmNVL/gc2 WYHU9qKAFPUyGfshr29tgokoT8bTwprEiOS/dUslGUY343YvP1Sj38Wm8REhi+0pQ1 vcULcRyi15jPw== Date: Wed, 7 Jan 2026 12:35:10 -0800 From: Kees Cook To: Erhard Furtner Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, Alessandro Carminati , Peter Zijlstra Subject: Re: WARNING: CPU: 27 PID: 7051 at lib/math/int_log.c:63 intlog2+0xaa/0xe0 at running int_log_kunit test (v6.15-rc1) Message-ID: <202601071229.C721443D5@keescook> References: <20250408200208.40f56431@outsider.home> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jan 06, 2026 at 11:17:33PM +0100, Erhard Furtner wrote: > Greetings! > > Still getting this warning on kernel v6.18.3 and v6.19-rc4 when running > int_log_kunit test via modprobe on my systems (x86_64, x86, ppc). This dmesg > is from my Intel Core Ultra 7 265F system: > > [...] > KTAP version 1 > 1..1 > KTAP version 1 > # Subtest: math-int_log > # module: int_log_kunit > 1..2 > KTAP version 1 > # Subtest: intlog2_test > ------------[ cut here ]------------ > 1 > WARNING: lib/math/int_log.c:63 at intlog2+0x59/0x70, CPU#16: This is: if (unlikely(value == 0)) { WARN_ON(1); return 0; } > [...] > ? kthreads_online_cpu+0xf0/0xf0 > ? kthreads_online_cpu+0xf0/0xf0 > ret_from_fork_asm+0x11/0x20 > > ---[ end trace 0000000000000000 ]--- > ok 1 Log base 2 of 0 Whcih seems to be exactly what is being tested... It seems like we have another case of needed to silence warnings under kunit[1]. Alessandro and Peter, where does the linked series stand currently? -Kees [1] https://lore.kernel.org/lkml/20250526132755.166150-1-acarmina@redhat.com/ -- Kees Cook