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: <YRDq530N/9uu2J0x@kroah.com>
Date:   Mon, 9 Aug 2021 10:44:23 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Muni Sekhar <munisekharrms@...il.com>
Cc:     Oliver Neukum <oneukum@...e.com>,
        kernelnewbies <kernelnewbies@...nelnewbies.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: read() via USB bus

On Mon, Aug 09, 2021 at 10:15:29AM +0200, Oliver Neukum wrote:
> 
> On 09.08.21 09:58, Muni Sekhar wrote:
> > Hi all,
> >
> > PCIe memory mapped registers can be read via readb(), readw(), readl()
> > kernel API's. Similarly what are the kernel API to read the device
> > registers via USB bus
> >
> 
> Hi,
> 
> I am afraid this is based on a fundamental misunderstanding on how
> USB works. It is based on passing messages, not reading and writing
> registers.
> 
> USB devices are primarily based on endpoints, not registers. A literal
> answer to your question would point you to the clear/set/get_feature
> standard requests of chapter 9 of the specification, but that really
> will not help you, as you are making assumption that fundamentally
> do not apply.
> 
> I hope this list stays friendly to newcomers and we will answer
> specific questions, but at this point I must advise you to first
> read an introductory book.

Along these lines, take a look at the book, Linux Device Drivers, third
edition, which is free online, as it has a chapter about USB drivers and
how they work.  That should help you out to understand the issues
involved with USB devices.

If you have specific questions after looking at that, and reading the
basic usb-skeleton.c driver in the kernel source tree, please let us
know!

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ