mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: ZHIZHIKIN Andrey <andrey.zhizhikin@leica-geosystems.com>
Cc: horia.geanta@nxp.com, pankaj.gupta@nxp.com,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	iuliana.prodan@nxp.com, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] crypto: caam - check jr permissions before probing
Date: Mon, 15 Nov 2021 12:17:23 +0100	[thread overview]
Message-ID: <2070c2062606821fbf6ed052e6864255@walle.cc> (raw)
In-Reply-To: <AM6PR06MB46914ECA12815ABFCE8C1A59A6989@AM6PR06MB4691.eurprd06.prod.outlook.com>

>> > +EXPORT_SYMBOL(caam_ctrl_check_jr_perm);
>> 
>> no need for exporting this, no?
> 
> Unfortunately, both CONFIG_CRYPTO_DEV_FSL_CAAM and
> CONFIG_CRYPTO_DEV_FSL_CAAM_JR are tristate. Setting both
> config options to "=m" fails to resolve caam_ctrl_check_jr_perm,
> therefore I had to export it.
> 
> It strikes me odd however that CAAM can be compiled as module
> without CAAM_JR module at all. This would imply that DECO is used
> directly, which according to SRM is used for pure descriptor debug
> purposes and should never be used in production.
> 
> I guess CRYPTO_DEV_FSL_CAAM _JR should be merged into
> CRYPTO_DEV_FSL_CAAM, so they at least comes together. In that
> case the export would not be necessary at all.
> 
> I must admit I didn't find this a good solution, therefore any advise
> on a better solution here is highly appreciated.

I see, and I'm too lazy at the moment to figure that out ;) but afaik
new exports should be only EXPORT_SYMBOL_GPL().

>> >       if ((rd_reg32(&jrp->rregs->jrintstatus) & JRINT_ERR_HALT_MASK) !=
>> >           JRINT_ERR_HALT_COMPLETE || timeout == 0) {
>> > -             dev_err(dev, "failed to flush job ring %d\n", jrp->ridx);
>> > +             dev_err(dev, "failed to flush job ring %x\n",
>> > + jrp->ridx);
>> 
>> mh? why changing this?
> 
> After the change, jrp->ridx would contain JR hex address instead of 
> index,
> therefore I had to replace the debug output.

ahh then, ridx should renamed accordingly, I suppose.

-michael

  reply	other threads:[~2021-11-15 11:18 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 16:21 [PATCH] " Andrey Zhizhikin
2021-11-05  1:20 ` Michael Walle
2021-11-05 10:34   ` ZHIZHIKIN Andrey
2021-11-05 23:16     ` Michael Walle
2021-11-08 10:24       ` ZHIZHIKIN Andrey
2021-11-08 16:13         ` Michael Walle
2021-11-10  9:33           ` ZHIZHIKIN Andrey
2021-11-12 18:55             ` Michael Walle
2021-11-15  9:38               ` ZHIZHIKIN Andrey
2021-11-15 11:40                 ` Michael Walle
2021-11-11 16:45 ` [PATCH v2 0/2] CAAM Driver: re-factor and dynamic JR availability check Andrey Zhizhikin
2021-11-11 16:46   ` [PATCH v2 1/2] crypto: caam - convert to use capabilities Andrey Zhizhikin
2021-11-12 19:22     ` Michael Walle
2021-11-15  9:45       ` ZHIZHIKIN Andrey
2021-11-11 16:46   ` [PATCH v2 2/2] crypto: caam - check jr permissions before probing Andrey Zhizhikin
2021-11-12 21:17     ` Michael Walle
2021-11-15 10:07       ` ZHIZHIKIN Andrey
2021-11-15 11:17         ` Michael Walle [this message]
2021-11-18  0:47         ` Horia Geantă
2021-11-18  8:28           ` Michael Walle
2021-11-18 10:08             ` ZHIZHIKIN Andrey
2021-11-18 10:11               ` Michael Walle
2021-12-07 23:02   ` [PATCH v3 0/2] CAAM Driver: re-factor and set proper JR status Andrey Zhizhikin
2021-12-07 23:02     ` [PATCH v3 1/2] crypto: caam - convert to use capabilities Andrey Zhizhikin
2021-12-07 23:02     ` [PATCH v3 2/2] arm64: dts: imx8m: define proper status for caam jr Andrey Zhizhikin
2022-01-06 11:26       ` Rouven Czerwinski
2022-01-06 14:08         ` ZHIZHIKIN Andrey
2022-01-07  9:46           ` Rouven Czerwinski
2022-01-07 10:40             ` ZHIZHIKIN Andrey
2022-01-07 11:55               ` Rouven Czerwinski
2022-01-08 20:48                 ` ZHIZHIKIN Andrey
2022-01-07 11:47             ` Michael Walle
2022-01-07 11:58               ` Lucas Stach
2022-01-07 12:05                 ` Michael Walle
2022-01-06 10:56     ` [PATCH v3 0/2] CAAM Driver: re-factor and set proper JR status ZHIZHIKIN Andrey
2022-01-07  2:36       ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2070c2062606821fbf6ed052e6864255@walle.cc \
    --to=michael@walle.cc \
    --cc=andrey.zhizhikin@leica-geosystems.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=iuliana.prodan@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.gupta@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®