linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: wen.ping.teh@intel.com
To: dmitry.baryshkov@linaro.org
Cc: bjorn.andersson@linaro.org, catalin.marinas@arm.com,
	davem@davemloft.net, dinguyen@kernel.org,
	herbert@gondor.apana.org.au, krzysztof.kozlowski+dt@linaro.org,
	linux-arm-kernel@lists.infradead.org,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	shawnguo@kernel.org, wen.ping.teh@intel.com, will@kernel.org
Subject: Re: [PATCH 0/2] crypto: intel-fcs: Add crypto service driver for Intel SoCFPGA
Date: Thu, 29 Sep 2022 12:16:55 +0800	[thread overview]
Message-ID: <20220929041655.3239948-1-wen.ping.teh@intel.com> (raw)
In-Reply-To: <806d5fc4-fb37-c60c-a11a-f73e5e21afb2@linaro.org>

From: wen.ping.teh@intel.com

> From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> From: wen.ping.teh@intel.com
>> 
>>> From: Dmitry Baryshkov @ 2022-09-15 11:46 UTC (permalink / raw)
>>>> From: wen.ping.teh@intel.com
>>>>
>>>>> This patch introduces a crypto service driver for Intel SoCFPGA
>>>>> family. The FPGA Crypto Service (FCS) includes a large set of security
>>>>> features that are provided by the Secure Device Manager(SDM) in FPGA.
>>>>> The driver provide IOCTL interface for user to call the crypto services
>>>>> and send them to SDM's mailbox.
>>>>>
>>>>> Teh Wen Ping (2):
>>>>>    crypto: intel-fcs: crypto service driver for Intel SoCFPGA family
>>>>>    arm64: defconfig: add CRYPTO_DEV_INTEL_FCS
>>>> Hi,
>>>>
>>>> I just found out that there was a previous attempt to upstream this driver
>>>> 2 years ago. It was NACK because it did not implement crypto API. Please
>>>> drop this review.
>>>> https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg44701.html
>>>>
>>>> I will move this driver to drivers/misc.
>>>
>>> I think the proper solution would be to implement the existing API first
>>> rather than adding a set of custom proprietary IOCTLs that nobody else
>>> is going to use.
>> 
>> Could you explain what are the existing API that you are referring?
>> The FCS driver doesn't have API. Instead it uses IOCTLs to interact with user-space application to perform Intel SoCFPGA crypto features.
>
> The FCS driver doesn't. But Linux does.
>
> For the hw random generators we have the struct hwrng/devm_hwrng_register().
>
> For AES, EC, etc. there are corresponding Crypto API. Based on your 
> patches I couldn't guess if your hardware is more of a TPM or a generic 
> crypto "accelerator". However Linux has support for both kinds of 
> hardware. Most likely the right interface is already there (or almost 
> there). In 90% of cases 'a custom bunch of IOCTLs' is not a correct one.

Thanks for the feedback Dmitry. We will look into the available Linux crypto API and how our driver can use them.
This is will take some time but we will try to check the proper solution.

Thanks
Wen Ping

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2022-09-29  4:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 14:41 [PATCH 0/2] crypto: intel-fcs: Add crypto service driver for Intel SoCFPGA wen.ping.teh
2022-09-15  3:25 ` wen.ping.teh
2022-09-15 11:46   ` Dmitry Baryshkov
2022-09-15 13:52     ` wen.ping.teh
2022-09-15 14:42       ` Dmitry Baryshkov
2022-09-29  4:16         ` wen.ping.teh [this message]

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=20220929041655.3239948-1-wen.ping.teh@intel.com \
    --to=wen.ping.teh@intel.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=davem@davemloft.net \
    --cc=dinguyen@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).