* [PATCH] crypto: sahara: fix typo "Decidated" -> "Dedicated"
From: Colin King @ 2016-10-25 11:07 UTC (permalink / raw)
To: Herbert Xu, linux-crypto; +Cc: David S . Miller, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Trivial fix to typo in dev_dbg message
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/crypto/sahara.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index 0c49956..7ba0eae 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -390,7 +390,7 @@ static void sahara_decode_status(struct sahara_dev *dev, unsigned int status)
if (status & SAHARA_STATUS_MODE_BATCH)
dev_dbg(dev->device, " - Batch Mode.\n");
else if (status & SAHARA_STATUS_MODE_DEDICATED)
- dev_dbg(dev->device, " - Decidated Mode.\n");
+ dev_dbg(dev->device, " - Dedicated Mode.\n");
else if (status & SAHARA_STATUS_MODE_DEBUG)
dev_dbg(dev->device, " - Debug Mode.\n");
--
2.9.3
^ permalink raw reply related
* Re: [PATCH v2] char: hw_random: atmel-rng: disable TRNG during suspend
From: Nicolas Ferre @ 2016-10-25 8:49 UTC (permalink / raw)
To: Wenyou Yang, Herbert Xu, Matt Mackall
Cc: linux-crypto, Wenyou Yang, linux-arm-kernel
In-Reply-To: <1477356993-27778-1-git-send-email-wenyou.yang@atmel.com>
Le 25/10/2016 à 02:56, Wenyou Yang a écrit :
> To fix the over consumption on the VDDCore due to the TRNG enabled,
> disable the TRNG during suspend, not only disable the user interface
> clock (which is controlled by PMC). Because the user interface clock
> is independent from any clock that may be used in the entropy source
> logic circuitry.
>
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks
> ---
>
> Changes in v2:
> - Enable the user interface first, then enable the internal clock
> when resume.
>
> drivers/char/hw_random/atmel-rng.c | 24 +++++++++++++++++++++---
> 1 file changed, 21 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
> index 0fcc9e6..ae7cae5 100644
> --- a/drivers/char/hw_random/atmel-rng.c
> +++ b/drivers/char/hw_random/atmel-rng.c
> @@ -48,6 +48,16 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
> return 0;
> }
>
> +static void atmel_trng_enable(struct atmel_trng *trng)
> +{
> + writel(TRNG_KEY | 1, trng->base + TRNG_CR);
> +}
> +
> +static void atmel_trng_disable(struct atmel_trng *trng)
> +{
> + writel(TRNG_KEY, trng->base + TRNG_CR);
> +}
> +
> static int atmel_trng_probe(struct platform_device *pdev)
> {
> struct atmel_trng *trng;
> @@ -71,7 +81,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> - writel(TRNG_KEY | 1, trng->base + TRNG_CR);
> + atmel_trng_enable(trng);
> trng->rng.name = pdev->name;
> trng->rng.read = atmel_trng_read;
>
> @@ -94,7 +104,7 @@ static int atmel_trng_remove(struct platform_device *pdev)
>
> hwrng_unregister(&trng->rng);
>
> - writel(TRNG_KEY, trng->base + TRNG_CR);
> + atmel_trng_disable(trng);
> clk_disable_unprepare(trng->clk);
>
> return 0;
> @@ -105,6 +115,7 @@ static int atmel_trng_suspend(struct device *dev)
> {
> struct atmel_trng *trng = dev_get_drvdata(dev);
>
> + atmel_trng_disable(trng);
> clk_disable_unprepare(trng->clk);
>
> return 0;
> @@ -113,8 +124,15 @@ static int atmel_trng_suspend(struct device *dev)
> static int atmel_trng_resume(struct device *dev)
> {
> struct atmel_trng *trng = dev_get_drvdata(dev);
> + int ret;
> +
> + ret = clk_prepare_enable(trng->clk);
> + if (ret)
> + return ret;
>
> - return clk_prepare_enable(trng->clk);
> + atmel_trng_enable(trng);
> +
> + return 0;
> }
>
> static const struct dev_pm_ops atmel_trng_pm_ops = {
>
--
Nicolas Ferre
^ permalink raw reply
* Re: [PATCH] nvmem: sunxi-sid: SID content is not a valid source of randomness
From: Jean-Francois Moine @ 2016-10-25 7:06 UTC (permalink / raw)
To: LABBE Corentin
Cc: Maxime Ripard, wens, srinivas.kandagatla, linux-kernel,
linux-arm-kernel, linux-crypto
In-Reply-To: <20161025053855.GA901@Red>
On Tue, 25 Oct 2016 07:38:55 +0200
LABBE Corentin <clabbe.montjoie@gmail.com> wrote:
> > On Sat, Oct 22, 2016 at 03:53:28PM +0200, Corentin Labbe wrote:
> > > Since SID's content is constant over reboot,
> >
> > That's not true, at least not across all the Allwinner SoCs, and
> > especially not on the A10 and A20 that this driver supports.
> >
>
> On my cubieboard2 (A20)
> hexdump -C /sys/devices/platform/soc\@01c00000/1c23800.eeprom/sunxi-sid0/nvmem
> 00000000 16 51 66 83 80 48 50 72 56 54 48 48 03 c2 75 72 |.Qf..HPrVTHH..ur|
> 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> *
> 00000100 16 51 66 83 80 48 50 72 56 54 48 48 03 c2 75 72 |.Qf..HPrVTHH..ur|
> 00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> *
> 00000200
> cubiedev ~ # reboot
> cubiedev ~ # hexdump -C /sys/devices/platform/soc\@01c00000/1c23800.eeprom/sunxi-sid0/nvmem
> 00000000 16 51 66 83 80 48 50 72 56 54 48 48 03 c2 75 72 |.Qf..HPrVTHH..ur|
> 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> *
> 00000100 16 51 66 83 80 48 50 72 56 54 48 48 03 c2 75 72 |.Qf..HPrVTHH..ur|
> 00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> *
> 00000200
>
> So clearly for me its constant.
Even after power off/power on?
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
^ permalink raw reply
* Re: [PATCH] nvmem: sunxi-sid: SID content is not a valid source of randomness
From: LABBE Corentin @ 2016-10-25 5:38 UTC (permalink / raw)
To: Maxime Ripard
Cc: srinivas.kandagatla, wens, linux-kernel, linux-arm-kernel,
linux-crypto
In-Reply-To: <20161024201020.h6akyqad2o42xkhq@lukather>
On Mon, Oct 24, 2016 at 10:10:20PM +0200, Maxime Ripard wrote:
> On Sat, Oct 22, 2016 at 03:53:28PM +0200, Corentin Labbe wrote:
> > Since SID's content is constant over reboot,
>
> That's not true, at least not across all the Allwinner SoCs, and
> especially not on the A10 and A20 that this driver supports.
>
On my cubieboard2 (A20)
hexdump -C /sys/devices/platform/soc\@01c00000/1c23800.eeprom/sunxi-sid0/nvmem
00000000 16 51 66 83 80 48 50 72 56 54 48 48 03 c2 75 72 |.Qf..HPrVTHH..ur|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000100 16 51 66 83 80 48 50 72 56 54 48 48 03 c2 75 72 |.Qf..HPrVTHH..ur|
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200
cubiedev ~ # reboot
cubiedev ~ # hexdump -C /sys/devices/platform/soc\@01c00000/1c23800.eeprom/sunxi-sid0/nvmem
00000000 16 51 66 83 80 48 50 72 56 54 48 48 03 c2 75 72 |.Qf..HPrVTHH..ur|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000100 16 51 66 83 80 48 50 72 56 54 48 48 03 c2 75 72 |.Qf..HPrVTHH..ur|
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200
So clearly for me its constant.
> > it must not be used as source of randomness.
>
> And I don't think that's true either. A constant entropy provider will
> not add any entropy, but will not remove any, would it?
I cced linux-crypto at the begining for confirmation on that.
But the problem is increased as a part of the content is predicatable over same type of device (at least the thirst bytes and all the zeros).
^ permalink raw reply
* Re: [PATCH v10 0/8] crypto: asynchronous compression api
From: Herbert Xu @ 2016-10-25 3:47 UTC (permalink / raw)
To: Giovanni Cabiddu; +Cc: linux-crypto
In-Reply-To: <1477052394-19826-1-git-send-email-giovanni.cabiddu@intel.com>
On Fri, Oct 21, 2016 at 01:19:46PM +0100, Giovanni Cabiddu wrote:
> The following patch set introduces acomp, a generic asynchronous
> (de)compression api with support for SG lists.
> We propose a new crypto type called crypto_acomp_type, a new struct acomp_alg
> and struct crypto_acomp, together with number of helper functions to register
> acomp type algorithms and allocate tfm instances.
> This interface will allow the following operations:
>
> int (*compress)(struct acomp_req *req);
> int (*decompress)(struct acomp_req *req);
>
> Together with acomp we propose a new driver-side interface, scomp, which
> handles compression implementations which use linear buffers. We converted all
> compression algorithms available in LKCF to use this interface so that those
> algorithms will be accessible through the acomp api.
>
> Changes in v10:
> - fixed build issues for configurations where CONFIG_CRYPTO_USER is defined
All applied. Thanks a lot Giovanni!
--
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
^ permalink raw reply
* Re: [PATCH][TRIVIAL] crypto: ccp - fix typo "CPP"
From: Herbert Xu @ 2016-10-25 3:46 UTC (permalink / raw)
To: Paul Bolle
Cc: trivial, thomas.lendacky, gary.hook, linux-crypto, linux-kernel
In-Reply-To: <1476991259-4061-1-git-send-email-pebolle@tiscali.nl>
Paul Bolle <pebolle@tiscali.nl> wrote:
> The abbreviation for Cryptographic Coprocessor is "CCP".
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Patch applied. 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
^ permalink raw reply
* Re: [PATCH] hwrng: meson: Remove unneeded platform MODULE_ALIAS
From: Herbert Xu @ 2016-10-25 3:43 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Kevin Hilman, Neil Armstrong,
PrasannaKumar Muralidharan, Carlo Caione, linux-amlogic,
Matt Mackall, linux-arm-kernel, linux-crypto
In-Reply-To: <1476906618-14455-1-git-send-email-javier@osg.samsung.com>
On Wed, Oct 19, 2016 at 04:50:18PM -0300, Javier Martinez Canillas wrote:
> The Amlogic Meson is a DT-only platform, which means the devices are
> registered via OF and not using the legacy platform devices support.
>
> So there's no need to have a MODULE_ALIAS("platform:meson-rng") since
> the reported uevent MODALIAS to user-space will always be the OF one.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Patch applied. 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
^ permalink raw reply
* Re: [PATCH] crypto: engine - Handle the kthread worker using the new API
From: Herbert Xu @ 2016-10-25 3:43 UTC (permalink / raw)
To: Petr Mladek; +Cc: David S. Miller, linux-crypto, Tejun Heo, linux-kernel
In-Reply-To: <1476878070-12024-1-git-send-email-pmladek@suse.com>
On Wed, Oct 19, 2016 at 01:54:30PM +0200, Petr Mladek wrote:
> Use the new API to create and destroy the crypto engine kthread
> worker. The API hides some implementation details.
>
> In particular, kthread_create_worker() allocates and initializes
> struct kthread_worker. It runs the kthread the right way
> and stores task_struct into the worker structure.
>
> kthread_destroy_worker() flushes all pending works, stops
> the kthread and frees the structure.
>
> This patch does not change the existing behavior except for
> dynamically allocating struct kthread_worker and storing
> only the pointer of this structure.
>
> It is compile tested only because I did not find an easy
> way how to run the code. Well, it should be pretty safe
> given the nature of the change.
>
> Signed-off-by: Petr Mladek <pmladek@suse.com>
Patch applied. 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
^ permalink raw reply
* Re: [PATCH] crypto: ccp - Clean up the LSB slot allocation code
From: Herbert Xu @ 2016-10-25 3:43 UTC (permalink / raw)
To: Gary R Hook; +Cc: linux-crypto, thomas.lendacky, davem
In-Reply-To: <147683001790.8273.9550490485955104780.stgit@taos.amd.com>
On Tue, Oct 18, 2016 at 05:33:37PM -0500, Gary R Hook wrote:
> Fix a few problems revealed by testing: verify consistent
> units, especially in public slot allocation. Percolate
> some common initialization code up to a common routine.
> Add some comments.
>
> Signed-off-by: Gary R Hook <gary.hook@amd.com>
Patch applied. 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
^ permalink raw reply
* Re: [PATCH] crypto: ccp - remove unneeded code
From: Herbert Xu @ 2016-10-25 3:42 UTC (permalink / raw)
To: Gary R Hook; +Cc: linux-crypto, thomas.lendacky, davem
In-Reply-To: <147682972966.8169.12625496646634682202.stgit@taos.amd.com>
On Tue, Oct 18, 2016 at 05:28:49PM -0500, Gary R Hook wrote:
> Clean up patch for an unneeded structure member.
>
> Signed-off-by: Gary R Hook <gary.hook@amd.com>
Patch applied. 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
^ permalink raw reply
* Re: [PATCH v2] hwrng: meson: Fix module autoload for OF registration
From: Herbert Xu @ 2016-10-25 3:40 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Jason Gunthorpe, Kevin Hilman, Neil Armstrong,
PrasannaKumar Muralidharan, Carlo Caione, linux-amlogic,
Matt Mackall, linux-arm-kernel, linux-crypto
In-Reply-To: <1476733877-20275-1-git-send-email-javier@osg.samsung.com>
On Mon, Oct 17, 2016 at 04:51:17PM -0300, Javier Martinez Canillas wrote:
> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
>
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
>
> Before this patch:
>
> $ modinfo drivers/char/hw_random/meson-rng.ko | grep alias
> alias: platform:meson-rng
>
> After this patch:
>
> $ modinfo drivers/char/hw_random/meson-rng.ko | grep alias
> alias: platform:meson-rng
> alias: of:N*T*Camlogic,meson-rngC*
> alias: of:N*T*Camlogic,meson-rng
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Patch applied. 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
^ permalink raw reply
* Re: [PATCH] crypto: ccp - change bitfield type to unsigned ints
From: Herbert Xu @ 2016-10-25 3:40 UTC (permalink / raw)
To: Gary R Hook; +Cc: linux-crypto, thomas.lendacky, davem
In-Reply-To: <147682971521.8147.5364792807816963275.stgit@taos.amd.com>
On Tue, Oct 18, 2016 at 05:28:35PM -0500, Gary R Hook wrote:
> Bit fields are not sensitive to endianness, so use
> a transparent standard data type
>
> Signed-off-by: Gary R Hook <gary.hook@amd.com>
Patch applied. 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
^ permalink raw reply
* Re: [PATCH -next] crypto: gcm - Fix error return code in crypto_gcm_create_common()
From: Herbert Xu @ 2016-10-25 3:39 UTC (permalink / raw)
To: Wei Yongjun; +Cc: Wei Yongjun, linux-crypto
In-Reply-To: <1476717006-10086-1-git-send-email-weiyj.lk@gmail.com>
On Mon, Oct 17, 2016 at 03:10:06PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fix to return error code -EINVAL from the invalid alg ivsize error
> handling case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Patch applied. 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
^ permalink raw reply
* Re: [PATCH -next] crypto: ccp - Fix non static symbol warning
From: Herbert Xu @ 2016-10-25 3:39 UTC (permalink / raw)
To: Wei Yongjun; +Cc: Tom Lendacky, Gary Hook, Wei Yongjun, linux-crypto
In-Reply-To: <1476716930-9831-1-git-send-email-weiyj.lk@gmail.com>
On Mon, Oct 17, 2016 at 03:08:50PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fixes the following sparse warning:
>
> drivers/crypto/ccp/ccp-dev.c:44:6: warning:
> symbol 'ccp_error_codes' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Patch applied. 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
^ permalink raw reply
* Re: [RESEND][PATCH] crypto: caam: add support for iMX6UL
From: Herbert Xu @ 2016-10-25 3:39 UTC (permalink / raw)
To: Marcus Folkesson
Cc: David S . Miller, Rob Herring, Mark Rutland, Horia Geanta,
Arnd Bergmann, Alex Porosanu, Srinivas Kandagatla, Baoyou Xie,
Russell King, linux-crypto-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1476703680-22676-1-git-send-email-marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Mon, Oct 17, 2016 at 01:28:00PM +0200, Marcus Folkesson wrote:
> i.MX6UL does only require three clocks to enable CAAM module.
>
> Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Reviewed-by: Horia Geantă <horia.geanta-3arQi8VN3Tc@public.gmane.org>
Patch applied. Thanks.
--
Email: Herbert Xu <herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] padata: Remove unused but set variables
From: Herbert Xu @ 2016-10-25 3:38 UTC (permalink / raw)
To: Steffen Klassert; +Cc: tklauser, linux-crypto, linux-kernel
In-Reply-To: <20161021090047.GO19080@gauss.secunet.com>
Steffen Klassert <steffen.klassert@secunet.com> wrote:
> On Mon, Oct 17, 2016 at 12:16:08PM +0200, Tobias Klauser wrote:
>> Remove the unused but set variable pinst in padata_parallel_worker to
>> fix the following warning when building with 'W=1':
>>
>> kernel/padata.c: In function ‘padata_parallel_worker’:
>> kernel/padata.c:68:26: warning: variable ‘pinst’ set but not used [-Wunused-but-set-variable]
>>
>> Also remove the now unused variable pd which is only used to set pinst.
>>
>> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
>
> Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Patch applied. 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
^ permalink raw reply
* Re: [PATCH] crypto: Move RSA+MPI constructs into an #include file
From: Herbert Xu @ 2016-10-25 2:48 UTC (permalink / raw)
To: Gary R Hook; +Cc: linux-crypto, thomas.lendacky, davem
In-Reply-To: <20161014193559.4342.74036.stgit@taos>
On Fri, Oct 14, 2016 at 02:36:00PM -0500, Gary R Hook wrote:
> Move RSA support of general use into internal/rsa.h.
> This allows reuse of, e.g. RSA MPI keys and support
> functions.
>
> Signed-off-by: Gary R Hook <gary.hook@amd.com>
Please fold this patch into the series that makes use of it.
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
^ permalink raw reply
* Re: [PATCH v2 0/8] Conversion crypto API documentation to Sphinx
From: Herbert Xu @ 2016-10-25 2:35 UTC (permalink / raw)
To: Stephan Mueller; +Cc: Jonathan Corbet, linux-crypto, linux-doc
In-Reply-To: <1645861.DSRXbPG5tl@positron.chronox.de>
On Sun, Oct 23, 2016 at 06:46:12PM +0200, Stephan Mueller wrote:
> Am Sonntag, 23. Oktober 2016, 10:32:38 CEST schrieb Jonathan Corbet:
>
> Hi Jonathan,
>
> > On Fri, 21 Oct 2016 04:53:45 +0200
> >
> > Stephan Mueller <smueller@chronox.de> wrote:
> > > the attached patch set converts the existing crypto API documentation
> > > from DocBook to Sphinx.
> >
> > This looks generally good to me - thanks for doing it!
> >
> > Is there any chance of running the Documentation/ parts through the docs
> > tree? Documentation/index.rst has become a bit of a conflict point
> > otherwise...
>
> Unless Herbert objects, I would not see any reason why we should not push it
> through the docs tree.
No objections from me.
> Yet we should wait for Herbert's ack as I have added also new information in
> the patch set (the KPP API documentation and the change in the AEAD
> documentation).
Looks good to me.
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
^ permalink raw reply
* Crypto Fixes for 4.9
From: Herbert Xu @ 2016-10-25 2:34 UTC (permalink / raw)
To: Linus Torvalds, David S. Miller, Linux Kernel Mailing List,
Linux Crypto Mailing List
In-Reply-To: <20160801095821.GA1260@gondor.apana.org.au>
Hi Linus:
This push fixes a regression caused by the stack vmalloc change.
Please pull from
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git linus
Andrew Lutomirski (1):
hwrng: core - Don't use a stack buffer in add_early_randomness()
drivers/char/hw_random/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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
^ permalink raw reply
* ARM-CE aes encryption on uneven blocks
From: Cata Vasile @ 2016-10-24 14:41 UTC (permalink / raw)
To: linux-crypto@vger.kernel.org
Hi,
I'm trying to understand the code for AES encryption from ARM-CE.
>From the aes-glue.S calls I understand that the encryption primitives receive the number of blocks, but have no way of determining the number of bytes to encrypt, if for example the plaintext does not have a length of a multiple of AES block size.
How does, for example, ecb_encrypt() also encrypt the last remaining bytes in the plaintext if it is not a multiple of AES block size if It can never deduce the full plaintext size?
Catalin Vasile
^ permalink raw reply
* [PATCH v2] char: hw_random: atmel-rng: disable TRNG during suspend
From: Wenyou Yang @ 2016-10-25 0:56 UTC (permalink / raw)
To: Herbert Xu, Matt Mackall
Cc: linux-crypto, Wenyou Yang, linux-arm-kernel, Nicolas Ferre,
Wenyou Yang
To fix the over consumption on the VDDCore due to the TRNG enabled,
disable the TRNG during suspend, not only disable the user interface
clock (which is controlled by PMC). Because the user interface clock
is independent from any clock that may be used in the entropy source
logic circuitry.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
Changes in v2:
- Enable the user interface first, then enable the internal clock
when resume.
drivers/char/hw_random/atmel-rng.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index 0fcc9e6..ae7cae5 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -48,6 +48,16 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
return 0;
}
+static void atmel_trng_enable(struct atmel_trng *trng)
+{
+ writel(TRNG_KEY | 1, trng->base + TRNG_CR);
+}
+
+static void atmel_trng_disable(struct atmel_trng *trng)
+{
+ writel(TRNG_KEY, trng->base + TRNG_CR);
+}
+
static int atmel_trng_probe(struct platform_device *pdev)
{
struct atmel_trng *trng;
@@ -71,7 +81,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
if (ret)
return ret;
- writel(TRNG_KEY | 1, trng->base + TRNG_CR);
+ atmel_trng_enable(trng);
trng->rng.name = pdev->name;
trng->rng.read = atmel_trng_read;
@@ -94,7 +104,7 @@ static int atmel_trng_remove(struct platform_device *pdev)
hwrng_unregister(&trng->rng);
- writel(TRNG_KEY, trng->base + TRNG_CR);
+ atmel_trng_disable(trng);
clk_disable_unprepare(trng->clk);
return 0;
@@ -105,6 +115,7 @@ static int atmel_trng_suspend(struct device *dev)
{
struct atmel_trng *trng = dev_get_drvdata(dev);
+ atmel_trng_disable(trng);
clk_disable_unprepare(trng->clk);
return 0;
@@ -113,8 +124,15 @@ static int atmel_trng_suspend(struct device *dev)
static int atmel_trng_resume(struct device *dev)
{
struct atmel_trng *trng = dev_get_drvdata(dev);
+ int ret;
+
+ ret = clk_prepare_enable(trng->clk);
+ if (ret)
+ return ret;
- return clk_prepare_enable(trng->clk);
+ atmel_trng_enable(trng);
+
+ return 0;
}
static const struct dev_pm_ops atmel_trng_pm_ops = {
--
2.7.4
^ permalink raw reply related
* RE: [PATCH v1] char: hw_random: atmel-rng: disable TRNG during suspend
From: Wenyou.Yang @ 2016-10-25 0:48 UTC (permalink / raw)
To: nicolas.ferre, herbert, mpm; +Cc: linux-crypto, linux-arm-kernel
In-Reply-To: <b0554c1e-e13a-9fe3-ebf4-5d8b0aa16b15@atmel.com>
> -----Original Message-----
> From: Nicolas Ferre [mailto:nicolas.ferre@atmel.com]
> Sent: 2016年10月24日 20:07
> To: Wenyou Yang - A41535 <Wenyou.Yang@microchip.com>; Herbert Xu
> <herbert@gondor.apana.org.au>; Matt Mackall <mpm@selenic.com>
> Cc: linux-crypto@vger.kernel.org; Wenyou Yang - A41535
> <Wenyou.Yang@microchip.com>; linux-arm-kernel@lists.infradead.org
> Subject: Re: [PATCH v1] char: hw_random: atmel-rng: disable TRNG during
> suspend
>
> Le 24/10/2016 à 10:03, Wenyou Yang a écrit :
> > To fix the over consumption on the VDDCore due to the TRNG enabled,
> > disable the TRNG during suspend, not only disable the user interface
> > clock (which is controlled by PMC). Because the user interface clock
> > is independent from any clock that may be used in the entropy source
> > logic circuitry.
> >
> > Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> > ---
> >
> > drivers/char/hw_random/atmel-rng.c | 16 ++++++++++++++--
> > 1 file changed, 14 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/char/hw_random/atmel-rng.c
> > b/drivers/char/hw_random/atmel-rng.c
> > index 0fcc9e6..2e2d09a 100644
> > --- a/drivers/char/hw_random/atmel-rng.c
> > +++ b/drivers/char/hw_random/atmel-rng.c
> > @@ -48,6 +48,16 @@ static int atmel_trng_read(struct hwrng *rng, void *buf,
> size_t max,
> > return 0;
> > }
> >
> > +static void atmel_trng_enable(struct atmel_trng *trng) {
> > + writel(TRNG_KEY | 1, trng->base + TRNG_CR); }
> > +
> > +static void atmel_trng_disable(struct atmel_trng *trng) {
> > + writel(TRNG_KEY, trng->base + TRNG_CR); }
> > +
> > static int atmel_trng_probe(struct platform_device *pdev) {
> > struct atmel_trng *trng;
> > @@ -71,7 +81,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
> > if (ret)
> > return ret;
> >
> > - writel(TRNG_KEY | 1, trng->base + TRNG_CR);
> > + atmel_trng_enable(trng);
> > trng->rng.name = pdev->name;
> > trng->rng.read = atmel_trng_read;
> >
> > @@ -94,7 +104,7 @@ static int atmel_trng_remove(struct platform_device
> > *pdev)
> >
> > hwrng_unregister(&trng->rng);
> >
> > - writel(TRNG_KEY, trng->base + TRNG_CR);
> > + atmel_trng_disable(trng);
> > clk_disable_unprepare(trng->clk);
> >
> > return 0;
> > @@ -105,6 +115,7 @@ static int atmel_trng_suspend(struct device *dev)
> > {
> > struct atmel_trng *trng = dev_get_drvdata(dev);
> >
> > + atmel_trng_disable(trng);
> > clk_disable_unprepare(trng->clk);
> >
> > return 0;
> > @@ -114,6 +125,7 @@ static int atmel_trng_resume(struct device *dev)
> > {
> > struct atmel_trng *trng = dev_get_drvdata(dev);
> >
> > + atmel_trng_enable(trng);
> > return clk_prepare_enable(trng->clk);
>
> Isn't it the other way around:
> enable the user interface first, then enable the internal clock? like:
>
> clk_prepare_enable(trng->clk);
> atmel_trng_enable(trng);
Yes, I thought so.
But the datasheet said, "The user interface clock is independent from any clock that may be used in the entropy source logic circuitry.
The source of entropy can be enabled before enabling the user interface clock."
It seems the TRNG can be enabled before enabling the peripheral clock.
Best Regards,
Wenyou Yang
^ permalink raw reply
* Re: [PATCH v2] crypto: mxs-dcp - Remove hash support
From: Fabio Estevam @ 2016-10-24 21:33 UTC (permalink / raw)
To: Marek Vasut
Cc: Herbert Xu, gianfranco.costamagna, linux-crypto, Fabio Estevam
In-Reply-To: <423fc7f0-fcab-eee6-6e7b-9ba2261fd0b3@denx.de>
On Mon, Oct 24, 2016 at 6:39 PM, Marek Vasut <marex@denx.de> wrote:
> Can't you rather fix it?
I would love to have this fixed, but I don't know how.
Any volunteers?
^ permalink raw reply
* Re: [PATCH v2] crypto: mxs-dcp - Remove hash support
From: Marek Vasut @ 2016-10-24 20:39 UTC (permalink / raw)
To: Fabio Estevam, herbert; +Cc: gianfranco.costamagna, linux-crypto, Fabio Estevam
In-Reply-To: <1477327394-2976-1-git-send-email-festevam@gmail.com>
On 10/24/2016 06:43 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> mxs-dcp driver does not probe for a long time:
>
> mxs-dcp 80028000.dcp: Failed to register sha1 hash!
> mxs-dcp: probe of 80028000.dcp failed with error -22
>
> There were some previous attempts to fix this, and the following
> feedback was given by Herbert Xu [1]:
>
> "This driver is hopelessly broken as its request context doesn't
> contain the hash state at all. Unless someone can fix that we
> should probably just remove the hash implementations altogether."
This comment looks real unhelpful. I'd really appreciate a bit more
detail on how to fix it.
> [1] http://www.spinics.net/lists/linux-crypto/msg18187.html
>
> So remove the hash support for now.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
> Changes since v1:
> - Fix typo in commit log
>
Can't you rather fix it?
--
Best regards,
Marek Vasut
^ permalink raw reply
* Equivalent of blkciper_walk for skcipher
From: Alex Cope @ 2016-10-24 20:39 UTC (permalink / raw)
To: linux-crypto; +Cc: Michael Halcrow, Eric Biggers
How should an algorithm implementing the skcipher api walk over the
scatterlist? blkcipher_walk seems to be what I need, but the API is
not compatible with skciper at the moment. Repeatedly calling
scatterwalk_map_and_copy looks like it will work, but would be less
performant than using something akin to blkciper_walk.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox