[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1441997372.4322.37.camel@schen9-desk2.jf.intel.com>
Date: Fri, 11 Sep 2015 11:49:32 -0700
From: Tim Chen <tim.c.chen@...ux.intel.com>
To: Stephan Mueller <smueller@...onox.de>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
"H. Peter Anvin" <hpa@...or.com>,
"David S.Miller" <davem@...emloft.net>,
Sean Gulley <sean.m.gulley@...el.com>,
Chandramouli Narayanan <mouli_7982@...oo.com>,
Vinodh Gopal <vinodh.gopal@...el.com>,
James Guilford <james.guilford@...el.com>,
Wajdi Feghali <wajdi.k.feghali@...el.com>,
Jussi Kivilinna <jussi.kivilinna@....fi>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] crypto: [sha] glue code for Intel SHA extensions
optimized SHA1 & SHA256
On Fri, 2015-09-11 at 19:02 +0200, Stephan Mueller wrote:
> Am Donnerstag, 10. September 2015, 17:04:31 schrieb Tim Chen:
>
> Hi Tim,
> >
> >Is there a scenario you can think of
> >when a lower performing sha1 transform needs to
> >be exposed as a separate driver?
>
> My immediate concern is testing: it is hard to test the individual
> implementations.
> >
Not hard, just one line in the glue code to set the transform
to the one you need it you really want to test individual
implementation. Usually user of sha don't care which sha driver
they got, but just the highest priority one.
So you will anyway need to patch and change the priority of the sha
driver to expose a specific one for testing.
> >Otherwise the glue code logic will only expose the
> >best performing one for a cpu and hide the others, which was intentional
> >on our part to prevent a lower performing sha from getting used.
>
> Agreed, but the kernel crypto API does that already using the priorities --
> IMHO a very clean and easy to interpret solution.
>
> Furthermore, if somebody really has a need to not use the fastest HW
> implementation, the kernel crypto API allows him to do that. With the hard-
> wired approach in the glue file, you are stuck.
Still, why would some kernel module specifically not want to
use the fastest HW implementation, and explicitly ask for
a slower driver?
Tim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists