From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72992606A32C for ; Thu, 3 Dec 2026 12:50:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=0+6U6YhR; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GRJkllpA Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 50FE7616CA; Thu, 3 Dec 2026 12:50:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id lNTFwYtp_aFt; Thu, 3 Dec 2026 12:50:26 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp3.osuosl.org 7FAC4616CF Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796302226; b=qhglU28q51BIBNTzYJv4dmNQ7fB4Ggar7h2Xc/FMzMDHBFfMVwHF0BG1xDtG8UddVqAK vu+YUjoXc0r1SnFxHyIJwUioM9IKIWq6oxu0vAapzZ2/VPYF73P8CSjESgrY6z7etj5ad uQv7oZpHnxY/KHVDVmRMTC4klPW3JgeMAgl7GyHg0lq4ZESUyzEYUZuDR1PLWqyzsJz6y S3/1nMpQE4xVrmyFYm/MiMW0vcSJROy6oc6bPbHjrFeUCWoy4GfwaGopi/NeubA+qeCjw SYoOdPVNsd95VdfckFHqiRdwuzLaftKudUtcVW6M+eGPDi7G/XPY3y1Ft6fdwPqm4Gg== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796302226; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: Received:DKIM-Signature:Message-ID:From:Subject:To:Cc:In-Reply-To: References:Content-Type:Content-Transfer-Encoding:Date:X-BeenThere: X-Mailman-Version:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Reply-To:Errors-To; bh=0fLhTqpzQ7wq62nHd2jn/CThqKLQoWclZkhjgtgLru4=; b=PmrRvtXtjJpz2Fz8hJbhyhGtVcO0C9MQt0ikNSX9j3Uu3WJjuxpbYbo51AgWaUANmxfW lRax/TAuU0fqt5LjQi5jSww8ESxBJLHztClkzAUYTYk4QrM/YhJQQ4MrZbCj07q0wVcGh SEY3yt9r332myBXRORQ0y4TE89mYbMRhbe1Uw0KJtmnf25BkaeTBCTJjNfMbIX3GdCeki RrbjWsBIFBFmXsUEBkr+t8xNGZc8fJ1PITDeQkSi1U9G/tlOAgUrKTw7Sgnmnn6lUsD5J X+eS7IjEh33v6PIWOe4d3euy/30/lT4MIqfj1PePQ/Cp23EO0kMFQQH4UfL+lY4caXg== ARC-Authentication-Results: i=1; smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1796302226; bh=0fLhTqpzQ7wq62nHd2jn/CThqKLQoWclZkhjgtgLru4=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=0+6U6YhRG1TpmR7csZ4pZhi06752JD2m7Yo/JXUYXLwYr7zS8dw6BN9asCjPf897x 1jusF2l2CZjwEpLglqCI0CWWGbFQs8Kpg6sHrGYoXWB/poTq7K6d4ZSqnhh1XPobex ANzJe8gzv7y6Mv7Hv/dHgu7j5wL+DWLQqKAlO7jhVXrIHfyd9nM9vTaJ66dsp+3JFI zPIbg1pqoNHnMtmRUoNOKuY10VOaTQvFlOeAgtZ5iDwCHrdempbHgU2tIPPvhqRId/ uh4y9+vAWE+Qz7ek3D6nPnddeoWXR4tKcdy1H6hgMAWUMV5EVg6wPcPMCqMoD5mk83 aSvqAH9+X7XDA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 7FAC4616CF; Thu, 3 Dec 2026 12:50:26 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 8C34D2C7 for ; Thu, 3 Dec 2026 12:50:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 89A8D864B7 for ; Thu, 3 Dec 2026 12:50:25 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id FcW2IVqQVZI3 for ; Thu, 3 Dec 2026 12:50:24 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org 8B025864B3 Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=sashiko-bot@kernel.org; receiver= Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GRJkllpA Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8B025864B3 for ; Thu, 3 Dec 2026 12:50:23 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 07CE760E1C; Thu, 3 Dec 2026 12:50:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A06D91F000C1; Thu, 3 Dec 2026 12:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796302222; bh=0fLhTqpzQ7wq62nHd2jn/CThqKLQoWclZkhjgtgLru4=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=GRJkllpAIvhVMsAee65KO/STax+N0/G9gyDh0UtVXCph8ljo0Eb6bdlF1Y+ipH/r6 ns7qRoztfsqST6HN8KYsbvC8y6i1CjFCXPs+7lW8Uax5AczWKnfqAOiuhHB7eZ+9tZ zA5rYOcX5MdFlKcpsZllfNnFxdJX8TCiWzTLA3EqGQum8r8h9E7JVQJwSgttnW4aj0 Sx6FhK1ufl3GZH39+XXIADT2pWwdoL+eyctbcxGRvSwWo+UZMDqU30pYKqMDfc5t1W 9cMZf3Ih9zV9CQkiONU1UOJaUr8uJP+LboxfI5iM4Y+MxPZwdu0jZXwBZpNwAKg9Y1 IFFtWP2+CUhag== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net 2/3] ice: lock VF config while changing its MSI-X vector count To: "Przemek Kitszel" Cc: intel-wired-lan@lists.osuosl.org In-Reply-To: <20261202124956.18277-3-przemyslaw.kitszel@intel.com> References: <20261202124956.18277-1-przemyslaw.kitszel@intel.com> <20261202124956.18277-3-przemyslaw.kitszel@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 12:50:22 +0000 X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce: - [Critical] ice: out-of-bounds write in ice_virt_free_irqs() [1] -- commit 5bbee42971e00f22a76c9890c04b90f5cccc427d Author: Przemek Kitszel ice: lock VF config while changing its MSI-X vector count This commit acquires vf->cfg_lock in ice_sriov_set_msix_vec_count() to prevent concurrent VF resets from racing with the VSI rebuild and queue or interrupt remapping. > diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c b/drivers/net/eth= ernet/intel/ice/ice_sriov.c > index c49f48b5ae38c..5916cf7bf914e 100644 > --- a/drivers/net/ethernet/intel/ice/ice_sriov.c > +++ b/drivers/net/ethernet/intel/ice/ice_sriov.c [ ... ] > @@ -1012,6 +1017,7 @@ int ice_sriov_set_msix_vec_count(struct pci_dev *vf= _dev, int msix_vec_count) > =20 > vf->first_vector_idx =3D ice_virt_get_irqs(pf, vf->num_msix); > if (vf->first_vector_idx < 0) { > + mutex_unlock(&vf->cfg_lock); > ice_put_vf(vf); > return -EINVAL; > } [Severity: Critical] This problem wasn't introduced by this patch, but if ice_vsi_rebuild() fails after ice_virt_get_irqs() succeeded, can jumping to unroll cause an out-of-bounds bitmap write in ice_virt_free_irqs() [1]? The unroll path does not free the newly allocated vectors before calling ice_virt_get_irqs() again to restore prev_msix. If the tracker bitmap is exhausted and that second ice_virt_get_irqs() fails, vf->first_vector_idx is left set to -ENOENT while the VF remains active. When SR-IOV is later disabled, ice_free_vfs() passes the negative vf->first_vector_idx to ice_virt_free_irqs(), where the u32 index parameter converts it into a large unsigned offset and bitmap_clear() writes past the end of pf->virt_irq_tracker.bm: drivers/net/ethernet/intel/ice/ice_irq.c:ice_virt_free_irqs() { bitmap_clear(pf->virt_irq_tracker.bm, index - pf->virt_irq_tracker.base, irqs); } [1] https://sashiko.dev/#/bug/linux-2f7f0b58-cb12-4cdb-9375-aab49c0f5d75 --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202124956.1827= 7-1-przemyslaw.kitszel@intel.com?part=3D2