From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796044840; b=QGSyQ7+GOgYBA3H1sK3sRvM5pBgH5aAuC2fmENBJaLdK3l3wEZ4hC0r2f75Lm8XSuJtK SqO5WO2jH4e4nvpJo5YAss12rM/RPyapQxcXsRQAISJcjkDOJOoEyTqw3301/HN0wy6oj tQF0iBqto9DZqGUG44y7IK1hxgRtxIiUkHzTAv5ossbgyG0AoH+MVAFPdeVig+BcoE7wX i6x7LJ+bmWoT+IN7tZtYnN2mJRtHG01+KIEmlR8GUz46vDhAgmnr1Jhukj0KoToI1UK/W vsmJE06wL+/egXgT5B2dPX05dvOd1/pWtFuhxSgL1Glf95xxSt+6/XIFm32YzFEp+fQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796044840; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding:X-Scanned-By; bh=T7EIljKJOuve1UeC4Uf6FlBZ93eW6Y6RKjh0VwMLjeU=; b=Vhd+jUr+YTC4bc5luw5I01tEF//IqiU6DIkEOMskuH3zXQWx2mU0CzGEa2wYX5UCABv1 Zzm4UJC0zhdYJlpf4ujmb5PjKqsDRim1Z+MQhEUAUXrJKxs/8dOeEyWI/arL0O5SuyIcT OIppt0z9UOiiGhb2gdYxGlYZv6SWxYyn1GrV9nXkx7ktlXusuHjiRTkGGmBnhika1Ycl7 p2tn5vGd1cJ1YttFq382e/ryjn4xMqv9e3DiawdaFM+19vuIvOyVIJyMdGB5yD7m7hAxI +kACSZrDxYLeqBjmWXvdfW5Lv/5XIOvsOkrgVbccSLQ5+A5UCVgwRblxa1v+vitR90A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=i1y94lnC; arc=none smtp.remote-ip=170.10.133.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 E101C606A31C for ; Mon, 30 Nov 2026 13:20:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E101C606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=i1y94lnC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796044840; h=from:from:reply-to:subject:subject: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=T7EIljKJOuve1UeC4Uf6FlBZ93eW6Y6RKjh0VwMLjeU=; b=i1y94lnCfyMswIaEEYrnONVROxflmRGlraC3qn9vIpgPZRu4MWIQQotM6PxwfETH8EUcXP N6Y0suftrXZ2/XzY3bABfqDaPt5671rnY5Ui7AHZGaHgl2KYXQLGU8SiO2OiSAKomJ6qNX 5qNrr3DPxA/svzP3PwgkAdzYsiQRfBc= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-286-_C2B3JSHObSXnRGx1QJCIQ-1; Mon, 30 Nov 2026 13:20:31 +0000 X-MC-Unique: _C2B3JSHObSXnRGx1QJCIQ-1 X-Mimecast-MFC-AGG-ID: _C2B3JSHObSXnRGx1QJCIQ_1796044828 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 88B9D195C241; Mon, 30 Nov 2026 13:20:27 +0000 (UTC) Received: from poros-thinkpadp16vgen1.redhat.corp (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3BBBC1955F70; Mon, 30 Nov 2026 13:20:20 +0000 (UTC) From: Petr Oros To: netdev-bot+sashiko@kernel.org Cc: Petr Oros , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Przemek Kitszel , Andrew Lunn , Aleksandr Loktionov , Simon Horman , Michal Swiatkowski , Grzegorz Nitka , Paul Menzel , Wojciech Drewek , Marcin Szycik , Martyna Szapar-Mudlaw , Ivan Vecera , Alice Michael , Jacob Keller , Jesse Brandeburg , Patryk Holda , Rinitha S , Aaron Ma , netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net v5 2/4] ice: do not leave switchdev mode while representors exist Date: Mon, 30 Nov 2026 14:20:05 +0100 Message-ID: <20261130132009.1176908-2-poros@redhat.com> In-Reply-To: <179585820824.3135.14448452752875011743@kernel.org> References: <20261127085714.1207361-3-poros@redhat.com> <179585820824.3135.14448452752875011743@kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 On Sat, 28 Nov 2026 09:30:08 +0000, netdev-bot+sashiko@kernel.org wrote: > - [Medium] The new `xa_empty(&pf->eswitch.reprs)` check in > ice_eswitch_mode_set() is protected only by the PF devlink lock, which… Right. v6 checks pf->dyn_ports instead, which only changes under that lock. > - [Low] The commit message understates what this patch fixes. Right. On the E810-C without the patch, devlink port del of the SF port after the switch to legacy returned 0, the representor netdev stayed registered, and KASAN reported a slab use after free in devlink_nl_port_fill() when the port list was read. The v6 message says so. > - [Low] In ice_eswitch_mode_set(), the new > `!xa_empty(&pf->eswitch.reprs)` check (ice_eswitch.c:358) runs before… Right. v6 checks only on the way to legacy. With an SF port and DCB on, switchdev_inactive gets EINVAL "ice: Unknown eswitch mode" again, as without the patch. > - [Low] The new gate checks whether pf->eswitch.reprs is empty, not > whether SF ports exist. v6 checks the SF ports. The failed xa_insert() in ice_eswitch_update_repr() itself is older than the series, from commit fff5cca345a6 ("ice: update representor when VSI is ready"), and is not changed here. pw-bot: cr