<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/crypto/ahash.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-04-12T01:33:09Z</updated>
<entry>
<title>crypto: ahash - Disable request chaining</title>
<updated>2025-04-12T01:33:09Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2025-04-11T07:14:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2e689baf220408aff8ee5dfb4edb0817e1632bb'/>
<id>urn:sha1:b2e689baf220408aff8ee5dfb4edb0817e1632bb</id>
<content type='text'>
Disable hash request chaining in case a driver that copies an
ahash_request object by hand accidentally triggers chaining.

Reported-by: Manorit Chawdhry &lt;m-chawdhry@ti.com&gt;
Fixes: f2ffe5a9183d ("crypto: hash - Add request chaining API")
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Tested-by: Manorit Chawdhry &lt;m-chawdhry@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hash - Fix synchronous ahash chaining fallback</title>
<updated>2025-03-21T23:25:19Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2025-03-21T08:43:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=108ce629cf73a3df32fa04b17aedc97c1431b2ac'/>
<id>urn:sha1:108ce629cf73a3df32fa04b17aedc97c1431b2ac</id>
<content type='text'>
The synchronous ahash fallback code paths are broken because the
ahash_restore_req assumes there is always a state object.  Fix this
by removing the state from ahash_restore_req and localising it to
the asynchronous completion callback.

Also add a missing synchronous finish call in ahash_def_digest_finish.

Fixes: f2ffe5a9183d ("crypto: hash - Add request chaining API")
Fixes: 439963cdc3aa ("crypto: ahash - Add virtual address support")
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hash - Use nth_page instead of doing it by hand</title>
<updated>2025-03-21T09:33:39Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2025-03-14T03:27:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce3313560c7ea56f0af76853658959d8363a639f'/>
<id>urn:sha1:ce3313560c7ea56f0af76853658959d8363a639f</id>
<content type='text'>
Use nth_page instead of adding n to the page pointer.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hash - Fix test underflow in shash_ahash_digest</title>
<updated>2025-03-21T09:33:38Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2025-03-13T05:14:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=480db5009571aa8d7f39b0357a6fd337fa3caf31'/>
<id>urn:sha1:480db5009571aa8d7f39b0357a6fd337fa3caf31</id>
<content type='text'>
The test on PAGE_SIZE - offset in shash_ahash_digest can underflow,
leading to execution of the fast path even if the data cannot be
mapped into a single page.

Fix this by splitting the test into four cases:

1) nbytes &gt; sg-&gt;length: More than one SG entry, slow path.
2) !IS_ENABLED(CONFIG_HIGHMEM): fast path.
3) nbytes &gt; (unsigned int)PAGE_SIZE - offset: Two highmem pages, slow path.
4) Highmem fast path.

Fixes: 5f7082ed4f48 ("crypto: hash - Export shash through hash")
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ahash - Set default reqsize from ahash_alg</title>
<updated>2025-02-22T08:09:05Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2025-02-16T03:07:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e01aaa1033d6e40f8d7cf4f20931a61ce9e3f04'/>
<id>urn:sha1:9e01aaa1033d6e40f8d7cf4f20931a61ce9e3f04</id>
<content type='text'>
Add a reqsize field to struct ahash_alg and use it to set the
default reqsize so that algorithms with a static reqsize are
not forced to create an init_tfm function.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ahash - Add virtual address support</title>
<updated>2025-02-22T08:09:02Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2025-02-16T03:07:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=439963cdc3aa447dfd3b5abc05fcd25cef4d22dc'/>
<id>urn:sha1:439963cdc3aa447dfd3b5abc05fcd25cef4d22dc</id>
<content type='text'>
This patch adds virtual address support to ahash.  Virtual addresses
were previously only supported through shash.  The user may choose
to use virtual addresses with ahash by calling ahash_request_set_virt
instead of ahash_request_set_crypt.

The API will take care of translating this to an SG list if necessary,
unless the algorithm declares that it supports chaining.  Therefore
in order for an ahash algorithm to support chaining, it must also
support virtual addresses directly.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: hash - Add request chaining API</title>
<updated>2025-02-22T08:01:53Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2025-02-16T03:07:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f2ffe5a9183d22eec718edac03e8bfcedf4dee70'/>
<id>urn:sha1:f2ffe5a9183d22eec718edac03e8bfcedf4dee70</id>
<content type='text'>
This adds request chaining to the ahash interface.  Request chaining
allows multiple requests to be submitted in one shot.  An algorithm
can elect to receive chained requests by setting the flag
CRYPTO_ALG_REQ_CHAIN.  If this bit is not set, the API will break
up chained requests and submit them one-by-one.

A new err field is added to struct crypto_async_request to record
the return value for each individual request.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ahash - Only save callback and data in ahash_save_req</title>
<updated>2025-02-22T07:59:59Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2025-02-16T03:07:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=075db21426b17609e2374274751b761e35d39664'/>
<id>urn:sha1:075db21426b17609e2374274751b761e35d39664</id>
<content type='text'>
As unaligned operations are supported by the underlying algorithm,
ahash_save_req and ahash_restore_req can be greatly simplified to
only preserve the callback and data.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ahash - use str_yes_no() helper in crypto_ahash_show()</title>
<updated>2025-02-22T07:56:03Z</updated>
<author>
<name>Thorsten Blum</name>
</author>
<published>2025-02-10T10:04:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77cb2f63ad6c546267b2fcb428cf9fceedef279a'/>
<id>urn:sha1:77cb2f63ad6c546267b2fcb428cf9fceedef279a</id>
<content type='text'>
Remove hard-coded strings by using the str_yes_no() helper function.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ahash - make hash walk functions private to ahash.c</title>
<updated>2025-01-04T00:53:47Z</updated>
<author>
<name>Eric Biggers</name>
</author>
<published>2024-12-27T22:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7fa4817340161a34d5b4ca39e96d6318d37c1d3a'/>
<id>urn:sha1:7fa4817340161a34d5b4ca39e96d6318d37c1d3a</id>
<content type='text'>
Due to the removal of the Niagara2 SPU driver, crypto_hash_walk_first(),
crypto_hash_walk_done(), crypto_hash_walk_last(), and struct
crypto_hash_walk are now only used in crypto/ahash.c.  Therefore, make
them all private to crypto/ahash.c.  I.e. un-export the two functions
that were exported, make the functions static, and move the struct
definition to the .c file.  As part of this, move the functions to
earlier in the file to avoid needing to add forward declarations.

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
