Article View: linux.kernel.netdev
Article #24329Re: [PATCH net 07/14] net: phy: as21xxx: Write IPC payload under ipc_lock
From: Andrew Lunn
Date: Mon, 30 Nov 2026 02:53
Date: Mon, 30 Nov 2026 02:53
22 lines
9241 bytes
9241 bytes
On Mon, Nov 30, 2026 at 02:55:14AM +0200, Cristian Ciocaltea wrote: > aeon_ipc_send_msg() writes the message payload to the shared > VEND1_IPC_DATA registers before taking ipc_lock. Two concurrent > senders may interleave, so that one overwrites the payload of the > other before the corresponding command is issued. The firmware would > then execute a command with the wrong arguments. > > Take ipc_lock before writing the payload, so that filling the data > registers and issuing the command happen atomically with respect to > other IPC users. The argument checks remain outside the lock. How theoretical is this? phylib operations are protected by the phylib mutex. That should include LEDs. What is outside of phylib is things like hwmon devices. Does this driver have any paths which don't take the phydev mutex? The patch seems theoretically valid, but does it actually bother anybody? If not, net-next. Andrew
Technical Details
Message-ID:
<a606fc71-0c68-4f69-8a43-b6193b16bff8@lunn.ch>Path:
mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373790-linux-kernel-netdev=dewy.ruReferences:
<20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com> <20261130-as21xxx-fixes-v1-7-1bd2eae6ccbc@collabora.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373790-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 07/14] net: phy: as21xxx: Write IPC payload under ipc_lock Date: Mon, 30 Nov 2026 03:53:13 +0100 Organization: Usenet Network Message-ID: <a606fc71-0c68-4f69-8a43-b6193b16bff8@lunn.ch> References: <20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com> <20261130-as21xxx-fixes-v1-7-1bd2eae6ccbc@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1315640"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:QtdoVqCZq2YeseFC2aR/RUk1xc0= sha256:Xn+GLOhaV5NqTEzqpVRWzKyRGbMyXJco/fC9Dly+Vpg= sha1:5H1iBtOaByXOrN0xslo7D/pspG8= sha256:EhJVlIDNfTkVB59B3naFBnVD8L/Tuo+z3xtZiUGlwak= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 79F83125FB8; Mon, 30 Nov 2026 05:53:36 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.151 X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=lunn.ch X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id guwwxaXvVaA7; Mon, 30 Nov 2026 05:53:34 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-373790-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id E2943125FB3; Mon, 30 Nov 2026 05:53:25 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id DFAAA6007BB; Mon, 30 Nov 2026 02:53:24 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796007201; b=LWo5pQGShokM0UlKPie6Ast0gxCBe1X2JkDpyOyHDXNg0b9Ryvmf1wnfOgN3iOl3n41j v1dfOMKTlnzgTHEEY7IBtVqbBAUzV2mj4ryKx6SnBzwmGrrk7KKvii8VKvlpzgoeckncr ec1z1gmNeXEQANZxa4vG8Oy133Zj5/+PODWC2oD5vkz0F/ivaEyw//0Ayi7EIhpjnJyXa mOihdXhTwY0+/B/g6Tl8dCu/f9QAwhrsYYEll7hrI9qHh5M/rXxNtlnMWnsXzu8M0IZ2P OAqx3uTY2ZkxT5kPJSihjx7v3rCORM0TkzmT8i4LHpu3bE5GbRgNNp5X4e/t1G49QoA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796007201; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=feD6ot6/US0JmShXLI0aeaTGOhoAbp9zK9vjFtgIgI4=; b=NiqXJkxAFIHllQ1td3A16ekEsUgjIF65qMYuzc29GWYZRy+00+kvfxXOlrXsNUyqEeqx iQxC5hTy2pjjR8pFcYkwF12EI0+325M3ADr0gtyMJQrxEsDh6lY65VRcOb/ZEzov1DyKa 3/LyYUOJXQrWyk5jzpD7HUu2Pd1g86/ebt9j0N0QIC7OV+x9BbKWv6SZzG2hunXkUTVaU R+9CP/4zZix0/AxrKbvWGeNE6/Hf2TStKerEZrksA8A3Cv15Y4sYTCKIOgQrJfHdbBQdy Px4gooUpm50HFGjCMi56fVoFpJosK9qll34m7poYxI29In6ZHRo5033sQsHVYM+Nbqg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=zHKPHaCH; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5F6F606A329; Mon, 30 Nov 2026 02:53:21 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=zHKPHaCH X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796007200; b=2NJS+7I4HN2tiDXXuRFp8LyJ2hETtuzJM8wsLMbiRLUs9rBX8NggVay186axX91rF9rz xvX3j+tBlCCggGj2wmqWfs3ZiMxqakPUx7SNGrVSX1sgcoHfdLdMjQl9g/L+07DaS2e6E 36le47rszmMnPiXUwe1B8QQC3q7+t1p1fy8rHquPSVzaaA69QSYD/TICnuVuaeL9WSSWo DQV9oQ094cAJtzVCDGk2N5C8iC3QE4BHE9OYt4vMWU3LaGSX0oGR9/Oy1sz1H2SnD3DPi i/M7LwA1OHkJF7efP2LPcYaVO1KW9T6z+NddawYwumn0UJcA/FCnWfkx4Gh2f9QvwEg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796007200; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=feD6ot6/US0JmShXLI0aeaTGOhoAbp9zK9vjFtgIgI4=; b=dG6bcqhbwZvVxU7BeSttWSc4mXlDN9YH9uKBMoci295oj23wj1ZD+MSTIRY3nX+v31G7 i9otiey372310z7Zxexb3cF86czJzoBeshK0xbFqk41UQYNSitv6TBPNKDFqz2sKCpb+B zuLnK8YachP23QUIQqscuxbYCVlgfkzc49AcCA1F09jsnFH0y/F994FV9f51NSXPwT6JP rxnyVEJbe9NSk64pi0P/AO8wRxxCmyC0lxHZZhVr9jhjBUV6vNn3mUzQML1EKJzO5+GpV hdnbThijVpD0YU9Hh0A2CEMxymB5k/RwYXpfokTeGpWsPy2afq5X3O5+u99td3EvnKg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=zHKPHaCH; arc=none smtp.remote-ip=156.67.10.101 X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94FDB606A325 for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 02:53:20 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 94FDB606A325 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=feD6ot6/US0JmShXLI0aeaTGOhoAbp9zK9vjFtgIgI4=; b=zHKPHaCHnzOCWgEEPBW2L2b1PS Nagn+bTIaSqOCbP3bjAIX7VR7RLCa8Y6XLnP/wN/0nRyguEVdJRv1DYJWbodIMNRjmGZUaclWfufn oHQT/XyPqfN++4HovhmG4UyiIi3ECcrT+ispCPwKiQm7Xbw8kac+Tfqp8/nJ3viuXmII=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xXrVx-002GSZ-5P; Mon, 30 Nov 2026 03:53:13 +0100 X-Cc: Christian Marangi <ansuelsmth@gmail.com>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, kernel@collabora.com, netdev@vger.kernel.org X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261130-as21xxx-fixes-v1-7-1bd2eae6ccbc@collabora.com>