[PATCH 1/4] staging: ccree: Remove a attribute group from a kobject

2017-11-24 Thread Arvind Yadav
All attribute group created during sys_init_dir() should be removed in sys_free_dir() Signed-off-by: Arvind Yadav --- drivers/staging/ccree/ssi_sysfs.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_sysfs.c b/drivers/staging/ccree/ssi_sysfs.c i

[PATCH 2/4] staging: lustre: ldlm: Remove a attribute group from a kobject

2017-11-24 Thread Arvind Yadav
All attribute group created during ldlm_setup() should be removed in ldlm_cleanup(). Signed-off-by: Arvind Yadav --- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/s

[PATCH 0/4] Remove a attribute group from a kobject

2017-11-24 Thread Arvind Yadav
Arvind Yadav (4): [PATCH 1/4] staging: ccree: Remove a attribute group from a kobject [PATCH 2/4] staging: lustre: ldlm: Remove a attribute group from a kobject [PATCH 3/4] staging: lustre: obdclass: Remove a attribute group from a kobject [PATCH 4/4] staging: most: Remove a attribute group

[PATCH 3/4] staging: lustre: obdclass: Remove a attribute group from a kobject

2017-11-24 Thread Arvind Yadav
All attribute group created during class_procfs_init() should be removed. if class_procfs_init() will fail and also in class_procfs_clean(). Signed-off-by: Arvind Yadav --- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/

[PATCH 4/4] staging: most: Remove a attribute group from a kobject

2017-11-24 Thread Arvind Yadav
All attribute group created during dim2_sysfs_probe() should be removed in dim2_sysfs_destroy(). Signed-off-by: Arvind Yadav --- drivers/staging/most/hdm-dim2/dim2_sysfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/most/hdm-dim2/dim2_sysfs.c b/drivers/staging/most/hdm-d

Re: [PATCH v3] crypto: AF_ALG - remove locking in async callback

2017-11-24 Thread Herbert Xu
On Fri, Nov 24, 2017 at 05:04:19PM +0100, Stephan Mueller wrote: > > Would it make sense to feed it to stable? I already added stable Cc's so it should go in automatically once it's pushed to Linus. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gon

Re: Question about ahash export and import

2017-11-24 Thread Herbert Xu
On Fri, Nov 24, 2017 at 02:35:04PM +0100, Kamil Konieczny wrote: > > I have more questions, this time about HMAC export/import. > In doc, there is stated that key can be copied into context transformation. > > Should .export copy request context _and_ key used ? Or not ? The key is stored in the

Re: [PATCH] crypto: skcipher - Fix skcipher_walk_aead_common

2017-11-24 Thread Herbert Xu
On Fri, Nov 24, 2017 at 11:53:53AM +0100, Ondrej Mosnáček wrote: > (I accidentally hit "reply" instead of "reply all", so resending) > > 2017-11-24 6:07 GMT+01:00 Herbert Xu : > > On Thu, Nov 23, 2017 at 01:49:06PM +0100, Ondrej Mosnacek wrote: > >> diff --git a/crypto/skcipher.c b/crypto/skcipher

Re: [PATCH v3] crypto: AF_ALG - remove locking in async callback

2017-11-24 Thread Jonathan Cameron
On Fri, 24 Nov 2017 17:04:19 +0100 Stephan Mueller wrote: > Am Freitag, 24. November 2017, 08:37:39 CET schrieb Herbert Xu: > > Hi Herbert, > > > On Fri, Nov 10, 2017 at 01:20:55PM +0100, Stephan Müller wrote: > > > The code paths protected by the socket-lock do not use or modify the > > > so

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Stephan Mueller
Am Freitag, 24. November 2017, 17:25:55 CET schrieb Dmitry Vyukov: Hi Dmitry, > Eric also pointed me to grep. But I can't say the code is intuitive. > I've spent way more time than I expected to just get a list of all > algorithms with their types. Say, in some cases algorithm descriptions > do n

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Dmitry Vyukov
On Fri, Nov 24, 2017 at 5:19 PM, Stephan Mueller wrote: > Am Freitag, 24. November 2017, 17:10:59 CET schrieb Dmitry Vyukov: > > Hi Dmitry, > >> That's more-or-less what I did. Here: >> >> var allAlgs = map[int][]algDesc{ >> ALG_AEAD: []algDesc{ >> // templates: >> {"authencesn", []int{A

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Stephan Mueller
Am Freitag, 24. November 2017, 17:18:08 CET schrieb Dmitry Vyukov: Hi Dmitry, > > > {"rfc7539esp", []int{ALG_BLKCIPHER, ALG_HASH}}, > > {"rfc7539", []int{ALG_BLKCIPHER, ALG_HASH}}, > > {"rfc4543", []int{ALG_AEAD}}, > > {"rfc4106", []

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Stephan Mueller
Am Freitag, 24. November 2017, 17:10:59 CET schrieb Dmitry Vyukov: Hi Dmitry, > That's more-or-less what I did. Here: > > var allAlgs = map[int][]algDesc{ > ALG_AEAD: []algDesc{ > // templates: > {"authencesn", []int{ALG_HASH, ALG_BLKCIPHER}}, > {"gcm", []int{ALG_CIPHER}}, > > ALG

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Dmitry Vyukov
On Fri, Nov 24, 2017 at 4:03 PM, Stephan Mueller wrote: > Am Freitag, 24. November 2017, 14:49:49 CET schrieb Dmitry Vyukov: > > Hi Dmitry, > >> I've cooked syzkaller change that teaches it to generate more >> algorithm names. Probably not idea, but much better than was before: >> https://github.c

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Dmitry Vyukov
On Fri, Nov 24, 2017 at 4:03 PM, Stephan Mueller wrote: > Am Freitag, 24. November 2017, 14:49:49 CET schrieb Dmitry Vyukov: > > Hi Dmitry, > >> I've cooked syzkaller change that teaches it to generate more >> algorithm names. Probably not idea, but much better than was before: >> https://github.c

Re: [PATCH v3] crypto: algif_aead - skip SGL entries with NULL page

2017-11-24 Thread Stephan Mueller
Am Freitag, 24. November 2017, 08:37:28 CET schrieb Herbert Xu: Hi Herbert, > On Fri, Nov 10, 2017 at 11:04:52AM +0100, Stephan Müller wrote: > > Hi Herbert, > > > > I missed the termination of the outer loop of list_for_each_entry_safe. > > > > The patch was tested on x86 64 and 32 bit environ

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Stephan Mueller
Am Freitag, 24. November 2017, 16:53:26 CET schrieb Dmitry Vyukov: Hi Dmitry, > > You cannot talk to the inner ciphers. You only talk to one cipher that you > > referred to with the name. Remember, the name is ONLY used to tell the > > kernel which parts to put together during allocation. After t

Re: [PATCH v3] crypto: AF_ALG - remove locking in async callback

2017-11-24 Thread Stephan Mueller
Am Freitag, 24. November 2017, 08:37:39 CET schrieb Herbert Xu: Hi Herbert, > On Fri, Nov 10, 2017 at 01:20:55PM +0100, Stephan Müller wrote: > > The code paths protected by the socket-lock do not use or modify the > > socket in a non-atomic fashion. The actions pertaining the socket do not > > e

Re: [PATCH v3] crypto: algif_aead - skip SGL entries with NULL page

2017-11-24 Thread Herbert Xu
On Fri, Nov 10, 2017 at 11:04:52AM +0100, Stephan Müller wrote: > Hi Herbert, > > I missed the termination of the outer loop of list_for_each_entry_safe. > > The patch was tested on x86 64 and 32 bit environments. > > ---8<--- > > The TX SGL may contain SGL entries that are assigned a NULL page

Re: [PATCH v3] crypto: AF_ALG - remove locking in async callback

2017-11-24 Thread Herbert Xu
On Fri, Nov 10, 2017 at 01:20:55PM +0100, Stephan Müller wrote: > The code paths protected by the socket-lock do not use or modify the > socket in a non-atomic fashion. The actions pertaining the socket do not > even need to be handled as an atomic operation. Thus, the socket-lock > can be safely i

Re: [PATCH 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-11-24 Thread PrasannaKumar Muralidharan
On 24 November 2017 at 20:55, PrasannaKumar Muralidharan wrote: > Hi Lukasz, > > Some minor comments below. > > On 23 November 2017 at 20:39, Łukasz Stelmach wrote: >> Add support for True Random Number Generator found in Samsung Exynos >> 5250+ SoCs. >> >> Signed-off-by: Łukasz Stelmach >> ---

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Dmitry Vyukov
On Fri, Nov 24, 2017 at 4:13 PM, Stephan Mueller wrote: > Am Freitag, 24. November 2017, 15:55:59 CET schrieb Dmitry Vyukov: > > Hi Dmitry, > >> On Fri, Nov 24, 2017 at 3:36 PM, Stephan Mueller > wrote: >> > Am Freitag, 24. November 2017, 14:49:49 CET schrieb Dmitry Vyukov: >> > >> > Hi Dmitry, >

Re: [PATCH 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-11-24 Thread PrasannaKumar Muralidharan
Hi Lukasz, Some minor comments below. On 23 November 2017 at 20:39, Łukasz Stelmach wrote: > Add support for True Random Number Generator found in Samsung Exynos > 5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > --- > MAINTAINERS | 7 + > drivers/char/hw_random/Kcon

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Stephan Mueller
Am Freitag, 24. November 2017, 15:55:59 CET schrieb Dmitry Vyukov: Hi Dmitry, > On Fri, Nov 24, 2017 at 3:36 PM, Stephan Mueller wrote: > > Am Freitag, 24. November 2017, 14:49:49 CET schrieb Dmitry Vyukov: > > > > Hi Dmitry, > > > >> On Thu, Nov 23, 2017 at 1:35 PM, Stephan Mueller > > > >

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Stephan Mueller
Am Freitag, 24. November 2017, 14:49:49 CET schrieb Dmitry Vyukov: Hi Dmitry, > I've cooked syzkaller change that teaches it to generate more > algorithm names. Probably not idea, but much better than was before: > https://github.com/google/syzkaller/blob/ddf7b3e0655cf6dfeacfe509e477c1486d2 > cc7

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Dmitry Vyukov
On Fri, Nov 24, 2017 at 3:36 PM, Stephan Mueller wrote: > Am Freitag, 24. November 2017, 14:49:49 CET schrieb Dmitry Vyukov: > > Hi Dmitry, > >> On Thu, Nov 23, 2017 at 1:35 PM, Stephan Mueller > wrote: >> > Am Donnerstag, 23. November 2017, 12:34:54 CET schrieb Dmitry Vyukov: >> > >> > Hi Dmitry

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Stephan Mueller
Am Freitag, 24. November 2017, 14:49:49 CET schrieb Dmitry Vyukov: Hi Dmitry, > On Thu, Nov 23, 2017 at 1:35 PM, Stephan Mueller wrote: > > Am Donnerstag, 23. November 2017, 12:34:54 CET schrieb Dmitry Vyukov: > > > > Hi Dmitry, > > > >> Btw, I've started doing some minimal improvements, did

Re: [PATCH 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-11-24 Thread Krzysztof Kozlowski
On Fri, Nov 24, 2017 at 2:05 PM, Stephan Müller wrote: > Am Freitag, 24. November 2017, 13:09:06 CET schrieb Krzysztof Kozlowski: > > Hi Krzysztof, >> >> >> >> 1. I was rather thinking about extending existing exynos-rng.c [1] so >> >> it would be using TRNG as seed for PRNG as this gives you much

Re: x509 parsing bug + fuzzing crypto in the userspace

2017-11-24 Thread Dmitry Vyukov
On Thu, Nov 23, 2017 at 1:35 PM, Stephan Mueller wrote: > Am Donnerstag, 23. November 2017, 12:34:54 CET schrieb Dmitry Vyukov: > > Hi Dmitry, > >> Btw, I've started doing some minimal improvements, did not yet sorted >> out alg types/names, and fuzzer started scratching surface: >> >> WARNING: ke

Re: Question about ahash export and import

2017-11-24 Thread Kamil Konieczny
On 27.09.2017 11:08, Herbert Xu wrote: > On Tue, Sep 26, 2017 at 01:09:05PM +0200, Kamil Konieczny wrote: >> >> Can import() be called without _any_ init(), for example >> after reboot of machine ? Is following scenario valid: > > Of course it can. import must restore the state of the request > t

Re: [PATCH 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-11-24 Thread Stephan Müller
Am Freitag, 24. November 2017, 13:09:06 CET schrieb Krzysztof Kozlowski: Hi Krzysztof, > >> > >> 1. I was rather thinking about extending existing exynos-rng.c [1] so > >> it would be using TRNG as seed for PRNG as this gives you much more > >> random data. Instead you developed totally separate

Re: [PATCH 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-11-24 Thread Krzysztof Kozlowski
On Thu, Nov 23, 2017 at 7:46 PM, Łukasz Stelmach wrote: > It was <2017-11-23 czw 17:31>, when Krzysztof Kozlowski wrote: >> On Thu, Nov 23, 2017 at 4:09 PM, Łukasz Stelmach >> wrote: >>> Add support for True Random Number Generator found in Samsung Exynos >>> 5250+ SoCs. >>> >>> Signed-off-by: Ł

Re: [PATCH] crypto: skcipher - Fix skcipher_walk_aead_common

2017-11-24 Thread Ondrej Mosnáček
(I accidentally hit "reply" instead of "reply all", so resending) 2017-11-24 6:07 GMT+01:00 Herbert Xu : > On Thu, Nov 23, 2017 at 01:49:06PM +0100, Ondrej Mosnacek wrote: >> diff --git a/crypto/skcipher.c b/crypto/skcipher.c >> index 4faa0fd53b0c..6c45ed536664 100644 >> --- a/crypto/skcipher.c >>

[PATCH v2] ARM64: crypto: do not call crypto_unregister_skcipher twice on error

2017-11-24 Thread Corentin Labbe
When a cipher fails to register in aes_init(), the error path goes thought aes_exit() then crypto_unregister_skciphers(). Since aes_exit calls also crypto_unregister_skcipher, this triggers a refcount_t: underflow; use-after-free. Signed-off-by: Corentin Labbe --- Changes since v1: - Instead of d