Re: [PATCH v3 3/3] s390/crypto: New s390 specific shash phmac

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 12, 2024 at 01:45:53PM +0100, Harald Freudenberger wrote:
.
> Well, we had a similar discussion once with paes (See
> https://lore.kernel.org/linux-crypto/20191113105523.8007-1-freude@xxxxxxxxxxxxx/)

Thanks for refreshing my memroy.
 
> Why not convert in the setkey() function? As of now this could be an option
> as the invocation of convert_key() in the end within the PKEY pkey_pckmo
> kernel module only calls PCKMO to generate the wrapped pkey. However, long
> term we will have another path using a crypto card for this action and
> then we are clearly in a sleeping context which must not be used from
> setkey(). So make it correct now means to delay the conversion from setkey()
> to later: the init of the hash context is the next chance to do this.

I'm not sure I get this justification for putting it in init instead
of setkey.  If you can't do it in setkey because it has to sleep,
then surely you can't do it from init/udpate either as they too
can be called from atomic contexts?

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux