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]
Date:   Fri, 29 Jul 2022 17:13:47 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Cc:     alsa-devel@...a-project.org, Vinod Koul <vkoul@...nel.org>,
        Bard Liao <yung-chuan.liao@...ux.intel.com>,
        Sanyog Kale <sanyog.r.kale@...el.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] soundwire: sysfs: remove sdw_slave_sysfs_init()

On Fri, Jul 29, 2022 at 10:00:42AM -0500, Pierre-Louis Bossart wrote:
> 
> 
> > diff --git a/drivers/soundwire/sysfs_slave_dpn.c b/drivers/soundwire/sysfs_slave_dpn.c
> > index c4b6543c09fd..a3fb380ee519 100644
> > --- a/drivers/soundwire/sysfs_slave_dpn.c
> > +++ b/drivers/soundwire/sysfs_slave_dpn.c
> > @@ -283,6 +283,9 @@ int sdw_slave_sysfs_dpn_init(struct sdw_slave *slave)
> >  	int ret;
> >  	int i;
> >  
> > +	if (!slave->prop.source_ports && !slave->prop.sink_ports)
> > +		return 0;
> > +
> >  	mask = slave->prop.source_ports;
> >  	for_each_set_bit(i, &mask, 32) {
> >  		ret = add_all_attributes(&slave->dev, i, 1);
> 
> I am struggling with this one since the driver is still adding
> attributes manually. You mentioned in the other thread that
> 
> "
> That's what the is_visible() callback is for in the groups structure,
> you determine if the attribute is visable or not at runtime, you don't
> rely on the driver itself to add/remove attributes, that does not scale
> and again, is racy.
> "
> 
> I interpret that as "there's still a race here", no?

Yes, there is, BUT as you are creating all of these attributes "on the
fly" for now, I don't see a simple conversion to fix that up.  Let me do
these, the easy ones first.  Your dynamic attribute allocations are the
harder things to do, let me think about those after I've fixed the rest
of the tree up with the trivial ones :)

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ