<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/crypto/ccp, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/crypto/ccp?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/crypto/ccp?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-29T05:44:57Z</updated>
<entry>
<title>crypto: ccp - Fix the INIT_EX data file open failure</title>
<updated>2022-04-29T05:44:57Z</updated>
<author>
<name>Jacky Li</name>
<email>jackyli@google.com</email>
</author>
<published>2022-04-14T16:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=05def5cacfa0bd5ba380116046747da07ff5bd78'/>
<id>urn:sha1:05def5cacfa0bd5ba380116046747da07ff5bd78</id>
<content type='text'>
There are 2 common cases when INIT_EX data file might not be
opened successfully and fail the sev initialization:

1. In user namespaces, normal user tasks (e.g. VMM) can change their
   current-&gt;fs-&gt;root to point to arbitrary directories. While
   init_ex_path is provided as a module param related to root file
   system. Solution: use the root directory of init_task to avoid
   accessing the wrong file.

2. Normal user tasks (e.g. VMM) don't have the privilege to access
   the INIT_EX data file. Solution: open the file as root and
   restore permissions immediately.

Fixes: 3d725965f836 ("crypto: ccp - Add SEV_INIT_EX support")
Signed-off-by: Jacky Li &lt;jackyli@google.com&gt;
Reviewed-by: Peter Gonda &lt;pgonda@google.com&gt;
Acked-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - Log when resetting PSP SEV state</title>
<updated>2022-04-21T09:53:55Z</updated>
<author>
<name>Peter Gonda</name>
<email>pgonda@google.com</email>
</author>
<published>2022-04-13T15:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a77aba3109363ae89711fa2dc3523520c760937f'/>
<id>urn:sha1:a77aba3109363ae89711fa2dc3523520c760937f</id>
<content type='text'>
Currently when the PSP returns a SECURE_DATA_INVALID error on INIT or
INIT_EX the driver retries the command once which should reset the PSP's
state SEV related state, meaning the PSP will regenerate its keying
material. This is logged with a dbg log but given this will change
system state this should be logged at a higher priority and with more
information.

Signed-off-by: Peter Gonda &lt;pgonda@google.com&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: Brijesh Singh &lt;brijesh.singh@amd.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: John Allen &lt;john.allen@amd.com&gt;
Cc: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - When TSME and SME both detected notify user</title>
<updated>2022-04-08T08:26:43Z</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2022-03-31T21:12:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4e2c87949f2b9909d3daa8d9cd4b6d5077b6e0c2'/>
<id>urn:sha1:4e2c87949f2b9909d3daa8d9cd4b6d5077b6e0c2</id>
<content type='text'>
CC_ATTR_HOST_MEM_ENCRYPT is used to relay that memory encryption has been
activated by the kernel.

As it's technically possible to enable both SME and TSME at the same time,
detect this scenario and notify the user that enabling TSME and SME at the
same time is unnecessary.

Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Acked-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - Allow PSP driver to load without SEV/TEE support</title>
<updated>2022-04-08T08:26:43Z</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2022-03-31T21:12:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=84ee393b1e82628ac7f183d8a68d8ac2cf0ed876'/>
<id>urn:sha1:84ee393b1e82628ac7f183d8a68d8ac2cf0ed876</id>
<content type='text'>
Previously the PSP probe routine would fail if both SEV and TEE were
missing.  This is possibly the case for some client parts.

As capabilities can now be accessed from userspace, it may still be
useful to have the PSP driver finish loading so that those capabilities
can be read.

Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Acked-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - Export PSP security bits to userspace</title>
<updated>2022-04-08T08:26:43Z</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2022-03-31T21:12:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=50c4decc1b15313afa31f9a99da0904fa9c9b071'/>
<id>urn:sha1:50c4decc1b15313afa31f9a99da0904fa9c9b071</id>
<content type='text'>
The PSP sets several pre-defined bits in the capabilities
register to indicate that security attributes of the platform.

Export these attributes into userspace for administrators to
confirm platform is properly locked down.

Acked-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - cache capability into psp device</title>
<updated>2022-04-08T08:25:19Z</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2022-03-31T21:12:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cac32cd4f1436b0f926a9112039d3f7ce1cd6cab'/>
<id>urn:sha1:cac32cd4f1436b0f926a9112039d3f7ce1cd6cab</id>
<content type='text'>
The results of the capability register will be used by future
code at runtime rather than just initialization.

Acked-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - ccp_dmaengine_unregister release dma channels</title>
<updated>2022-03-09T03:12:31Z</updated>
<author>
<name>Dāvis Mosāns</name>
<email>davispuh@gmail.com</email>
</author>
<published>2022-02-28T03:15:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=54cce8ecb9254f971b40a72911c6da403720a2d2'/>
<id>urn:sha1:54cce8ecb9254f971b40a72911c6da403720a2d2</id>
<content type='text'>
ccp_dmaengine_register adds dma_chan-&gt;device_node to dma_dev-&gt;channels list
but ccp_dmaengine_unregister didn't remove them.
That can cause crashes in various dmaengine methods that tries to use dma_dev-&gt;channels

Fixes: 58ea8abf4904 ("crypto: ccp - Register the CCP as a DMA...")
Signed-off-by: Dāvis Mosāns &lt;davispuh@gmail.com&gt;
Acked-by: John Allen &lt;john.allen@amd.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - remove redundant ret variable</title>
<updated>2022-01-31T00:21:36Z</updated>
<author>
<name>Minghao Chi</name>
<email>chi.minghao@zte.com.cn</email>
</author>
<published>2022-01-12T08:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=735efea69d36347c6c7a6bf6e13f032d09c63c6f'/>
<id>urn:sha1:735efea69d36347c6c7a6bf6e13f032d09c63c6f</id>
<content type='text'>
Return value from ccp_crypto_enqueue_request() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot &lt;zealci@zte.com.cn&gt;
Signed-off-by: Minghao Chi &lt;chi.minghao@zte.com.cn&gt;
Signed-off-by: CGEL ZTE &lt;cgel.zte@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - Ensure psp_ret is always init'd in __sev_platform_init_locked()</title>
<updated>2022-01-28T05:51:11Z</updated>
<author>
<name>Peter Gonda</name>
<email>pgonda@google.com</email>
</author>
<published>2022-01-10T21:18:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1e1ec11d3ec3134e05d4710f4dee5f9bd05e828d'/>
<id>urn:sha1:1e1ec11d3ec3134e05d4710f4dee5f9bd05e828d</id>
<content type='text'>
Initialize psp_ret inside of __sev_platform_init_locked() because there
are many failure paths with PSP initialization that do not set
__sev_do_cmd_locked().

Fixes: e423b9d75e77: ("crypto: ccp - Move SEV_INIT retry for corrupted data")

Signed-off-by: Peter Gonda &lt;pgonda@google.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: Brijesh Singh &lt;brijesh.singh@amd.com&gt;
Cc: Marc Orr &lt;marcorr@google.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: John Allen &lt;john.allen@amd.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ccp - remove unneeded semicolon</title>
<updated>2021-12-31T07:10:55Z</updated>
<author>
<name>Yang Li</name>
<email>yang.lee@linux.alibaba.com</email>
</author>
<published>2021-12-21T00:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ef4d891499442a156655b0c0df56bdf539897495'/>
<id>urn:sha1:ef4d891499442a156655b0c0df56bdf539897495</id>
<content type='text'>
Eliminate the following coccicheck warning:
./drivers/crypto/ccp/sev-dev.c:263:2-3: Unneeded semicolon

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
