Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1250950rdb; Fri, 22 Dec 2023 22:52:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDJ6K5ubJpqQdV+FIYkPCxJn5GGIKQbO2WtOReNr/iSYvqw+Y+r0kJjvmbkOCUYppNCKJt X-Received: by 2002:a17:906:20c3:b0:a10:e86f:5594 with SMTP id c3-20020a17090620c300b00a10e86f5594mr1470781ejc.3.1703314363268; Fri, 22 Dec 2023 22:52:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703314363; cv=none; d=google.com; s=arc-20160816; b=ugaeyYEzPvD7W1zfWVSM8WsFOp88VgPkKT9kghUwOUvXIaH0AUDbzDqd8mlYzGr3U2 ZmSSV4NB16ZfllKTh9gZPtbOLhCOPF5tBO448+ISe7qITioD88d6PFxqIsdmHKQVTR6k q5pGlR1jsyh8ugdtEZmF1wOgPcGFH3y0PcBZjPP+H4lcgJCblHLsn+bX+d1Y3DcZV826 WywKTO7RK3MYhpE6RCQ3Pev5yRex8YM/Uyy+m0dv/m1mMMAEfrcVz0weyik0mB/n8QtX nn1Mz7UoI88JLdANTy5kASppNURc6rTNSYoDTKe2VSU/DW0krLy9nU/PFA8FYa7fm8L+ /4JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=IcADzLsu4UG9h7eTRNClgqYQhedNX7PtYm9QClv1mDI=; fh=SW1pyN1WYq2qHdDXe/gkv9KGRjRmuNJ/jyJ8Ad9YHQ4=; b=h+tilUDUGvJSVmIjeEC1erjn+0EUql1K5i3Stks32ITodEzXohRxqpGnGTnCbUdqAL eTuDPPvwew+ZVi2zKRUmiUp7Y4FbtiLoNpwJZ041zAYh1JrJh/nFumbpraHajbeefo0/ pRKCqBSATmYuOTE+5Pd+WVPANuztnzuP5TaqAZZ3HS3gkI5F0x2a3j2ztoG92M3AO1tn Kt+hQbSXyGVx3F+QwR6LJ1v2+2WTbgtF+aSgcUl+6kBJuFfNbJo7UKB0Xvb7t5TehIHf 2cbCX03+7pkfxjM9br4ZLA/dci3BV/JR+1pl1g4PhtnQ4RRxaauuG7Q0bFo1CmG8Pw5e jXdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=dH9CZyN0; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=dH9CZyN0; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel+bounces-10327-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10327-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gl24-20020a170906e0d800b00a1d330e5e3asi2614940ejb.793.2023.12.22.22.52.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 22:52:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10327-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=dH9CZyN0; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=dH9CZyN0; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel+bounces-10327-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10327-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E0D3E1F22756 for ; Sat, 23 Dec 2023 06:52:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B40579C5; Sat, 23 Dec 2023 06:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="dH9CZyN0"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ZTCk+Bi9"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="dH9CZyN0"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ZTCk+Bi9" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EC7663A0; Sat, 23 Dec 2023 06:52:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6DC751F385; Sat, 23 Dec 2023 06:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1703314344; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IcADzLsu4UG9h7eTRNClgqYQhedNX7PtYm9QClv1mDI=; b=dH9CZyN06WYxbgOoDak8TeuI26yWDtVD9KuyNVFU6Hesc/P+I6zw2XKWMQ2BtnD4PtEm/p 8U/QQkAku7ZTz8XAczMwIzxxJAG0+5kZBFQHoSuV2Utqwjl023r5VfeZzPpMyZoRp2Dmph Hsb2aKaHNDWZBC0avB+B352s3uPylVE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1703314344; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IcADzLsu4UG9h7eTRNClgqYQhedNX7PtYm9QClv1mDI=; b=ZTCk+Bi9OLhZbthwCWcA53e/dPVfYLQ9Eh3UOzRVTJPVtcql9uBb4IufM0zqBR333//uKY LocEerPpiZuCd5Cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1703314344; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IcADzLsu4UG9h7eTRNClgqYQhedNX7PtYm9QClv1mDI=; b=dH9CZyN06WYxbgOoDak8TeuI26yWDtVD9KuyNVFU6Hesc/P+I6zw2XKWMQ2BtnD4PtEm/p 8U/QQkAku7ZTz8XAczMwIzxxJAG0+5kZBFQHoSuV2Utqwjl023r5VfeZzPpMyZoRp2Dmph Hsb2aKaHNDWZBC0avB+B352s3uPylVE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1703314344; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IcADzLsu4UG9h7eTRNClgqYQhedNX7PtYm9QClv1mDI=; b=ZTCk+Bi9OLhZbthwCWcA53e/dPVfYLQ9Eh3UOzRVTJPVtcql9uBb4IufM0zqBR333//uKY LocEerPpiZuCd5Cg== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id A47AE139C4; Sat, 23 Dec 2023 06:52:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id YuolFaSDhmXjOwAAn2gu4w (envelope-from ); Sat, 23 Dec 2023 06:52:20 +0000 Content-Type: text/plain; charset=utf-8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: Re: Bug in commit aa511ff8218b ("badblocks: switch to the improved badblock handling From: Coly Li In-Reply-To: <6585d5fda5183_9f731294b9@iweiny-mobl.notmuch> Date: Sat, 23 Dec 2023 14:52:07 +0800 Cc: Dan Williams , Jens Axboe , Xiao Ni , Geliang Tang , Hannes Reinecke , NeilBrown , Vishal L Verma , linux-block@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <270BD884-EF31-491C-9339-5D9ADF3BC694@suse.de> References: <6585d5fda5183_9f731294b9@iweiny-mobl.notmuch> To: Ira Weiny X-Mailer: Apple Mail (2.3774.300.61.1.2) X-Spam-Level: X-Spam-Level: X-Spamd-Result: default: False [0.37 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; BAYES_HAM(-0.03)[55.02%]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[11]; DBL_BLOCKED_OPENRESOLVER(0.00)[intel.com:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] Authentication-Results: smtp-out2.suse.de; none X-Spam-Score: 0.37 X-Spam-Flag: NO > 2023=E5=B9=B412=E6=9C=8823=E6=97=A5 02:31=EF=BC=8CIra Weiny = =E5=86=99=E9=81=93=EF=BC=9A >=20 > Coly, >=20 > Yesterday I noticed that a few of our nvdimm tests were failing. I = bisected > the problem to the following commit. >=20 > aa511ff8218b ("badblocks: switch to the improved badblock handling = code")=20 >=20 > Reverting this patch fixed our tests. >=20 > I've also dug into the code a bit and I believe the algorithm for > badblocks_check() is broken (not yet sure about the other calls). At = the > very least I see the bb->p pointer being indexed with '-1'. :-( >=20 > I did notice that this work was due to a bug report in badblock_set(). > Therefore, I'm not sure of that severity of that fix is vs a revert. = But > at this point I'm not seeing an easy fix so I'm in favor of a revert. Hi Ira, Thanks for the information reported. Let me look into the situation now. Coly Li