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>] [day] [month] [year] [list]
Date:	Fri, 6 Feb 2009 21:43:44 +0100
From:	Michał Mirosław <mirq-linux@...e.qmqm.pl>
To:	Jens Axboe <axboe@...nel.dk>, Pierre Ossman <drzeus-mmc@...eus.cx>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH 00/02] 32-bit PIO wrappers for scatterlists

Hello,

While writing a driver for CB710 MMC host I had to implement PIO routines
that transferred data to/from buffers described by scatterlists. As it
turned later this scheme is needed for similar devices that can't handle
[scatter-gather] DMA in hardware.

Following is my implementation of such routines that should be generic
enough to use in drivers doing PIO by 32-bit accesses (PCI based devices
or maybe other 32-bit word based busses).

Current implementation has some limitations:
1. it advances scatterlist iterator always by multiple of 4 bytes
2. it silently inserts zeroes after last byte of buffer when transferring
   data to the device (that's actually a good thing for my driver)
3. it silently ignores data that does not fit into specified buffer when
   transferring data from the device (this also is a good thing for the
   driver I wrote)

What those points mean is that driver writer has to know how many bytes
there are available in the buffer if its important, and has to use
multiple-of-4 transfer sizes when doing more than one transfer using
a single iterator.

Patches are against vanilla kernel 2.6.28.

Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ