Re: Class device namespaces



On Tue, Apr 28, 2009 at 8:42 PM, Kay Sievers <kay.sievers@xxxxxxxx> wrote:
On Tue, Apr 28, 2009 at 23:58, Doug Warzecha <Douglas_Warzecha@xxxxxxxx> wrote:
On Tue, Apr 28, 2009 at 07:46:57PM +0200, Kay Sievers wrote:
On Tue, Apr 28, 2009 at 19:39, Doug Warzecha <Douglas_Warzecha@xxxxxxxx> wrote:

/sys/class/firmware/dell_rbu/loading
/sys/class/firmware/dell_rbu/data

These pathes only ever exist for a fraction of a second, during a
kernel initiated firmware request. This request is usually only
handled by the udev firmware loader script, and not interesting for
anything else. Are you replacing the udev firmware script here? Are
you sure you do something else here?

A Dell library writes data to those paths when a Dell BIOS Update Package is run and requests the BIOS image to be loaded into memory.

How do you do this? These paths exist for a short time only. How do
you get udev out of your way handling the firmware request for you?
How do you plug into the event processing with a custom tool?

Overall, the interface is pretty pathetic because it doesnt fit our
use case *at all*, but way back in the day that is what we had to do
to get it reviewed and approved for merge upstream. At least it is
better than the earlier versions where we had to do a separate
request_firmware() for every 4k packet (and spin waiting for files to
disappear/reappear)

All this code is in libsmbios(*) if you want to see the ugly details,
but the short version is this:

1) we poke the image_type file and packet_size files with appropriate
data, which causes the driver to do a request firmware
2) spin until request_firmware creates the files we need
2) loop over our file packet_size bytes at a time writing data into
the data file
3) set loading to 0 when done

*) src/python/libsmbios_c/rbu_update.py

The code basically "packetizes" the bios update into page-sized chunks
with a header so BIOS can find them and reassemble them for the final
update.

For older systems (monolithic mode), the kernel code has to allocate
physically contiguous region to hold the entire firmware image.
--
Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: DLINK 614+ - SOHO routers, system DOS
    ... the flaws reported to DLINK on May 24th and posted to bugtraq have ... Rev A's latest firmware available is still 2.30 and therefore IS ... | left in an unstable state immediately followed by a system reboot. ... | along with the request or if no ip address is available for dynamic ...
    (Bugtraq)
  • Re: Class device namespaces
    ... kernel initiated firmware request. ... Are you replacing the udev firmware script here? ...
    (Linux-Kernel)
  • [NT] Atmel SNMP Non Public Community String DoS Vulnerability
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Atmel Firmware 1.3 ... If an SNMP read request is made with a community name different than ... In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages. ...
    (Securiteam)
  • asynchronous I/O problem with KMDF
    ... internal workflow or due to known firmware bugs. ... When the framework deliver a new request to my default ... it is requeued to the sequential queue otherwise. ... DeviceIoControl call. ...
    (microsoft.public.development.device.drivers)