From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796533407; b=blJvRf5v4BPn/LfFzlrKOof6SaqPh/1XY9yjss9f8nVQJrP3Ml2P8UH9bJSxAq8NNxlm TjqQoOJJuNHVJccCTvt1cPbuFdO4wCdvx+ctrjubp15UfHYRZ5T/XzS+a36uFl42XJ/+N 7Qqo/u+gI4E5tElrj0SilXc5FmBvL10BiT2ESfaxQpUiEFQpyJqvfem+32peH2sL12oM/ XS8cze+OwESFbmhU7Jl0Log6cO+4cSfXGyB13a0fIfXighWWFU1pttBHdtestsIZjRuUK c376WWXfcuaAf3kxw4gne0bl9JwvTgbsjkQ3R4xMMgjVRDr3SJgupDsyCnx3Q7LX68g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796533407; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=fOOTfM8e7MKIzIa/nupDgc/dhUzqff/MtvrQlSe+B3Y=; b=XETZh7U21ymzo9NLA+nNNdbQrzQ6F0ZFsT+q3bEzp15LQgul4FRIhsPT9beYOwGdWwjr NvbLd1JvXMwZnBEEoMhbJ8KQ1KLc8UeqlqgySJrLFctYeVvgDCkuw0NfGoAvb+k5gqJyM 3aUxN3rUBB8/J3ms/dxBY2VbumtHsEvdzpO6UXuS2kdOy4Epm12p3SI/HshyYGvC3+Pil iWIToTCZZ3BgXnUx9t9WdnM0SFxSrw3AaA+muxvqN9nrgSvNqTVoWT6qsc2NvhULXHrWa IIeV8CqfSOk27zef9QdrZMkvVZK8050DKEgYlNx+HVDnBopZ/IBXnVBsMpfN3MoVcQQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=HdfXvr85; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86B7F606A31F for ; Sun, 6 Dec 2026 05:03:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=HdfXvr85 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E80661F0092B; Sun, 6 Dec 2026 05:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796533407; bh=fOOTfM8e7MKIzIa/nupDgc/dhUzqff/MtvrQlSe+B3Y=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=HdfXvr85/UCwR94meXBaqvXCPJHp3AABihx5I1dXPc3OtkBvzrGhz2AvTXn2NUeQY KNf4HtJq5egDqPTRkDhHPgua8GPpoj18ZIKn0471bdJi4Vx0jkVMgAGFvonSB9+Lhl ygShkFKTrRh2bzd+u2BoabgYv64B0ZyKLkaPoUieAIi3PxF6wIP1U5ag883lTAG5m7 j04sSYNq0GJP7uTsUIZcM8XV34B3CGIWPZKNOndT1MZAgUtk9qlRe8ZbRljDRHOViq e6TGPNBtVMYtswqfIAUQ4rZhI0xIzkAtxjUoFWec2ENWH6+R322OM2ocnzx2V+ZKnj zdJQ+fYfP8UEA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3] md: reject inconsistent reshape state during assembly Reply-To: sashiko-reviews@lists.linux.dev To: "Kyuwon Cho" Cc: linux-raid@vger.kernel.org, yukuai@fygo.io In-Reply-To: <179643369147.1996725.14454060339934285854@gmail.com> References: <179643369147.1996725.14454060339934285854@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 06 Dec 2026 05:03:26 +0000 X-Mailing-List: linux-raid@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] md: Fixes trailer cites ba1b41b6b4e3 instead of f67055780caa -- commit d43e112cbe49427a0afdd161f5effdf4bbe6470e Author: Kyuwon Cho > md: reject inconsistent reshape state during assembly > > slot_store() permits a slot below raid_disks + delta_disks while a > reshape prepares additional slots. The v0.90 and v1.x validators can > copy a nonzero delta_disks from a superblock whose reshape_position is > MaxSector. The stale delta lets slot_store() pass an out-of-range slot > to a personality whose table was allocated for raid_disks only. > > KASAN reports: > > BUG: KASAN: slab-out-of-bounds in raid10_add_disk (drivers/md/raid10.c:= 2106) > Call Trace: > raid10_add_disk (drivers/md/raid10.c:2106) > slot_store (drivers/md/md.c:3370) > rdev_attr_store (drivers/md/md.c:3788) > > Validate each metadata format's raw reshape state while loading the > superblock, before it can be copied into rdev or mddev. Reject zero-disk > v1.x metadata and inactive reshape state that carries changed geometry, > direction, or data-offset fields. > > Fixes: ba1b41b6b4e3 ("md: range check slot number when manually adding a = spare.") > Closes: https://lore.kernel.org/linux-raid/179489219553.3099317.540355729= 8223708081@gmail.com/ > Signed-off-by: Kyuwon Cho [Severity: Low] Should the Fixes tag cite f67055780caa ("[PATCH] md: Checkpoint and allow restart of raid5 reshape") instead of ba1b41b6b4e3 ("md: range check slot number when manually adding a spare.")? Before that commit, the active-array branch of slot_store() calling pers->hot_add_disk() -> raid10_add_disk() had no upper-bound check on slot at all. It narrowed the active-array range and only relaxed the check in the inactive-array branch, which does not call hot_add_disk(). This patch does not touch slot_store(); it validates inactive reshape metadata in super_90_load() and super_1_load() before super_90_validate() and super_1_validate() copy it, which is behavior introduced by f67055780caa ("[PATCH] md: Checkpoint and allow restart of raid5 reshape"). --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/179643369147.199672= 5.14454060339934285854@gmail.com?part=3D1