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  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]
Date:   Wed, 27 Feb 2019 11:45:31 +0200
From:   Andy Shevchenko <>
To:     Alexandru Ardelean <>
Cc:     Jens Axboe <>,
        Anshuman Khandual <>,, Kees Cook <>,,
        Linux Kernel Mailing List <>
Subject: Re: [PATCH] lib/scatterlist: introduce sg_nents_for_dma() helper

On Wed, Feb 27, 2019 at 10:51 AM Alexandru Ardelean
<> wrote:
> From: Andy Shevchenko <>
> Sometimes the user needs to split each entry on the mapped scatter list
> due to DMA length constrains. This helper returns a number of entities
> assuming that each of them is not bigger than supplied maximum length.
> Signed-off-by: Andy Shevchenko <>
> Signed-off-by: Alexandru Ardelean <>

Hmm... Usually we don't accept generic API without users.
Do you have any use case in mind?

> Patch was sent in 2016 initially to the DMA engine sub-system.
> Link:
> This was part of a larger series:
> I'm not sure if this is supposed to go into DMAEngine or lib/scatterlist.
> It doesn't look like lib/scatterlist is managed by DMAEngine, so (by using
> the `` script) I'm sending this patch to this group of
> parties.

The problem the patch tried to solve is much deeper and correct
solution should be more generic, i.e.
each channel should provide a set of parameters, such as DMA segment
size, to the users (via DMA engine API) and users should prepare the
SG list according to the limits of the channel.
In that case we don't need to re-split/re-allocate given SG list at
all, which would simplify DMA slave drivers and their users.

We discussed this topic back in 2016 with Vinod on LPC, but seems it's
not critical to solve. My case is to improve DMA performance for 8250

With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists