I discovered something strange. In both F30 and Rawhide (F31) the file /sys/kernel/debug/usb/devices is empty. That is it's a file of 0 bytes. This file used to contain all the information about connected USB devices. Does anyone know if this is part of an intended change or is it a bug? If it is an intended change, how does one get the information on connected USB devices now?
Have a Great Day!
Pat (tablepc)
I think you will find the file is not truly empty. /sys is not an actual file system, merely an interface to kernel information. There is no directory structure that records the length or other attributes of a file, as is the case for data on real media such as disks.
If you read the /sys/kernel/debug/usb/devices file, you should find the data you seek.
On Thu, Jun 6, 2019 at 9:49 AM Richard Ryniker ryniker@alum.mit.edu wrote:
I think you will find the file is not truly empty. /sys is not an actual file system, merely an interface to kernel information. There is no directory structure that records the length or other attributes of a file, as is the case for data on real media such as disks.
If you read the /sys/kernel/debug/usb/devices file, you should find the data you seek.
[root@fmac ~]# ls -l /sys/kernel/debug/usb/devices -r--r--r--. 1 root root 0 Jun 6 10:11 /sys/kernel/debug/usb/devices [root@fmac ~]# cat /sys/kernel/debug/usb/devices cat: /sys/kernel/debug/usb/devices: Operation not permitted [root@fmac ~]#
5.2.0-0.rc3.git1.1.fc31.x86_64
On Thu, 2019-06-06 at 11:15 -0600, Chris Murphy wrote:
On Thu, Jun 6, 2019 at 9:49 AM Richard Ryniker ryniker@alum.mit.edu wrote:
I think you will find the file is not truly empty. /sys is not an actual file system, merely an interface to kernel information. There is no directory structure that records the length or other attributes of a file, as is the case for data on real media such as disks.
If you read the /sys/kernel/debug/usb/devices file, you should find the data you seek.
[root@fmac ~]# ls -l /sys/kernel/debug/usb/devices -r--r--r--. 1 root root 0 Jun 6 10:11 /sys/kernel/debug/usb/devices [root@fmac ~]# cat /sys/kernel/debug/usb/devices cat: /sys/kernel/debug/usb/devices: Operation not permitted [root@fmac ~]#
5.2.0-0.rc3.git1.1.fc31.x86_64
Try it with enforcing=0 ?
On Thu, 06 Jun 2019 10:45:23 -0700 Adam Williamson adamwill@fedoraproject.org wrote:
On Thu, 2019-06-06 at 11:15 -0600, Chris Murphy wrote:
On Thu, Jun 6, 2019 at 9:49 AM Richard Ryniker ryniker@alum.mit.edu wrote:
I think you will find the file is not truly empty. /sys is not an actual file system, merely an interface to kernel information. There is no directory structure that records the length or other attributes of a file, as is the case for data on real media such as disks.
If you read the /sys/kernel/debug/usb/devices file, you should find the data you seek.
[root@fmac ~]# ls -l /sys/kernel/debug/usb/devices -r--r--r--. 1 root root 0 Jun 6 10:11 /sys/kernel/debug/usb/devices [root@fmac ~]# cat /sys/kernel/debug/usb/devices cat: /sys/kernel/debug/usb/devices: Operation not permitted [root@fmac ~]#
5.2.0-0.rc3.git1.1.fc31.x86_64
Try it with enforcing=0 ?
it's https://bugzilla.redhat.com/show_bug.cgi?id=1658675 I suppose, need to ping the kernel team ...
Dan
This seems to depend on kernel version. On one F30 system it works:
[root@yoga ryniker]# uname -r 5.0.17-300.fc30.x86_64 [root@yoga ryniker]# ls -l /sys/kernel/debug/usb/devices -r--r--r--. 1 root root 0 May 30 09:59 /sys/kernel/debug/usb/devices [root@yoga ryniker]# cat /sys/kernel/debug/usb/devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 2 B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1d6b ProdID=0002 Rev= 5.00 S: Manufacturer=Linux 5.0.17-300.fc30.x86_64 ehci_hcd S: Product=EHCI Host Controller S: SerialNumber=0000:00:1d.0 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 8 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=8087 ProdID=8001 Rev= 0.03 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=256ms ...
while on another, with the latest (non-test) kernel, it fails:
[root@puget ryniker]# uname -r 5.1.6-300.fc30.x86_64 [root@puget ryniker]# ls -l /sys/kernel/debug/usb/devices -r--r--r--. 1 root root 0 Jun 6 08:11 /sys/kernel/debug/usb/devices [root@puget ryniker]# cat /sys/kernel/debug/usb/devices cat: /sys/kernel/debug/usb/devices: Operation not permitted
Are either of those using EFI with secure boot? According to the bug report, that's the trigger.
I believe you are right. To my surprise, after inspection of the BIOS displays in the machine that does allow data access, I find no mention at all of secure boot capability.
The machine that does not allow access to /sys/kernel/debug/usb/devices supports secure boot, although I think it used to provide access to this data. Some configuration change to the secure boot facility is the likely explanation for this variation.
On 6/6/19 1:22 PM, Richard Ryniker wrote:
Are either of those using EFI with secure boot? According to the bug report, that's the trigger.
I believe you are right. To my surprise, after inspection of the BIOS displays in the machine that does allow data access, I find no mention at all of secure boot capability.
The machine that does not allow access to /sys/kernel/debug/usb/devices supports secure boot, although I think it used to provide access to this data. Some configuration change to the secure boot facility is the likely explanation for this variation.
From a few posts upthread: https://bugzilla.redhat.com/show_bug.cgi?id=1658675
On 6/6/19 13:45, Adam Williamson wrote:
On Thu, 2019-06-06 at 11:15 -0600, Chris Murphy wrote:
On Thu, Jun 6, 2019 at 9:49 AM Richard Ryniker ryniker@alum.mit.edu wrote:
I think you will find the file is not truly empty. /sys is not an actual file system, merely an interface to kernel information. There is no directory structure that records the length or other attributes of a file, as is the case for data on real media such as disks.
If you read the /sys/kernel/debug/usb/devices file, you should find the data you seek.
[root@fmac ~]# ls -l /sys/kernel/debug/usb/devices -r--r--r--. 1 root root 0 Jun 6 10:11 /sys/kernel/debug/usb/devices [root@fmac ~]# cat /sys/kernel/debug/usb/devices cat: /sys/kernel/debug/usb/devices: Operation not permitted [root@fmac ~]#
5.2.0-0.rc3.git1.1.fc31.x86_64
Try it with enforcing=0 ?
I just tried permissive mode with the same result. I've just looked through of the "files" in debug and they are all empty; so I'm guessing that the kernel folks turned this off.
That's okay, it was a reach given how things have been changing and I wouldn't want to be running in permissive mode to get the info. I hear there is a new interface to get information on connected USB devices that ordinary users can access. I think I will investigate that. Who knows, I may end up writing a little code that someone else might find useful.
Thanks everyone for trying to help.
Have a Great Day!
Pat (tablepc)
On 6/6/19 11:11 AM, pmkellly@frontier.com wrote:
On 6/6/19 13:45, Adam Williamson wrote:
On Thu, 2019-06-06 at 11:15 -0600, Chris Murphy wrote:
On Thu, Jun 6, 2019 at 9:49 AM Richard Ryniker ryniker@alum.mit.edu wrote:
I think you will find the file is not truly empty. /sys is not an actual file system, merely an interface to kernel information. There is no directory structure that records the length or other attributes of a file, as is the case for data on real media such as disks.
If you read the /sys/kernel/debug/usb/devices file, you should find the data you seek.
[root@fmac ~]# ls -l /sys/kernel/debug/usb/devices -r--r--r--. 1 root root 0 Jun 6 10:11 /sys/kernel/debug/usb/devices [root@fmac ~]# cat /sys/kernel/debug/usb/devices cat: /sys/kernel/debug/usb/devices: Operation not permitted [root@fmac ~]#
5.2.0-0.rc3.git1.1.fc31.x86_64
Try it with enforcing=0 ?
I just tried permissive mode with the same result. I've just looked through of the "files" in debug and they are all empty; so I'm guessing that the kernel folks turned this off.
By empty, do you mean there's no content, or that you get a permission error as above?
On 6/6/19 14:25, Samuel Sieb wrote:
On 6/6/19 11:11 AM, pmkellly@frontier.com wrote:
On 6/6/19 13:45, Adam Williamson wrote:
On Thu, 2019-06-06 at 11:15 -0600, Chris Murphy wrote:
On Thu, Jun 6, 2019 at 9:49 AM Richard Ryniker ryniker@alum.mit.edu wrote:
I think you will find the file is not truly empty. /sys is not an actual file system, merely an interface to kernel information. There is no directory structure that records the length or other attributes of a file, as is the case for data on real media such as disks.
If you read the /sys/kernel/debug/usb/devices file, you should find the data you seek.
[root@fmac ~]# ls -l /sys/kernel/debug/usb/devices -r--r--r--. 1 root root 0 Jun 6 10:11 /sys/kernel/debug/usb/devices [root@fmac ~]# cat /sys/kernel/debug/usb/devices cat: /sys/kernel/debug/usb/devices: Operation not permitted [root@fmac ~]#
5.2.0-0.rc3.git1.1.fc31.x86_64
Try it with enforcing=0 ?
I just tried permissive mode with the same result. I've just looked through of the "files" in debug and they are all empty; so I'm guessing that the kernel folks turned this off.
By empty, do you mean there's no content, or that you get a permission error as above? _______________________________________________ test mailing list -- test@lists.fedoraproject.org To unsubscribe send an email to test-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/test@lists.fedoraproject.org
when operating as root the files show as 0 bytes and I get "Operation not permitted" when I try cat.
Have a GReat Day!
Pat (tablepc)
On 6/6/19 11:32 AM, pmkellly@frontier.com wrote:
On 6/6/19 14:25, Samuel Sieb wrote:
On 6/6/19 11:11 AM, pmkellly@frontier.com wrote:
On 6/6/19 13:45, Adam Williamson wrote:
Try it with enforcing=0 ?
I just tried permissive mode with the same result. I've just looked through of the "files" in debug and they are all empty; so I'm guessing that the kernel folks turned this off.
By empty, do you mean there's no content, or that you get a permission error as above?
when operating as root the files show as 0 bytes and I get "Operation not permitted" when I try cat.
As has been mentioned in this thread several times, all files in /sys (and /proc) show as 0 bytes because they are virtual files. The important part is that you are getting the permission error which appears to be a known issue. You could possibly avoid that error for now by turning off secure boot.
On Thu, Jun 6, 2019 at 6:05 AM pmkellly@frontier.com pmkellly@frontier.com wrote:
I discovered something strange. In both F30 and Rawhide (F31) the file /sys/kernel/debug/usb/devices is empty. That is it's a file of 0 bytes. This file used to contain all the information about connected USB devices. Does anyone know if this is part of an intended change or is it a bug? If it is an intended change, how does one get the information on connected USB devices now?
Everything below /sys/ is a pseudo file created by the kernel. I'd guess something changed there. You could ask on the Fedora kernel list.
It may be that USB debugging is off on regular kernels and only enabled on debug kernels.
On 6/6/19 13:11, Chris Murphy wrote:
On Thu, Jun 6, 2019 at 6:05 AM pmkellly@frontier.com pmkellly@frontier.com wrote:
I discovered something strange. In both F30 and Rawhide (F31) the file /sys/kernel/debug/usb/devices is empty. That is it's a file of 0 bytes. This file used to contain all the information about connected USB devices. Does anyone know if this is part of an intended change or is it a bug? If it is an intended change, how does one get the information on connected USB devices now?
Everything below /sys/ is a pseudo file created by the kernel. I'd guess something changed there. You could ask on the Fedora kernel list.
It may be that USB debugging is off on regular kernels and only enabled on debug kernels.
Thanks for trying. I knew this was a pseudo file, but in prior versions I was able to open and read the file as root. I guess I will try asking at the kernel list.
Have a Great Day!
Pat (tablepc)