[PATCH] KEYS: Reduce smp_mb() calls in key_put()

2025-04-30 Thread Jarkko Sakkinen
Rely only on the memory ordering of spin_unlock() when setting KEY_FLAG_FINAL_PUT under key->user->lock in key_put(). Signed-off-by: Jarkko Sakkinen --- security/keys/key.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/security/keys/key.c b/security/keys/key.c index 7

Re: [PATCH] x86/sgx: Use SHA-256 library API instead of crypto_shash API

2025-04-30 Thread Jarkko Sakkinen
On Mon, Apr 28, 2025 at 12:19:50PM -0700, Dave Hansen wrote: > On 4/28/25 11:38, Eric Biggers wrote: > > -static int sgx_get_key_hash(const void *modulus, void *hash) > > -{ > > - struct crypto_shash *tfm; > > - int ret; > > - > > - tfm = crypto_alloc_shash("sha256", 0, CRYPTO_ALG_ASYNC); > >

Re: [PATCH v8 0/5] Add Loongson Security Engine chip driver

2025-04-30 Thread Qunqin Zhao
在 2025/4/30 下午4:58, Lee Jones 写道: On Wed, 30 Apr 2025, Huacai Chen wrote: On Wed, Apr 30, 2025 at 4:47 PM Qunqin Zhao wrote: 在 2025/4/30 下午4:18, Herbert Xu 写道: On Wed, Apr 30, 2025 at 04:14:40PM +0800, Qunqin Zhao wrote: Sorry to bother you, may i ask is it fine to move the Security Eng

Re: [PATCH v8 0/5] Add Loongson Security Engine chip driver

2025-04-30 Thread Lee Jones
On Wed, 30 Apr 2025, Huacai Chen wrote: > On Wed, Apr 30, 2025 at 4:47 PM Qunqin Zhao wrote: > > > > > > 在 2025/4/30 下午4:18, Herbert Xu 写道: > > > On Wed, Apr 30, 2025 at 04:14:40PM +0800, Qunqin Zhao wrote: > > >> Sorry to bother you, may i ask is it fine to move the Security Engine > > >> base

Re: [PATCH v8 0/5] Add Loongson Security Engine chip driver

2025-04-30 Thread Huacai Chen
On Wed, Apr 30, 2025 at 4:47 PM Qunqin Zhao wrote: > > > 在 2025/4/30 下午4:18, Herbert Xu 写道: > > On Wed, Apr 30, 2025 at 04:14:40PM +0800, Qunqin Zhao wrote: > >> Sorry to bother you, may i ask is it fine to move the Security Engine base > >> driver[Patch v8 1/5] to drivers/crypto ? > >> > >> The

Re: [PATCH v8 0/5] Add Loongson Security Engine chip driver

2025-04-30 Thread Qunqin Zhao
在 2025/4/30 下午4:18, Herbert Xu 写道: On Wed, Apr 30, 2025 at 04:14:40PM +0800, Qunqin Zhao wrote: Sorry to bother you, may i ask is it fine to move  the Security Engine base driver[Patch v8 1/5] to drivers/crypto ? The base driver uses MFD  interface  to register child device(tpm, rng) , as don

Re: [PATCH v8 0/5] Add Loongson Security Engine chip driver

2025-04-30 Thread Herbert Xu
On Wed, Apr 30, 2025 at 04:14:40PM +0800, Qunqin Zhao wrote: > > Sorry to bother you, may i ask is it fine to move  the Security Engine base > driver[Patch v8 1/5] to drivers/crypto ? > > The base driver uses MFD  interface  to register child device(tpm, rng) , as > done in > > "drivers/iio/commo

Re: [PATCH v8 0/5] Add Loongson Security Engine chip driver

2025-04-30 Thread Qunqin Zhao
在 2025/4/20 下午3:17, Huacai Chen 写道: Hi, Qunqin, On Fri, Apr 18, 2025 at 5:33 PM Qunqin Zhao wrote: The Loongson Security Engine chip supports RNG, SM2, SM3 and SM4 accelerator engines. Each engine have its own DMA buffer provided by the controller. The kernel cannot directly send commands to

Re: [PATCH v8 4/5] tpm: Add a driver for Loongson TPM device

2025-04-30 Thread Qunqin Zhao
在 2025/4/22 上午2:58, Jarkko Sakkinen 写道: On Fri, Apr 18, 2025 at 05:34:06PM +0800, Qunqin Zhao wrote: Loongson Security Engine supports random number generation, hash, symmetric encryption and asymmetric encryption. Based on these encryption functions, TPM2 have been implemented in the Loongson