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: <20181031104912.s3tqjl3u43ou3kwo@gofer.mess.org>
Date:   Wed, 31 Oct 2018 10:49:12 +0000
From:   Sean Young <sean@...s.org>
To:     David Howells <dhowells@...hat.com>
Cc:     Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Michael Krufky <mkrufky@...uxtv.org>,
        Brad Love <brad@...tdimension.cc>, mchehab@...nel.org,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device
 names with udev

On Wed, Oct 31, 2018 at 10:36:22AM +0000, David Howells wrote:
> Sean Young <sean@...s.org> wrote:
> 
> > > > Devices have a MAC address available, which is printed during boot:
> > 
> > Not all dvb devices have a mac address.
> 
> How do I tell?  If it's all zeros it's not there?

The mac gets populated through read_mac_address member of
dvb_usb_device_properties. If that's not called (or does not succeed), then
there is no mac address. I think you can safely assume that if it's all 0's
then it was not read.

> > Devices without a mac address shouldn't have a mac_dvb sysfs attribute,
> > I think.
> 
> I'm not sure that's possible within the core infrastructure.  It's a class
> attribute set when the class is created; I'm not sure it can be overridden on
> a per-device basis.
> 
> Possibly the file could return "" or "none" in this case?

That's very ugly. Have a look at, for example, rc-core wakeup filters:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/media/rc/rc-main.c#n1844

> > The dvb type and dvb adapter no is already present in the device name,
> > I'm not sure why this needs duplicating.
> 
> They can be used with ATTR{} in udev rules.  I'm not clear that the name can.

See my other email.

KERNEL=="dvb[0-9]+\.demux\.[0-9]+"

> > With this patch, with a usb Hauppauge Nova-T Stick I get:
> > ...
> > ==> /sys/class/dvb/dvb0.demux0/dvb_mac <==
> > 00:00:00:00:00:00
> 
> I can't say why that happens.  I don't have access to this hardware.  Should
> it have a MAC address there?  Is the MAC address getting stored in
> dvbdev->adapter->proposed_mac?  Maybe it's not getting read - on the card I
> use it's read by the cx23885 driver... I think...  The nova-t-usb2.c file
> doesn't mention proposed_mac.

This is a dib0700-type device (much older).


Sean

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ