diff mbox series

[1/3] crypto: sa2ul - Hide pointer and fix -Wpointer-to-int-cast in dev_dbg()

Message ID 20200826162954.28636-1-krzk@kernel.org
State New
Headers show
Series [1/3] crypto: sa2ul - Hide pointer and fix -Wpointer-to-int-cast in dev_dbg() | expand

Commit Message

Krzysztof Kozlowski Aug. 26, 2020, 4:29 p.m. UTC
Pointers should not be printed because they might leak important
information about address space layout.  Use %p to hash the value.  This
also fixes compilation warnings on 32-bit architecture:

    drivers/crypto/sa2ul.c:1486:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/crypto/sa2ul.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski Feb. 27, 2021, 4:37 p.m. UTC | #1
On Fri, 4 Sept 2020 at 10:28, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>

> On Wed, Aug 26, 2020 at 06:29:52PM +0200, Krzysztof Kozlowski wrote:

> > Pointers should not be printed because they might leak important

> > information about address space layout.  Use %p to hash the value.  This

> > also fixes compilation warnings on 32-bit architecture:

> >

> >     drivers/crypto/sa2ul.c:1486:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

> >

> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

> > ---

> >  drivers/crypto/sa2ul.c | 4 ++--

> >  1 file changed, 2 insertions(+), 2 deletions(-)

>

> All applied.  Thanks.


Hi Herbert,

I think this patch was lost, although you replied that the entire set
is applied.

Can you pick it up?

Best regards,
Krzysztof
Herbert Xu March 1, 2021, 6:36 a.m. UTC | #2
On Sat, Feb 27, 2021 at 05:37:49PM +0100, Krzysztof Kozlowski wrote:
>

> I think this patch was lost, although you replied that the entire set

> is applied.

> 

> Can you pick it up?


I think it was not applicable because the following had already
been applied:

commit ea066b7a3ddf1e4e5ae749495f0adf12766188b4
Author: YueHaibing <yuehaibing@huawei.com>
Date:   Tue Aug 18 22:00:01 2020 +0800

    crypto: sa2ul - Fix pointer-to-int-cast warning

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Krzysztof Kozlowski March 1, 2021, 6:41 a.m. UTC | #3
On Mon, 1 Mar 2021 at 07:36, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>

> On Sat, Feb 27, 2021 at 05:37:49PM +0100, Krzysztof Kozlowski wrote:

> >

> > I think this patch was lost, although you replied that the entire set

> > is applied.

> >

> > Can you pick it up?

>

> I think it was not applicable because the following had already

> been applied:

>

> commit ea066b7a3ddf1e4e5ae749495f0adf12766188b4

> Author: YueHaibing <yuehaibing@huawei.com>

> Date:   Tue Aug 18 22:00:01 2020 +0800

>

>     crypto: sa2ul - Fix pointer-to-int-cast warning


Yes, you're right. Sorry for the noise.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c
index 5bc099052bd2..4a950437bf44 100644
--- a/drivers/crypto/sa2ul.c
+++ b/drivers/crypto/sa2ul.c
@@ -1482,8 +1482,8 @@  static int sa_sha_init(struct ahash_request *req)
 	struct sa_sha_req_ctx *rctx = ahash_request_ctx(req);
 	struct sa_tfm_ctx *ctx = crypto_ahash_ctx(tfm);
 
-	dev_dbg(sa_k3_dev, "init: digest size: %d, rctx=%llx\n",
-		crypto_ahash_digestsize(tfm), (u64)rctx);
+	dev_dbg(sa_k3_dev, "init: digest size: %d, rctx=%p\n",
+		crypto_ahash_digestsize(tfm), rctx);
 
 	ahash_request_set_tfm(&rctx->fallback_req, ctx->fallback.ahash);
 	rctx->fallback_req.base.flags =