Re: [PATCH v10 3/3] crypto: Add Inside Secure SafeXcel EIP-93 crypto engine support
From: Christian Marangi
Date: Tue Jan 14 2025 - 07:34:15 EST
On Tue, Jan 14, 2025 at 11:36:35AM +0800, Herbert Xu wrote:
> On Sun, Jan 05, 2025 at 03:30:48PM +0100, Christian Marangi wrote:
> > Add support for the Inside Secure SafeXcel EIP-93 Crypto Engine used on
> > Mediatek MT7621 SoC and new Airoha SoC.
> >
> > EIP-93 IP supports AES/DES/3DES ciphers in ECB/CBC and CTR modes as well as
> > authenc(HMAC(x), cipher(y)) using HMAC MD5, SHA1, SHA224 and SHA256.
> >
> > EIP-93 provide regs to signal support for specific chipers and the
> > driver dynamically register only the supported one by the chip.
> >
> > Signed-off-by: Richard van Schagen <vschagen@xxxxxxxxxx>
> > Co-developed-by: Christian Marangi <ansuelsmth@xxxxxxxxx>
> > Signed-off-by: Christian Marangi <ansuelsmth@xxxxxxxxx>
>
> I get a compile-time warning with this patch (C=1 W=1):
>
> CHECK ../drivers/crypto/inside-secure/eip93/eip93-common.c
> ../drivers/crypto/inside-secure/eip93/eip93-common.c:101:5: warning: context imbalance in 'eip93_put_descriptor' - wrong count at exit
> ../drivers/crypto/inside-secure/eip93/eip93-common.c:126:6: warning: context imbalance in 'eip93_get_descriptor' - wrong count at exit
>
> Could you please take a look?
>
Hi, this is just a false-positive with the usage of the cleanup API.
Sending new revision muting this by using scoped_guard instead.
Will also make cleanup guy aware of this bug.
--
Ansuel