From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 9E0F23F4106 for ; Thu, 9 Jul 2026 11:40:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783597240; cv=none; b=Z/tyCpCAdVv4dOYQRB0rnZJcV5fJpLxXI3vG8Zmbe+0vlvnvNDViUYzL+j0vMz/gW4RgZy1GdfwfJg0pRm6LeENKXlY3CG+QR/pP0EWOFgLeM7Sc9hSgIr5M+XASnODQMuzHQLEs2vQtUt8tpbr7w7JdrWJN1DRo12/NniXNw5k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783597240; c=relaxed/simple; bh=Y4hIf41FHJO1+YG76PY8saBfZL5rpOcw+LiVnoz5KoQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Bx5lb0Oem8mZtoB7uuw+BV+7STB47zKuygdoJ0dQYQK/1lHwpkQLbfpziEOV7wEJ7Y6QfHZppZUCfvELa6iQh5jReGRX1SFAD/HpLwbQquBpGAOM7P8NiQFCBWmuYQX97mundzbGLCYq7ZiqNMbwE0k7Ygc+Cbo2T3E330xWrCk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WXuwm1BR; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WXuwm1BR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2596B1F000E9; Thu, 9 Jul 2026 11:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783597239; bh=gl9PI4iaZLQoEkKjFkWlnA85Asut1OedrWfrXANKJdo=; h=From:To:Cc:Subject:Date; b=WXuwm1BRBGwqelTxF3Ntzn6TMIdfiSchXU7teeBGIBT61HpE7nXovD9hy9TFyPZWY RfaHu9SEJb0ZOlAVPA/Pp1FXgRFOKEDdTsCT3siHNqblcTcVtyiiTuvfwlX++c3QRI JlUcOcDhIr7Q9WRJITSwG/8vPXkM4fQIL49gX0Kn+7XM+bNdRL6P/66GEoVuYsp9jo Gy7Ny4H45DqC1MlB6FemsOh3gQ/TfF9AV508dHEaml+bv1UgyyGjIddP+7BRSZAsD7 kM1AazThd40PhpZM8i+cuelPHGVxbFG0JzObAZVxR7AQ2Ue2fy12Ut0Kw7BtE1L9km XBAWEVpXidcpw== From: "Christophe Leroy (CS GROUP)" To: Andrew Morton , Yury Norov , Rasmus Villemoes , Andy Shevchenko Cc: "Christophe Leroy (CS GROUP)" , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Erhard Furtner Subject: [PATCH] bitmap: Properly initialise destination bitmap for scatter & gather test Date: Thu, 9 Jul 2026 13:40:06 +0200 Message-ID: <67d1838732b85b1f715cc3ada5bb38dcfcf9db55.1783593992.git.chleroy@kernel.org> X-Mailer: git-send-email 2.54.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1633; i=chleroy@kernel.org; h=from:subject:message-id; bh=Y4hIf41FHJO1+YG76PY8saBfZL5rpOcw+LiVnoz5KoQ=; b=owGbwMvMwCV2d0KB2p7V54MZT6slMWT5d8yd8jlzYoDWvp3+CovPvOFXFHRsPhF4Yd3i34dbO D/LGsSZdZSyMIhxMciKKbIc/8+9a0bXl9T8qbv0YeawMoEMYeDiFICJfLNm+J8kKRAx7SJf0cd4 raf38t8tc4l/Ecmmx/+e9X3W3vdPbJsZGbZq6revvP8q3dVidWqgz8Enb9dvWcUpW2g2n8FH/Pd hEyYA X-Developer-Key: i=chleroy@kernel.org; a=openpgp; fpr=10FFE6F8B390DE17ACC2632368A92FEB01B8DD78 Content-Transfer-Encoding: 8bit Erhard reports failure of bitmap tests on powerpc: test_bitmap: loaded. test_bitmap: [lib/test_bitmap.c:397] bitmaps contents differ: expected "1,3-4,9", got "1,3-4,9,65-71,73-79,81-87,89-95,97-99" test_bitmap: parselist('0-2047:128/256'): 912 test_bitmap: scnprintf("%*pbl", '0-32767'): 5977 test_bitmap: test_bitmap_read_perf: 1191082 test_bitmap: test_bitmap_write_perf: 1270153 test_bitmap: failed 1 out of 208655 tests The happens mainly when CONFIG_INIT_STACK_ALL_PATTERN is set. Commit 6b5a4b687367 ("bitmap: Add test for out-of-boundary modifications for scatter & gather") extended the test to out-of-boundary bits, but those bits where left uninitialised. Properly initialise the entire result bitmap before the test. Reported-by: Erhard Furtner Closes: https://lore.kernel.org/all/ca3547ae-8b79-43a2-a758-23ec980bfd9a@mailbox.org Fixes: 6b5a4b687367 ("bitmap: Add test for out-of-boundary modifications for scatter & gather") Signed-off-by: Christophe Leroy (CS GROUP) --- lib/test_bitmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index 69813c10e6c0..448c3eb48a4a 100644 --- a/lib/test_bitmap.c +++ b/lib/test_bitmap.c @@ -392,6 +392,7 @@ static void __init test_bitmap_sg(void) /* Scatter/gather relationship */ bitmap_zero(bmap_tmp, 100); + bitmap_zero(bmap_res, 100); bitmap_gather(bmap_tmp, bmap_scatter, sg_mask, nbits); bitmap_scatter(bmap_res, bmap_tmp, sg_mask, nbits); expect_eq_bitmap(bmap_scatter, bmap_res, 100); -- 2.54.0