<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/crypto/caam, branch v6.5.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.5.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.5.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2023-09-13T07:53:07Z</updated>
<entry>
<title>crypto: caam - fix unchecked return value error</title>
<updated>2023-09-13T07:53:07Z</updated>
<author>
<name>Gaurav Jain</name>
<email>gaurav.jain@nxp.com</email>
</author>
<published>2023-08-08T10:55:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=814e0d5403c8c342a6ee8b4482394d2d07a07eeb'/>
<id>urn:sha1:814e0d5403c8c342a6ee8b4482394d2d07a07eeb</id>
<content type='text'>
[ Upstream commit e30685204711a6be40dec2622606950ccd37dafe ]

error:
Unchecked return value (CHECKED_RETURN)
check_return: Calling sg_miter_next without checking return value

fix:
added check if(!sg_miter_next)

Fixes: 8a2a0dd35f2e ("crypto: caam - strip input zeros from RSA input buffer")
Signed-off-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Meenakshi Aggarwal &lt;meenakshi.aggarwal@nxp.com&gt;
Reviewed-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "crypto: caam - adjust RNG timing to support more devices"</title>
<updated>2023-08-18T08:47:02Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2023-08-18T08:47:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=83874b8e97f895e62d9ab03223318176d5e78203'/>
<id>urn:sha1:83874b8e97f895e62d9ab03223318176d5e78203</id>
<content type='text'>
This reverts commit ef492d080302913e85122a2d92efa2ca174930f8.

This patch breaks the RNG on i.MX8MM.

Reported-by: Bastian Krause &lt;bst@pengutronix.de&gt;
Link: https://lore.kernel.org/all/e1f3f073-9d5e-1bae-f4f8-08dc48adad62@pengutronix.de/
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v6.5-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2023-07-01T04:27:13Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-07-01T04:27:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5d95ff84e62be914b4a4dabfa814e4096b05b1b0'/>
<id>urn:sha1:5d95ff84e62be914b4a4dabfa814e4096b05b1b0</id>
<content type='text'>
Pull crypto updates from Herbert Xu:
 "API:
   - Add linear akcipher/sig API
   - Add tfm cloning (hmac, cmac)
   - Add statesize to crypto_ahash

  Algorithms:
   - Allow only odd e and restrict value in FIPS mode for RSA
   - Replace LFSR with SHA3-256 in jitter
   - Add interface for gathering of raw entropy in jitter

  Drivers:
   - Fix race on data_avail and actual data in hwrng/virtio
   - Add hash and HMAC support in starfive
   - Add RSA algo support in starfive
   - Add support for PCI device 0x156E in ccp"

* tag 'v6.5-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (85 commits)
  crypto: akcipher - Do not copy dst if it is NULL
  crypto: sig - Fix verify call
  crypto: akcipher - Set request tfm on sync path
  crypto: sm2 - Provide sm2_compute_z_digest when sm2 is disabled
  hwrng: imx-rngc - switch to DEFINE_SIMPLE_DEV_PM_OPS
  hwrng: st - keep clock enabled while hwrng is registered
  hwrng: st - support compile-testing
  hwrng: imx-rngc - fix the timeout for init and self check
  KEYS: asymmetric: Use new crypto interface without scatterlists
  KEYS: asymmetric: Move sm2 code into x509_public_key
  KEYS: Add forward declaration in asymmetric-parser.h
  crypto: sig - Add interface for sign/verify
  crypto: akcipher - Add sync interface without SG lists
  crypto: cipher - On clone do crypto_mod_get()
  crypto: api - Add __crypto_alloc_tfmgfp
  crypto: api - Remove crypto_init_ops()
  crypto: rsa - allow only odd e and restrict value in FIPS mode
  crypto: geniv - Split geniv out of AEAD Kconfig option
  crypto: algboss - Add missing dependency on RNG2
  crypto: starfive - Add RSA algo support
  ...
</content>
</entry>
<entry>
<title>crypto: caam - optimize RNG sample size</title>
<updated>2023-06-23T08:15:36Z</updated>
<author>
<name>Meenakshi Aggarwal</name>
<email>meenakshi.aggarwal@nxp.com</email>
</author>
<published>2023-06-12T08:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1abc89661ad3cd18d8c6af5c2584bcc63df43bf2'/>
<id>urn:sha1:1abc89661ad3cd18d8c6af5c2584bcc63df43bf2</id>
<content type='text'>
TRNG "sample size" (the total number of entropy samples that will be taken
during entropy generation) default / POR value is very conservatively
set to 2500.

Let's set it to 512, the same as the caam driver in U-boot
(drivers/crypto/fsl_caam.c) does.

This solves the issue of RNG performance dropping after a suspend/resume
cycle on parts where caam loses power, since the initial U-boot setttings
are lost and kernel does not restore them when resuming.

Note: when changing the sample size, the self-test parameters need to be
updated accordingly.

Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Meenakshi Aggarwal &lt;meenakshi.aggarwal@nxp.com&gt;
Reviewed-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - add a test for the RNG</title>
<updated>2023-06-23T08:15:36Z</updated>
<author>
<name>Victoria Milhoan (b42089)</name>
<email>vicki.milhoan@freescale.com</email>
</author>
<published>2023-06-12T08:28:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2be0d806e25e7b068113187f9245575914daf0dc'/>
<id>urn:sha1:2be0d806e25e7b068113187f9245575914daf0dc</id>
<content type='text'>
CAAM includes a Random Number Generator.  This change adds
a kernel configuration option to test the RNG's capabilities via the
hw_random framework.

Signed-off-by: Victoria Milhoan &lt;vicki.milhoan@freescale.com&gt;
Signed-off-by: Dan Douglass &lt;dan.douglass@nxp.com&gt;
Signed-off-by: Vipul Kumar &lt;vipul_kumar@mentor.com&gt;
Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Meenakshi Aggarwal &lt;meenakshi.aggarwal@nxp.com&gt;
Reviewed-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - adjust RNG timing to support more devices</title>
<updated>2023-06-23T08:15:36Z</updated>
<author>
<name>Victoria Milhoan</name>
<email>vicki.milhoan@freescale.com</email>
</author>
<published>2023-06-12T08:26:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ef492d080302913e85122a2d92efa2ca174930f8'/>
<id>urn:sha1:ef492d080302913e85122a2d92efa2ca174930f8</id>
<content type='text'>
Adjust RNG timing parameters to support more i.MX6 devices.

Signed-off-by: Victoria Milhoan &lt;vicki.milhoan@freescale.com&gt;
Signed-off-by: Dan Douglass &lt;dan.douglass@nxp.com&gt;
Signed-off-by: Vipul Kumar &lt;vipul_kumar@mentor.com&gt;
Signed-off-by: Horia Geantă &lt;horia.geanta@nxp.com&gt;
Reviewed-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>bus: fsl-mc: Make remove function return void</title>
<updated>2023-05-30T23:58:43Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>uwe@kleine-koenig.org</email>
</author>
<published>2023-03-10T22:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=59272ad8d9e8ea6398a96f8c6d62da284bf2ae6e'/>
<id>urn:sha1:59272ad8d9e8ea6398a96f8c6d62da284bf2ae6e</id>
<content type='text'>
The value returned by an fsl-mc driver's remove function is mostly
ignored.  (Only an error message is printed if the value is non-zero
and then device removal continues unconditionally.)

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Reviewed-by: Ioana Ciornei &lt;ioana.ciornei@nxp.com&gt;
Tested-by: Ioana Ciornei &lt;ioana.ciornei@nxp.com&gt; # sanity checks
Reviewed-by: Laurentiu Tudor &lt;laurentiu.tudor@nxp.com&gt;
Tested-by: Laurentiu Tudor &lt;laurentiu.tudor@nxp.com&gt;
Signed-off-by: Li Yang &lt;leoyang.li@nxp.com&gt;
</content>
</entry>
<entry>
<title>crypto: caam - Fix soc_id matching</title>
<updated>2023-05-19T08:45:43Z</updated>
<author>
<name>Pankaj Gupta</name>
<email>pankaj.gupta@nxp.com</email>
</author>
<published>2023-05-12T15:10:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=271e3830377ab5a7512c01eca95ae39a6e7bdfcf'/>
<id>urn:sha1:271e3830377ab5a7512c01eca95ae39a6e7bdfcf</id>
<content type='text'>
Since, CAAM driver is probed before soc_device_attribute done as part of:
- drivers/soc/imx/soc-imx8m.c   (for i.MX8M)
- drivers/firmware/imx/ele_mu.c (EdgeLock Enclave kernel driver, for i.MX8ULP)

It is needed to return -EPROBE_DEFER, after calling soc_device_match() in
drivers/crypto/caam/ctrl.c.

soc_device_match returns NULL for:
- i.MX8M
- i.MX8ULP,
can be considered that the SoC device has not been probed yet.
Hence, it returns -EPROBE_DEFER directly.

caam: imx: change to use of_match_node in run_descriptor_deco0

Providing imx8m_machine_match to match:
- i.MX8M{Q,M,N,P},
- i.MX8ULP,
so as to start using of_match_node, to simplify the code.

Signed-off-by: Alice Guo &lt;alice.guo@nxp.com&gt;
Signed-off-by: Pankaj Gupta &lt;pankaj.gupta@nxp.com&gt;
Reviewed-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Reviewed-by: Horia Geanta &lt;horia.geanta@nxp.com&gt;
Acked-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Acked-by: Alice Guo &lt;alice.guo@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - refactor RNG initialization</title>
<updated>2023-05-12T10:48:01Z</updated>
<author>
<name>Horia GeantA</name>
<email>horia.geanta@nxp.com</email>
</author>
<published>2023-04-17T18:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=da2f2a039facd6d36c42d876e4b71dd80e91db0a'/>
<id>urn:sha1:da2f2a039facd6d36c42d876e4b71dd80e91db0a</id>
<content type='text'>
RNG (re-)initialization will be needed on pm resume path,
thus refactor the corresponding code out of the probe callback.

Signed-off-by: Horia GeantA &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Leonard Crestez &lt;leonard.crestez@nxp.com&gt;
Signed-off-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Signed-off-by: Meenakshi Aggarwal &lt;meenakshi.aggarwal@nxp.com&gt;
Reviewed-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: caam - OP-TEE firmware support</title>
<updated>2023-04-14T10:59:34Z</updated>
<author>
<name>Horia GeantA</name>
<email>horia.geanta@nxp.com</email>
</author>
<published>2023-04-05T09:07:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0489929f73a2b749cf409b95701bb6bd3c37cd91'/>
<id>urn:sha1:0489929f73a2b749cf409b95701bb6bd3c37cd91</id>
<content type='text'>
caam driver needs to be aware of OP-TEE f/w presence, since some things
are done differently:

1. there is no access to controller's register page (note however that
some registers are aliased in job rings' register pages)

2 Due to this, MCFGR[PS] cannot be read and driver assumes
MCFGR[PS] = b'0 - engine using 32-bit address pointers.

This is in sync with the fact that:
-all i.MX SoCs currently use MCFGR[PS] = b'0
-only i.MX OP-TEE use cases don't allow access to controller register page

Signed-off-by: Horia GeantA &lt;horia.geanta@nxp.com&gt;
Signed-off-by: Meenakshi Aggarwal &lt;meenakshi.aggarwal@nxp.com&gt;
Reviewed-by: Gaurav Jain &lt;gaurav.jain@nxp.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
