lkml.org 
[lkml]   [2023]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 0/3] Rust scatterlist abstractions
From
On 6/10/23 11:35 PM, Greg KH wrote:
> On Sat, Jun 10, 2023 at 05:33:47PM +0200, Greg KH wrote:
>> On Sat, Jun 10, 2023 at 06:49:06PM +0800, Qingsong Chen wrote:
>>> Hi All!
>>>
>>> This is a version of scatterlist abstractions for Rust drivers.
>>>
>>> Scatterlist is used for efficient management of memory buffers, which is
>>> essential for many kernel-level operations such as Direct Memory Access
>>> (DMA) transfers and crypto APIs.
>>>
>>> This patch should be a good start to introduce the crypto APIs for Rust
>>> drivers and to develop cipher algorithms in Rust later.
>>
>> I thought we were getting rid of the scatter list api for the crypto
>> drivers, so this shouldn't be needed going forward, right? Why not just
>> use the direct apis instead?
>
> See https://lore.kernel.org/r/ZH2hgrV6po9dkxi+@gondor.apana.org.au for
> the details of that (sorry I forgot the link first time...)

Thanks for the information. I agree that turning simple buffers into
sg-bufs is not a good idea. If I were implementing a new cipher
algorithm, I would definitely follow the `struct cipher_alg`, which
takes simple `u8 *` pointer as parameter. However, if we'd like to
utilize some existing ciphers, such as aead, we still need scatterlists
to construct an `aead_request` for further operations, util changes are
made to the underlying interface.

Qingsong Chen

\
 
 \ /
  Last update: 2023-06-12 05:51    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog