|
|
About ::
TODO ::
Blog ::
RSS ::
Old blog ::
Projects ::
GIT ::
Gallery ::
Notes
Fri, 05 Oct 2007
Misaligned access in crypto stack and HIFN driver.
It is possible, that provided to crypto processor data
is misaligned or split between pages so that each page contains
not block size aligned chunk. In this case data has to be relocated.
Linux crypto stack provides data to underlying crypto processing driver
in scatterlists, which is essentially array of pages and appropriate
size/offset information. Thus it is possible that each page in scatterlist
has to be relocated. I will create a 'cache' of preallocated pages,
which will be used as a temporary storage for crypto data, if cache is empty,
crypto processing function will allocate new pages in its context, and then
copy data from misaligned page into given page and process it. In interrupt,
when the fact, that all pages have been processed, is confirmed,
new data will be copied back to requested destination buffer (if needed,
for example if source buffer is misaligned, but destination is ok,
second copy is not required), this can also be postponed to process context
via workqueue, but that will introduce additional latency,
which is quite noticeble (as I tested in
acrypto
crypto stack).
/devel/acrypto/hifn :: Link / Comments (0)
Uchuu.
I think it is a good idea to wake up and look at it. That is what I will draw
on my wall.
/devel/flat :: Link / Comments (3)
|