From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 D8DF53F825E for ; Wed, 8 Jul 2026 07:43:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783496643; cv=none; b=nPNcpxjF+sjNGzATI5/eqYvqSbW1vIJy+sztqToPVuT2MhpavqIbgv6LP+BvpYEKz+Jy8a53XsyPP5quO8CIwn3Byr8ox0AspdjPKMg2GuLllWoX6Ui6r2FiQCCtxA6Xgmo+YRECo6Na8aBsXM6J5QLMPRQa/lK6s6SeTby89CM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783496643; c=relaxed/simple; bh=3lqpiIpNEzUN9lwKmVBXBp+CWylctSM96UNv4c7p21Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XvyVs35GF/m9+c18Eu3wh5QVykYmDn/QRkaaMBfCeQJb+LhLsocYQ7izGAdgJC/sxjILV4sP9yf2VQSJnIddSvRbC/J5itZzJC2c3GwjhebcSpPKPbjtD+9GrEru79RmbcYcpNRq8A/GNsZjJzR2qc7lhfUSto5HPPRl1EV6nG0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=O85Vdd2Y; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="O85Vdd2Y" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1783496633; x=1815032633; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3lqpiIpNEzUN9lwKmVBXBp+CWylctSM96UNv4c7p21Q=; b=O85Vdd2YV7UowjLiWPax9vdDNs8U+pbv3s7/2Kq8zBXOHbihZOuUo+ov lKtLUQkD07VzZyYu9n2C7XG5pnr+iX0pP5nW+2UaLtCwP6Kl8D3RDP0hj gRJ7Nrj3nI6dLK/Nruh/IB9dMD5IOMovLwx2Uxwf+R0A/1VdKrwxsCuCt UBqWRwfdULVpZyhphgW29zWWCOckoXytcOSp90TjBSyaOHIYj7pklvipU l4gD0rHrPQh700e20q6nnZfBB0lLYVj6nACDs9CHiNw6uHYIOJXS9Us1P sYWtetXjkyLW0e227e8gR+XhxVYL8RGzhs2DNUYzuEzFKxmYYB938GI14 Q==; X-CSE-ConnectionGUID: G5FhhKtZRZO34oebBjFIsg== X-CSE-MsgGUID: AbRRFMLrSL6odehzjVM/xg== X-IronPort-AV: E=McAfee;i="6800,10657,11840"; a="106948253" X-IronPort-AV: E=Sophos;i="6.25,153,1779174000"; d="scan'208";a="106948253" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2026 00:43:49 -0700 X-CSE-ConnectionGUID: 58gMj78cTua/UrqRR5ORwQ== X-CSE-MsgGUID: aZ4mf7g+Q7Kknfea4mp5nQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,153,1779174000"; d="scan'208";a="250230526" Received: from klitkey1-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.245.100]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2026 00:43:47 -0700 Date: Wed, 8 Jul 2026 10:43:44 +0300 From: Andy Shevchenko To: Erhard Furtner Cc: "Christophe Leroy (CS GROUP)" , "linuxppc-dev@lists.ozlabs.org" , linux-kernel@vger.kernel.org Subject: Re: test_bitmap fails on ppc/ppc64 on kernels v7.1.3, v7.2-rc2 Message-ID: References: <98d65de7-e5aa-4197-85bd-219eab01e572@kernel.org> 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: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Wed, Jul 08, 2026 at 01:25:01AM +0200, Erhard Furtner wrote: ... > > So there is something with your config > > Interesting! As I get the same test failure on my Talos II too. > > Anyhow, I was able to bisect the issue. Offending commit is: > > # git bisect bad > 6b5a4b68736798df1031404a2fad06d031253ef7 is the first bad commit > commit 6b5a4b68736798df1031404a2fad06d031253ef7 (HEAD) > Author: Andy Shevchenko > Date: Thu Feb 26 12:16:44 2026 +0100 > > bitmap: Add test for out-of-boundary modifications for scatter & gather > > Make sure that bitmap_scatter() and bitmap_gather() do not modify > the bits outside of the given nbits span. > > Signed-off-by: Andy Shevchenko > Signed-off-by: Yury Norov > > lib/test_bitmap.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > > Reverting this commit on top of v7.2-rc2 lets the test pass: > > test_bitmap: loaded. > test_bitmap: parselist('0-2047:128/256'): 888 > test_bitmap: scnprintf("%*pbl", '0-32767'): 6074 > test_bitmap: test_bitmap_read_perf: 1190938 > test_bitmap: test_bitmap_write_perf: 1259471 > test_bitmap: all 208655 tests passed > > Your hint about my config made me check a few options and I found the > offending one, which is INIT_STACK_ALL_PATTERN=y. On a kernel built with > INIT_STACK_ALL_ZERO=y the issue does not show up. Oh, this is nice. So, there are two (more?) options I see to mitigate the issue: - carefully copy the garbage from the stack to the expected values (effectively merge the whatever is on stack with the expected value) - allocate buffers on heap The latter seems the easiest and right thing to do (since we can't really predict if the stack pattern is the same or bitmap APIs scatters the bits just on top of the respective set or clear ones over that pattern). I will send a patch, thanks for the report and analysis! -- With Best Regards, Andy Shevchenko