<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/crypto/scatterwalk.c, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-03-15T08:21:22Z</updated>
<entry>
<title>crypto: scatterwalk - Add memcpy_sglist</title>
<updated>2025-03-15T08:21:22Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2025-03-08T12:45:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=131bdceca1f0a2d9381270dc40f898458e5e184b'/>
<id>urn:sha1:131bdceca1f0a2d9381270dc40f898458e5e184b</id>
<content type='text'>
Add memcpy_sglist which copies one SG list to another.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: scatterwalk - Change scatterwalk_next calling convention</title>
<updated>2025-03-15T08:21:22Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2025-03-08T12:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65775cf313987926e9746b0ca7f5519d297af2da'/>
<id>urn:sha1:65775cf313987926e9746b0ca7f5519d297af2da</id>
<content type='text'>
Rather than returning the address and storing the length into an
argument pointer, add an address field to the walk struct and use
that to store the address.  The length is returned directly.

Change the done functions to use this stored address instead of
getting them from the caller.

Split the address into two using a union.  The user should only
access the const version so that it is never changed.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: scatterwalk - remove obsolete functions</title>
<updated>2025-03-02T07:19:44Z</updated>
<author>
<name>Eric Biggers</name>
</author>
<published>2025-02-19T18:23:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fa94e45436c15421284c5cd24d497675b1f46433'/>
<id>urn:sha1:fa94e45436c15421284c5cd24d497675b1f46433</id>
<content type='text'>
Remove various functions that are no longer used.

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: scatterwalk - add new functions for copying data</title>
<updated>2025-03-02T07:19:43Z</updated>
<author>
<name>Eric Biggers</name>
</author>
<published>2025-02-19T18:23:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bb699e724f3a6cc5c016dad0724e7ed12bc7278b'/>
<id>urn:sha1:bb699e724f3a6cc5c016dad0724e7ed12bc7278b</id>
<content type='text'>
Add memcpy_from_sglist() and memcpy_to_sglist() which are more readable
versions of scatterwalk_map_and_copy() with the 'out' argument 0 and 1
respectively.  They follow the same argument order as memcpy_from_page()
and memcpy_to_page() from &lt;linux/highmem.h&gt;.  Note that in the case of
memcpy_from_sglist(), this also happens to be the same argument order
that scatterwalk_map_and_copy() uses.

The new code is also faster, mainly because it builds the scatter_walk
directly without creating a temporary scatterlist.  E.g., a 20%
performance improvement is seen for copying the AES-GCM auth tag.

Make scatterwalk_map_and_copy() be a wrapper around memcpy_from_sglist()
and memcpy_to_sglist().  Callers of scatterwalk_map_and_copy() should be
updated to call memcpy_from_sglist() or memcpy_to_sglist() directly, but
there are a lot of them so they aren't all being updated right away.

Also add functions memcpy_from_scatterwalk() and memcpy_to_scatterwalk()
which are similar but operate on a scatter_walk instead of a
scatterlist.  These will replace scatterwalk_copychunks() with the 'out'
argument 0 and 1 respectively.  Their behavior differs slightly from
scatterwalk_copychunks() in that they automatically take care of
flushing the dcache when needed, making them easier to use.

scatterwalk_copychunks() itself is left unchanged for now.  It will be
removed after its callers are updated to use other functions instead.

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: scatterwalk - add new functions for skipping data</title>
<updated>2025-03-02T07:19:43Z</updated>
<author>
<name>Eric Biggers</name>
</author>
<published>2025-02-19T18:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e21d01a2a3f56ee422cd155bf06c5e572523fcc1'/>
<id>urn:sha1:e21d01a2a3f56ee422cd155bf06c5e572523fcc1</id>
<content type='text'>
Add scatterwalk_skip() to skip the given number of bytes in a
scatter_walk.  Previously support for skipping was provided through
scatterwalk_copychunks(..., 2) followed by scatterwalk_done(), which was
confusing and less efficient.

Also add scatterwalk_start_at_pos() which starts a scatter_walk at the
given position, equivalent to scatterwalk_start() + scatterwalk_skip().
This addresses another common need in a more streamlined way.

Later patches will convert various users to use these functions.

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152</title>
<updated>2019-05-30T18:26:32Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-05-27T06:55:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2874c5fd284268364ece81a7bd936f3c8168e567'/>
<id>urn:sha1:2874c5fd284268364ece81a7bd936f3c8168e567</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>crypto: scatterwalk - remove 'chain' argument from scatterwalk_crypto_chain()</title>
<updated>2018-08-03T10:06:03Z</updated>
<author>
<name>Eric Biggers</name>
</author>
<published>2018-07-23T17:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8c30fbe63e4eff1b221f8db70ae5c48a9331eae0'/>
<id>urn:sha1:8c30fbe63e4eff1b221f8db70ae5c48a9331eae0</id>
<content type='text'>
All callers pass chain=0 to scatterwalk_crypto_chain().

Remove this unneeded parameter.

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: scatterwalk - Remove unnecessary aliasing check in map_and_copy</title>
<updated>2016-11-22T07:02:25Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2016-11-21T08:26:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8467f7a3620698bf3c22f0e199b550fb611a8ae'/>
<id>urn:sha1:c8467f7a3620698bf3c22f0e199b550fb611a8ae</id>
<content type='text'>
The aliasing check in map_and_copy is no longer necessary because
the IPsec ESP code no longer provides an IV that points into the
actual request data.  As this check is now triggering BUG checks
due to the vmalloced stack code, I'm removing it.

Reported-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: scatterwalk - Inline start/map/done</title>
<updated>2016-07-18T09:35:50Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2016-07-12T05:18:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac02725812cb3a814cfe1fdc2a8a59db073e7e66'/>
<id>urn:sha1:ac02725812cb3a814cfe1fdc2a8a59db073e7e66</id>
<content type='text'>
This patch inlines the functions scatterwalk_start, scatterwalk_map
and scatterwalk_done as they're all tiny and mostly used by the block
cipher walker.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: scatterwalk - Remove unnecessary BUG in scatterwalk_start</title>
<updated>2016-07-18T09:35:50Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2016-07-12T05:17:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ee732d57496b8365819dfb958bc1ff04fcd4cac'/>
<id>urn:sha1:2ee732d57496b8365819dfb958bc1ff04fcd4cac</id>
<content type='text'>
Nothing bad will happen even if sg-&gt;length is zero, so there is
no point in keeping this BUG_ON in scatterwalk_start.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
