archive mirror
 help / color / mirror / Atom feed
From: Greg KH <>
To: "Kim, David" <>
Cc: "Jason A. Donenfeld" <>,
	"" <>,
	"" <>,
	"" <>,
	"Magee, Tim" <>,
	Arnd Bergmann <>
Subject: Re: nCipher HSM kernel driver submission feedback request
Date: Mon, 23 Mar 2020 14:59:24 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <c34d5419ad38444d951f7cbb29b5c7ae@exukdagfar01.INTERNAL.ROOT.TES>

On Mon, Mar 23, 2020 at 01:32:06PM +0000, Kim, David wrote:
> Hi Jason,
> Thanks for your reply and helpful summary of the current discussion.
> > 
> > It looks like this is some sort of PCIe HSM device. As far as I know, Linux
> > doesn't have a standardized API for HSM devices (somebody correct me if
> > I'm wrong), and probably that doesn't quite make sense, either, seeing as
> > most HSMs are accessed anyway through userspace "drivers" -- that is, via
> > libusb or over some networking protocol, or something else.
> > Your situation is different in that it uses PCIe, so you need some kernel
> > mediation in order to give access to your userspace components.
> > And, different manufacturers' HSMs expose very different pieces of
> > functionality, and I'm not sure a unified API for them would even make
> > sense.
> Yes, that's correct. There are currently no standardised APIs for HSM devices in
> Linux and our PCIe device needs the kernel to facilitate operation.
> > 
> > It looks like this driver exposes some device file, with a few IOCTLs and then
> > support for reading and writing from and to the device. Besides some driver
> > control things, what actually goes into the device -- that is, the protocol one
> > must use to talk to the thing -- isn't actually described by the driver. You're
> > just shuffling bytes in and out with some mediation around that.
> > 
> > Can you confirm to me whether or not the above is accurate?
> Yes, this is accurate.
> > 
> > If so, then I'm not sure this belongs in the purview of the crypto list or has
> > anything much to do with Linux crypto. This is a PCIe driver for some
> > hardware that userspace has to talk to in order to do some stuff with it.
> Again, you are correct. Although it is cryptographic hardware, the driver code
> does not do anything cryptographic. It is just a PCIe driver.

If this is "just" a PCIe driver, can you use the UIO interface and just
talk to your hardware directly from userspace without any kernel driver

What exactly does the kernel driver need to do here?


greg k-h

  reply	other threads:[~2020-03-23 13:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13  9:48 Kim, David
2020-03-13 10:09 ` Greg KH
2020-03-16 10:44   ` Kim, David
2020-03-16 11:23     ` Greg KH
2020-03-23  6:49 ` Jason A. Donenfeld
2020-03-23 13:32   ` Kim, David
2020-03-23 13:59     ` Greg KH [this message]
2020-04-17 15:12       ` Kim, David

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: nCipher HSM kernel driver submission feedback request' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).