lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7bcd7a65740a6f85637ef17ed6b6a1e3@walle.cc>
Date:   Tue, 21 Apr 2020 17:25:19 +0200
From:   Michael Walle <michael@...le.cc>
To:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Cc:     Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        "David S . Miller" <davem@...emloft.net>,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [RFC PATCH net-next 1/3] net: phy: add concept of shared storage
 for PHYs

Am 2020-04-21 01:26, schrieb Michael Walle:
> +
> +/* Represents a shared structure between different phydev's in the 
> same
> + * package, for example a quad PHY. See phy_package_join() and
> + * phy_package_leave().
> + */
> +struct phy_package_shared {
> +	int addr;
> +	refcount_t refcnt;
> +	unsigned long flags;
> +
> +	/* private data pointer */
> +	/* note that this pointer is shared between different phydevs and
> +	 * the user has to take care of appropriate locking.
> +	 */
> +	void *priv;

btw. how should a driver actually use this? I mean, it can allocate
memory if its still NULL but when will it be freed again. Do we need
a callback? Is there something better than a callback?

-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ