Re: [dm-devel] [PATCH v5 0/3] init: add support to directly boot to a mapped device

2016-02-26 Thread Kees Cook
On Fri, Feb 26, 2016 at 11:21 AM, Mike Snitzer <snit...@redhat.com> wrote: > On Fri, Feb 26 2016 at 1:52pm -0500, > Kees Cook <keesc...@chromium.org> wrote: > >> On Fri, Feb 26, 2016 at 8:53 AM, Mike Snitzer <snit...@redhat.com> wrote: >> > On Mon, Fe

[dm-devel] [PATCH v5 2/3] dm: make mapped_device locking functions available

2016-02-20 Thread Kees Cook
For init to build a mapped_device, it must hold the appropriate locks, so move these to the common header. Signed-off-by: Kees Cook <keesc...@chromium.org> --- v5: first version of this specific patch in the series --- drivers/md/dm.h | 2 -- include/linux/device-mapper

Re: [dm-devel] [PATCH v6 0/3] dm: boot a mapped device without an initramfs

2017-04-18 Thread Kees Cook
584 insertions(+), 8 deletions(-) > create mode 100644 Documentation/device-mapper/boot.txt > create mode 100644 init/do_mounts_dm.c > > -- > 2.9.3 > -- Kees Cook Pixel Security -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH v8 0/2] dm: boot a mapped device without an initramfs

2017-06-27 Thread Kees Cook
| 10 + > init/do_mounts_dm.c | 459 > > 9 files changed, 596 insertions(+) > create mode 100644 Documentation/device-mapper/dm-boot.txt > create mode 100644 init/do_mounts_dm.c > > -- > 2.9.3 > -- Kees Cook Pixel Security -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH] md: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
sdair Kergon <a...@redhat.com> Cc: Mike Snitzer <snit...@redhat.com> Cc: dm-devel@redhat.com Cc: linux-bca...@vger.kernel.org Cc: linux-r...@vger.kernel.org Signed-off-by: Kees Cook <keesc...@chromium.org> --- drivers/md/bcache/stats.c | 8 +++- drivers/md/dm-delay.c | 6 +++---

Re: [dm-devel] [PATCH] md: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
On Mon, Oct 16, 2017 at 7:12 PM, Shaohua Li <s...@kernel.org> wrote: > On Mon, Oct 16, 2017 at 05:01:48PM -0700, Kees Cook wrote: >> In preparation for unconditionally passing the struct timer_list pointer to >> all timer callbacks, switch to using the new timer_setup() and fr

Re: [dm-devel] [PATCH] md: Convert timers to use timer_setup()

2017-10-18 Thread Kees Cook
On Mon, Oct 16, 2017 at 8:06 PM, Michael Lyle <ml...@lyle.org> wrote: > On 10/16/2017 05:01 PM, Kees Cook wrote: >> In preparation for unconditionally passing the struct timer_list pointer to >> all timer callbacks, switch to using the new timer_setup() and from_timer()

[dm-devel] [PATCH] dm: writecache: Use 2-factor allocator arguments

2018-06-18 Thread Kees Cook
This adjusts the allocator calls to use the 2-factor argument style, as already done treewide for better defense against allocator overflows. Additionally adjusts style nit to avoid assignments in test expressions. Signed-off-by: Kees Cook --- drivers/md/dm-writecache.c | 16 ++-- 1

Re: [dm-devel] [PATCH] dm: writecache: Use 2-factor allocator arguments

2018-06-18 Thread Kees Cook
On Mon, Jun 18, 2018 at 2:12 PM, Mikulas Patocka wrote: > > > On Mon, 18 Jun 2018, Kees Cook wrote: > >> This adjusts the allocator calls to use the 2-factor argument style, as >> already done treewide for better defense against allocator overflows. >> Additiona

Re: [dm-devel] [PATCH v3 4/9] dm integrity: Remove VLA usage

2018-06-29 Thread Kees Cook
On Fri, Jun 29, 2018 at 1:43 PM, Arnd Bergmann wrote: > On Fri, Jun 29, 2018 at 2:28 AM, Kees Cook wrote: > >> diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c >> index 86438b2f10dd..85e8ce1625a2 100644 >> --- a/drivers/md/dm-integrity.c >> +

Re: [dm-devel] [PATCH v2 11/11] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-06-26 Thread Kees Cook
On Tue, Jun 26, 2018 at 2:20 AM, Herbert Xu wrote: > On Mon, Jun 25, 2018 at 02:10:26PM -0700, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this >> caps the skcipher request size similar to other limits and adds a >> sanity check at regi

Re: [dm-devel] [PATCH v2 10/11] crypto: ahash: Remove VLA usage for AHASH_REQUEST_ON_STACK

2018-06-26 Thread Kees Cook
SH_REQUEST_ON_STACK(req, tfm_michael); net/wireless/lib80211_crypt_tkip.c: AHASH_REQUEST_ON_STACK(req, tfm_michael); Regardless, I'll take a closer look at these. The other patches leading up to the REQSIZE ones, though, I think are ready to go? They're distinct from the last two, so the fir

Re: [dm-devel] [PATCH v2 10/11] crypto: ahash: Remove VLA usage for AHASH_REQUEST_ON_STACK

2018-06-27 Thread Kees Cook
On Wed, Jun 27, 2018 at 7:34 AM, Herbert Xu wrote: > On Tue, Jun 26, 2018 at 10:02:31AM -0700, Kees Cook wrote: >> >> There is no SHASH_MAX_REQSIZE? >> >> As for users of AHASH_REQUEST_ON_STACK, I see: > > These users are only using the top-level ahash interface.

Re: [dm-devel] [PATCH v2 11/11] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-06-27 Thread Kees Cook
On Wed, Jun 27, 2018 at 7:36 AM, Herbert Xu wrote: > On Tue, Jun 26, 2018 at 09:45:09AM -0700, Kees Cook wrote: >> >> Which are likely to be wrapped together? Should I take this to 512 or >> something else? > > The situation is similar to ahash. While they're using th

Re: [dm-devel] [PATCH v2 11/11] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-06-27 Thread Kees Cook
On Wed, Jun 27, 2018 at 3:27 PM, Herbert Xu wrote: > On Wed, Jun 27, 2018 at 11:31:09AM -0700, Kees Cook wrote: >> crypto/lrw.c: crypto_skcipher_set_reqsize(tfm, >> crypto_skcipher_reqsize(cipher) + >> crypto/lrw.c-sizeof(struct rctx)); &

Re: [dm-devel] dm: writecache: Use 2-factor allocator arguments

2018-06-27 Thread Kees Cook
On Wed, Jun 27, 2018 at 2:52 PM, Mike Snitzer wrote: > On Wed, Jun 27 2018 at 5:48pm -0400, > Kees Cook wrote: > >> On Mon, Jun 18, 2018 at 10:50 AM, Kees Cook wrote: >> > This adjusts the allocator calls to use the 2-factor argument style, as >> > already

Re: [dm-devel] [PATCH v2 10/11] crypto: ahash: Remove VLA usage for AHASH_REQUEST_ON_STACK

2018-06-25 Thread Kees Cook
On Mon, Jun 25, 2018 at 3:56 PM, Eric Biggers wrote: > On Mon, Jun 25, 2018 at 02:10:25PM -0700, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this caps >> the ahash request size similar to the other limits and adds a sanity >>

[dm-devel] [PATCH v2 03/11] crypto: shash: Remove VLA usage

2018-06-25 Thread Kees Cook
://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-cry...@vger.kernel.org Signed-off-by: Kees Cook --- crypto/shash.c| 6 +++--- include/crypto/hash.h | 6 +- 2 files changed, 8 insertions(+), 4 deletion

[dm-devel] [PATCH v2 11/11] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-06-25 Thread Kees Cook
...@mail.gmail.com Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-cry...@vger.kernel.org Signed-off-by: Kees Cook --- include/crypto/internal/skcipher.h | 1 + include/crypto/skcipher.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/crypto/internal/skc

[dm-devel] [PATCH v2 07/11] crypto alg: Introduce generic max blocksize and alignmask

2018-06-25 Thread Kees Cook
kernel.org Signed-off-by: Kees Cook --- crypto/algapi.c | 7 ++- include/crypto/algapi.h | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/crypto/algapi.c b/crypto/algapi.c index c0755cf4f53f..496fc51bf215 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -5

[dm-devel] [PATCH v2 02/11] crypto: cbc: Remove VLA usage

2018-06-25 Thread Kees Cook
Cc: "David S. Miller" Cc: linux-cry...@vger.kernel.org Signed-off-by: Kees Cook --- include/crypto/cbc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/crypto/cbc.h b/include/crypto/cbc.h index f5b8bfc22e6d..47db0aac2ab9 100644 --- a/include/crypto/c

[dm-devel] [PATCH v2 00/11] crypto: Remove VLA usage

2018-06-25 Thread Kees Cook
o #defines being used). Thanks! -Kees [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Kees Cook (11): crypto: xcbc: Remove VLA usage crypto: cbc: Remove VLA usage crypto: shash: Remove VLA usage dm integrity: Remove VLA usage crypto: aha

[dm-devel] [PATCH v2 01/11] crypto: xcbc: Remove VLA usage

2018-06-25 Thread Kees Cook
-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-cry...@vger.kernel.org Signed-off-by: Kees Cook --- crypto/xcbc.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crypto/xcbc.c b/crypto/xcbc.c index 25c75af50d3f..7aa03beed

[dm-devel] [PATCH v2 05/11] crypto: ahash: Remove VLA usage

2018-06-25 Thread Kees Cook
: "David S. Miller" Cc: linux-cry...@vger.kernel.org Signed-off-by: Kees Cook --- crypto/ahash.c| 4 ++-- crypto/algif_hash.c | 2 +- include/crypto/hash.h | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/crypto/ahash.c b/crypto/ahash.c index a6

[dm-devel] [PATCH v2 06/11] dm verity fec: Remove VLA usage

2018-06-25 Thread Kees Cook
-devel@redhat.com Signed-off-by: Kees Cook --- drivers/md/dm-verity-fec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-verity-fec.c b/drivers/md/dm-verity-fec.c index 684af08d0747..fe5cfd1a5fa5 100644 --- a/drivers/md/dm-verity-fec.c +++ b/drivers/md/dm

[dm-devel] [PATCH v2 09/11] crypto: shash: Remove VLA usage in unaligned hashing

2018-06-25 Thread Kees Cook
this helper was the only user. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-cry...@vger.kernel.org Signed-off-by: Kees Cook --- crypto/shash.c | 19 --- inc

[dm-devel] [PATCH v2 10/11] crypto: ahash: Remove VLA usage for AHASH_REQUEST_ON_STACK

2018-06-25 Thread Kees Cook
c: Herbert Xu Cc: "David S. Miller" Cc: Eric Biggers Cc: Tim Chen Cc: Rabin Vincent Cc: Lars Persson Cc: linux-cry...@vger.kernel.org Signed-off-by: Kees Cook --- include/crypto/hash.h | 3 ++- include/crypto/internal/hash.h | 1 + 2 files changed, 3 insertions(+), 1 del

Re: [dm-devel] [PATCH v2 01/11] crypto: xcbc: Remove VLA usage

2018-06-25 Thread Kees Cook
On Mon, Jun 25, 2018 at 2:23 PM, Joe Perches wrote: > On Mon, 2018-06-25 at 14:10 -0700, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this uses >> the maximum blocksize and adds a sanity check. For xcbc, the blocksize >> must always be 1

[dm-devel] [PATCH v2 08/11] crypto: qat: Remove VLA usage

2018-06-25 Thread Kees Cook
vid S. Miller" Cc: Arnd Bergmann Cc: qat-li...@intel.com Cc: linux-cry...@vger.kernel.org Signed-off-by: Kees Cook --- drivers/crypto/qat/qat_common/qat_algs.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/

[dm-devel] [PATCH v2 04/11] dm integrity: Remove VLA usage

2018-06-25 Thread Kees Cook
Snitzer Cc: dm-devel@redhat.com Signed-off-by: Kees Cook --- drivers/md/dm-integrity.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 86438b2f10dd..85e8ce1625a2 100644 --- a/drivers/md/dm

Re: [dm-devel] [PATCH 01/11] crypto: shash: Remove VLA usage

2018-06-20 Thread Kees Cook
On Wed, Jun 20, 2018 at 12:30 PM, Christophe Leroy wrote: > > > On 06/20/2018 07:03 PM, Kees Cook wrote: >> >> In the quest to remove all stack VLA usage from the kernel[1], this >> removes the VLAs in SHASH_DESC_ON_STACK (via crypto_shash_descsize()) >> by using

Re: [dm-devel] [PATCH 01/11] crypto: shash: Remove VLA usage

2018-06-20 Thread Kees Cook
On Wed, Jun 20, 2018 at 1:39 PM, Christophe LEROY wrote: > > > Le 20/06/2018 à 22:36, Kees Cook a écrit : >> >> On Wed, Jun 20, 2018 at 12:30 PM, Christophe Leroy >> wrote: >>> >>> >>> >>> On 06/20/2018 07:03 PM, Kees Cook wrote:

Re: [dm-devel] [PATCH 11/11] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-06-20 Thread Kees Cook
On Wed, Jun 20, 2018 at 12:44 PM, Arnd Bergmann wrote: > On Wed, Jun 20, 2018 at 9:04 PM, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this >> caps the skcipher request size similar to other limits and adds a sanity >>

[dm-devel] [PATCH 07/11] crypto: xcbc: Remove VLA usage

2018-06-20 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the maximum blocksize and adds a sanity check. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/xcbc.c | 5 - 1 file changed, 4

[dm-devel] [PATCH 11/11] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-06-20 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this caps the skcipher request size similar to other limits and adds a sanity check at registration. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook

[dm-devel] [PATCH 09/11] crypto: shash: Remove VLA usage in unaligned hashing

2018-06-20 Thread Kees Cook
-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/shash.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/crypto/shash.c b/crypto/shash.c index ab6902c6dae7..1bb58209330a 100644 --- a/crypto/shash.c +++ b/crypto/shash.c @@ -73,13

[dm-devel] [PATCH 05/11] crypto alg: Introduce max blocksize and alignmask

2018-06-20 Thread Kees Cook
://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/algapi.c| 5 - include/linux/crypto.h | 4 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/crypto/algapi.c b/crypto/algapi.c index c0755cf4f53f

[dm-devel] [PATCH 03/11] crypto: ahash: Remove VLA usage

2018-06-20 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this introduces max size macros for ahash, as already done for shash, and adjust the crypto user to max state size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees

[dm-devel] [PATCH 00/11] crypto: Remove VLA usage

2018-06-20 Thread Kees Cook
(new crypto #defines being used). Thanks! -Kees [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Kees Cook (11): crypto: shash: Remove VLA usage dm integrity: Remove VLA usage crypto: ahash: Remove VLA usage dm verity fec: Remove VLA

[dm-devel] [PATCH 10/11] crypto: ahash: Remove VLA usage for AHASH_REQUEST_ON_STACK

2018-06-20 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this caps the ahash request size similar to the other limits and adds a sanity check at registration. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook

[dm-devel] [PATCH 08/11] crypto: qat: Remove VLA usage

2018-06-20 Thread Kees Cook
was just exposing the existing max stack size, so there is nothing new here; now that it is not hidden in a VLA, the compiler can see how large it might get. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- drivers

[dm-devel] [PATCH 06/11] crypto: cbc: Remove VLA usage

2018-06-20 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the upper bounds on blocksize. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- include/crypto/cbc.h | 2 +- 1 file changed, 1 insertion(+), 1

[dm-devel] [PATCH 02/11] dm integrity: Remove VLA usage

2018-06-20 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the new SHASH_MAX_DIGESTSIZE from the crypto layer to allocate the upper bounds on stack usage. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook

Re: [dm-devel] [PATCH 04/11] dm verity fec: Remove VLA usage

2018-06-20 Thread Kees Cook
On Wed, Jun 20, 2018 at 4:33 PM, Eric Biggers wrote: > On Wed, Jun 20, 2018 at 12:04:01PM -0700, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this >> uses the newly defined max digest size macro. Also adds a sanity-check >> at use-time

Re: [dm-devel] [PATCH 05/11] crypto alg: Introduce max blocksize and alignmask

2018-06-20 Thread Kees Cook
On Wed, Jun 20, 2018 at 4:40 PM, Eric Biggers wrote: > On Wed, Jun 20, 2018 at 12:04:02PM -0700, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this >> exposes the existing upper bound on crypto block sizes for VLA removal, >> and i

Re: [dm-devel] [PATCH 09/11] crypto: shash: Remove VLA usage in unaligned hashing

2018-06-20 Thread Kees Cook
On Wed, Jun 20, 2018 at 4:57 PM, Eric Biggers wrote: > On Wed, Jun 20, 2018 at 12:04:06PM -0700, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this uses >> the newly defined max alignment to perform unaligned hashing to avoid >> VLAs,

Re: [dm-devel] [PATCH 07/11] crypto: xcbc: Remove VLA usage

2018-06-20 Thread Kees Cook
On Wed, Jun 20, 2018 at 4:46 PM, Eric Biggers wrote: > On Wed, Jun 20, 2018 at 12:04:04PM -0700, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this uses >> the maximum blocksize and adds a sanity check. >> >> [1] >> htt

Re: [dm-devel] [PATCH v3 9/9] crypto: shash: Remove VLA usage in unaligned hashing

2018-07-02 Thread Kees Cook
On Sun, Jul 1, 2018 at 10:20 AM, Eric Biggers wrote: > On Sun, Jul 01, 2018 at 10:04:59AM -0700, Kees Cook wrote: >> On Sat, Jun 30, 2018 at 12:03 AM, Eric Biggers wrote: >> > On Thu, Jun 28, 2018 at 05:28:43PM -0700, Kees Cook wrote: >> >> @@ -88,11 +81,13 @@ sta

Re: [dm-devel] [PATCH v3 9/9] crypto: shash: Remove VLA usage in unaligned hashing

2018-07-01 Thread Kees Cook
On Sat, Jun 30, 2018 at 12:03 AM, Eric Biggers wrote: > On Thu, Jun 28, 2018 at 05:28:43PM -0700, Kees Cook wrote: >> @@ -88,11 +81,13 @@ static int shash_update_unaligned(struct shash_desc >> *desc, const u8 *data, >> unsigned long alignmask = crypt

Re: [dm-devel] [PATCH] dm/raid1: Remove VLA usage

2018-04-26 Thread Kees Cook
On Tue, Apr 10, 2018 at 9:43 PM, Kees Cook <keesc...@chromium.org> wrote: > On the quest to remove all VLAs from the kernel[1], this avoids VLAs > in dm-raid1.c by just using the maximum size for the stack arrays. > The nr_mirrors value was already capped at 9, so this mak

Re: [dm-devel] [PATCH 04/11] dm verity fec: Remove VLA usage

2018-06-21 Thread Kees Cook
On Wed, Jun 20, 2018 at 7:30 PM, Herbert Xu wrote: > On Wed, Jun 20, 2018 at 12:04:01PM -0700, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this >> uses the newly defined max digest size macro. Also adds a sanity-check >> at use-time

[dm-devel] [PATCH v7 6/9] crypto alg: Introduce generic max blocksize and alignmask

2018-08-02 Thread Kees Cook
cra_blocksize is 144 (SHA3_224_BLOCK_SIZE, 18 8-byte words). For the new blocksize limit, I went with 160 (20 8-byte words). [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/algapi.c | 7 ++- include

[dm-devel] [PATCH v7 1/9] crypto: xcbc: Remove VLA usage

2018-08-02 Thread Kees Cook
-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/xcbc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crypto/xcbc.c b/crypto/xcbc.c index 25c75af50d3f..c055f57fab11 100644 --- a/crypto/xcbc.c +++ b/crypto/xcbc.c @@ -57,15 +57,17 @@ struct

[dm-devel] [PATCH v7 0/9] crypto: Remove VLA usage

2018-08-02 Thread Kees Cook
d Biesheuvel (1): crypto: ccm: Remove VLA usage Kees Cook (8): crypto: xcbc: Remove VLA usage crypto: cbc: Remove VLA usage crypto: hash: Remove VLA usage dm: Remove VLA usage from hashes crypto alg: Introduce generic max blocksize and alignmask crypto: qat: Remove VLA usage crypt

[dm-devel] [PATCH v7 4/9] crypto: hash: Remove VLA usage

2018-08-02 Thread Kees Cook
...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/ahash.c| 4 ++-- crypto/algif_hash.c | 2 +- crypto/shash.c| 6 +++--- include/crypto/hash.h | 6 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/crypto/ahash.c b/crypto/ahash.c index a64c143165b1..78aaf2158c43

[dm-devel] [PATCH v7 5/9] dm: Remove VLA usage from hashes

2018-08-02 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the new HASH_MAX_DIGESTSIZE from the crypto layer to allocate the upper bounds on stack usage. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook

[dm-devel] [PATCH v7 7/9] crypto: qat: Remove VLA usage

2018-08-02 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the new upper bound for the stack buffer. Also adds a sanity check. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- drivers/crypto/qat

[dm-devel] [PATCH v7 3/9] crypto: ccm: Remove VLA usage

2018-08-05 Thread Kees Cook
=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Ard Biesheuvel Signed-off-by: Kees Cook --- crypto/ccm.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crypto/ccm.c b/crypto/ccm.c index 0a083342ec8c..b242fd0d3262 100644 --- a/crypto/ccm.c +++ b/crypto/ccm.c @@ -50,7

[dm-devel] [PATCH v7 2/9] crypto: cbc: Remove VLA usage

2018-08-05 Thread Kees Cook
-by: Kees Cook --- include/crypto/cbc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/crypto/cbc.h b/include/crypto/cbc.h index f5b8bfc22e6d..47db0aac2ab9 100644 --- a/include/crypto/cbc.h +++ b/include/crypto/cbc.h @@ -113,7 +113,9 @@ static inline int

[dm-devel] [PATCH v7 9/9] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-08-05 Thread Kees Cook
crypto_skcipher_set_reqsize: 88 crypto_skcipher_set_reqsize: 472 [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- include/crypto/internal/skcipher.h | 1 + include/crypto/skcipher.h | 4

[dm-devel] [PATCH v7 8/9] crypto: shash: Remove VLA usage in unaligned hashing

2018-08-05 Thread Kees Cook
this helper was the only user. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/shash.c | 27 --- include/linux/compiler-gcc.h | 1 - 2 files changed, 16 insertions(+), 12

Re: [dm-devel] [PATCH v7 2/9] crypto: cbc: Remove VLA usage

2018-08-07 Thread Kees Cook
On Tue, Aug 7, 2018 at 2:47 AM, Herbert Xu wrote: > On Thu, Aug 02, 2018 at 03:51:45PM -0700, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this >> uses the upper bounds on blocksize. Since this is always a cipher >> blocksize, use th

[dm-devel] [PATCH v8 4/9] crypto: hash: Remove VLA usage

2018-08-07 Thread Kees Cook
...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/ahash.c| 4 ++-- crypto/algif_hash.c | 2 +- crypto/shash.c| 6 +++--- include/crypto/hash.h | 6 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/crypto/ahash.c b/crypto/ahash.c index a64c143165b1..78aaf2158c43

[dm-devel] [PATCH v8 5/9] dm: Remove VLA usage from hashes

2018-08-07 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the new HASH_MAX_DIGESTSIZE from the crypto layer to allocate the upper bounds on stack usage. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook

[dm-devel] [PATCH v8 0/9] crypto: Remove VLA usage

2018-08-07 Thread Kees Cook
ahash instead of guessing. - improve names and comments for alg maxes Ard Biesheuvel (1): crypto: ccm: Remove VLA usage Kees Cook (8): crypto: xcbc: Remove VLA usage crypto: cbc: Remove VLA usage crypto: hash: Remove VLA usage dm: Remove VLA usage from hashes crypto alg: Introduce generi

[dm-devel] [PATCH v8 8/9] crypto: shash: Remove VLA usage in unaligned hashing

2018-08-07 Thread Kees Cook
this helper was the only user. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/shash.c | 27 --- include/linux/compiler-gcc.h | 1 - 2 files changed, 16 insertions(+), 12

[dm-devel] [PATCH v8 7/9] crypto: qat: Remove VLA usage

2018-08-07 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the new upper bound for the stack buffer. Also adds a sanity check. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- drivers/crypto/qat

[dm-devel] [PATCH v8 6/9] crypto alg: Introduce generic max blocksize and alignmask

2018-08-07 Thread Kees Cook
cra_blocksize is 144 (SHA3_224_BLOCK_SIZE, 18 8-byte words). For the new blocksize limit, I went with 160 (20 8-byte words). [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/algapi.c | 7 ++- include

[dm-devel] [PATCH v8 1/9] crypto: xcbc: Remove VLA usage

2018-08-07 Thread Kees Cook
-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/xcbc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crypto/xcbc.c b/crypto/xcbc.c index 25c75af50d3f..c055f57fab11 100644 --- a/crypto/xcbc.c +++ b/crypto/xcbc.c @@ -57,15 +57,17 @@ struct

[dm-devel] [PATCH v8 9/9] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-08-07 Thread Kees Cook
crypto_skcipher_set_reqsize: 88 crypto_skcipher_set_reqsize: 472 [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- include/crypto/internal/skcipher.h | 1 + include/crypto/skcipher.h | 4

[dm-devel] [PATCH v8 2/9] crypto: cbc: Remove VLA usage

2018-08-07 Thread Kees Cook
-by: Kees Cook --- include/crypto/cbc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/crypto/cbc.h b/include/crypto/cbc.h index f5b8bfc22e6d..3bf28beefa33 100644 --- a/include/crypto/cbc.h +++ b/include/crypto/cbc.h @@ -113,7 +113,7 @@ static inline int

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-18 Thread Kees Cook
On Wed, Jul 18, 2018 at 7:55 PM, Ard Biesheuvel wrote: > I have only build tested it, so if you make sure that it does not break > anything, please go ahead. I can give it a spin; what's the best way? Is CONFIG_CRYPTO_MANAGER=y sufficient? -Kees -- Kees Cook Pixel Security -- dm

Re: [dm-devel] [PATCH v5 05/11] crypto: ahash: Remove VLA usage

2018-07-18 Thread Kees Cook
e. Yup, it certainly looks that way on investigation. I'll adjust both ahash and shash to use the same #define. -Kees -- Kees Cook Pixel Security -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-18 Thread Kees Cook
On Wed, Jul 18, 2018 at 8:19 AM, Ard Biesheuvel wrote: > On 18 July 2018 at 23:50, Ard Biesheuvel wrote: >> On 18 July 2018 at 05:59, Arnd Bergmann wrote: >>> On Sun, Jul 15, 2018 at 6:28 AM, Kees Cook wrote: >>>> >>>> After my ahash to shash conversio

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-14 Thread Kees Cook
On Sat, Jul 14, 2018 at 7:44 PM, Herbert Xu wrote: > On Fri, Jul 13, 2018 at 08:07:10PM -0700, Kees Cook wrote: >> >> On a plane today I started converting all these to shash. IIUC, it >> just looks like this (apologies for whitespace damage): > > Yes if it doesn

Re: [dm-devel] [PATCH v5 05/11] crypto: ahash: Remove VLA usage

2018-07-17 Thread Kees Cook
On Tue, Jul 17, 2018 at 9:39 AM, Eric Biggers wrote: > On Mon, Jul 16, 2018 at 09:21:44PM -0700, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this >> introduces max size macros for ahash, as already done for shash, and >> adjust the cry

Re: [dm-devel] [PATCH v5 10/11] crypto: ahash: Remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-17 Thread Kees Cook
On Tue, Jul 17, 2018 at 9:43 AM, Eric Biggers wrote: > On Mon, Jul 16, 2018 at 09:21:49PM -0700, Kees Cook wrote: >> + reqsize = sizeof(struct shash_desc) + crypto_shash_descsize(shash); >> + if (WARN_ON(reqsize > AHASH_MAX_REQSIZE)) { >> +

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-14 Thread Kees Cook
On Fri, Jul 13, 2018 at 3:14 AM, Arnd Bergmann wrote: > On Fri, Jul 13, 2018 at 8:00 AM, Kees Cook wrote: >> On Thu, Jul 12, 2018 at 10:20 PM, Herbert Xu >> wrote: >>> On Thu, Jul 12, 2018 at 10:17:29PM -0700, Kees Cook wrote: >>>> What is the correct val

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-15 Thread Kees Cook
On Sun, Jul 15, 2018 at 5:01 PM, Herbert Xu wrote: > On Sat, Jul 14, 2018 at 07:59:09PM -0700, Kees Cook wrote: >> On Sat, Jul 14, 2018 at 7:44 PM, Herbert Xu >> wrote: >> > On Fri, Jul 13, 2018 at 08:07:10PM -0700, Kees Cook wrote: >> >> >> &g

[dm-devel] [PATCH] dm crypt: Convert essiv from ahash to shash

2018-07-15 Thread Kees Cook
to the crypto subsystem. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- drivers/md/dm-crypt.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/drivers/md/dm-crypt.c b/drivers

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-13 Thread Kees Cook
On Thu, Jul 12, 2018 at 11:22 PM, Herbert Xu wrote: > On Thu, Jul 12, 2018 at 11:16:28PM -0700, Kees Cook wrote: >> >> Is this correct? It seems like you did the bulk of >> AHASH_REQUEST_ON_STACK conversions in 2016. Can shash grow an sg >> interface? > >

[dm-devel] [PATCH v5 11/11] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-07-16 Thread Kees Cook
crypto_skcipher_set_reqsize: 88 crypto_skcipher_set_reqsize: 472 [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- include/crypto/internal/skcipher.h | 1 + include/crypto/skcipher.h | 4

[dm-devel] [PATCH v5 07/11] crypto alg: Introduce generic max blocksize and alignmask

2018-07-16 Thread Kees Cook
cra_blocksize is 144 (SHA3_224_BLOCK_SIZE, 18 8-byte words). For the new blocksize limit, I went with 160 (20 8-byte words). [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/algapi.c | 7 ++- include

[dm-devel] [PATCH v5 06/11] dm verity fec: Remove VLA usage

2018-07-16 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the newly defined max digest size macro. Also adds a sanity-check at use-time. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- drivers/md/dm

[dm-devel] [PATCH v5 10/11] crypto: ahash: Remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-16 Thread Kees Cook
hashes. A manual inspection of this shows the largest to be: sizeof(struct shash_desc) + SHASH_MAX_DESCSIZE [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/shash.c| 9 - include/crypto/hash.h

[dm-devel] [PATCH v5 05/11] crypto: ahash: Remove VLA usage

2018-07-16 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this introduces max size macros for ahash, as already done for shash, and adjust the crypto user to max state size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees

[dm-devel] [PATCH v5 00/11] crypto: Remove VLA usage

2018-07-16 Thread Kees Cook
fEzK6CC=qpxydaacu1rq...@mail.gmail.com Kees Cook (11): crypto: xcbc: Remove VLA usage crypto: cbc: Remove VLA usage crypto: shash: Remove VLA usage dm integrity: Remove VLA usage crypto: ahash: Remove VLA usage dm verity fec: Remove VLA usage crypto alg: Introduce generic max blocksize and ali

[dm-devel] [PATCH v5 02/11] crypto: cbc: Remove VLA usage

2018-07-16 Thread Kees Cook
-by: Kees Cook --- include/crypto/cbc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/crypto/cbc.h b/include/crypto/cbc.h index f5b8bfc22e6d..47db0aac2ab9 100644 --- a/include/crypto/cbc.h +++ b/include/crypto/cbc.h @@ -113,7 +113,9 @@ static inline int

[dm-devel] [PATCH v5 03/11] crypto: shash: Remove VLA usage

2018-07-16 Thread Kees Cook
shows that SHA512_DIGEST_SIZE (64) is the largest digest size and that sizeof(struct sha3_state) (360) is the largest descriptor size. The corresponding maximums are reduced. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook

[dm-devel] [PATCH v5 09/11] crypto: shash: Remove VLA usage in unaligned hashing

2018-07-16 Thread Kees Cook
this helper was the only user. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/shash.c | 27 --- include/linux/compiler-gcc.h | 1 - 2 files changed, 16 insertions(+), 12

[dm-devel] [PATCH v5 01/11] crypto: xcbc: Remove VLA usage

2018-07-16 Thread Kees Cook
-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- crypto/xcbc.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crypto/xcbc.c b/crypto/xcbc.c index 25c75af50d3f..7aa03beed795 100644 --- a/crypto/xcbc.c +++ b/crypto/xcbc.c @@ -57,6 +57,8 @@ struct

[dm-devel] [PATCH v5 04/11] dm integrity: Remove VLA usage

2018-07-16 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the new SHASH_MAX_DIGESTSIZE from the crypto layer to allocate the upper bounds on stack usage. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook

Re: [dm-devel] [PATCH v6 18/18] crypto: Remove AHASH_REQUEST_ON_STACK

2018-07-24 Thread Kees Cook
On Tue, Jul 24, 2018 at 10:31 AM, Joe Perches wrote: > On Tue, 2018-07-24 at 09:49 -0700, Kees Cook wrote: >> All users of AHASH_REQUEST_ON_STACK have been removed from the kernel, so >> drop it entirely so no VLAs get reintroduced by future users. > > checkpatch has a test

Re: [dm-devel] [PATCH v6 17/18] crypto: ccm: Remove VLA usage

2018-07-24 Thread Kees Cook
On Tue, Jul 24, 2018 at 9:57 AM, Ard Biesheuvel wrote: > On 24 July 2018 at 18:49, Kees Cook wrote: >> From: Ard Biesheuvel >> >> In the quest to remove all stack VLA usage from the kernel[1], this >> drops AHASH_REQUEST_ON_STACK by preallocated the ahash request are

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-19 Thread Kees Cook
On Thu, Jul 19, 2018 at 7:54 AM, Ard Biesheuvel wrote: > On 19 July 2018 at 12:13, Ard Biesheuvel wrote: >> >>> On 19 Jul 2018, at 12:09, Kees Cook wrote: >>> >>> On Wed, Jul 18, 2018 at 7:55 PM, Ard Biesheuvel >>> wrote: >>>> I ha

Re: [dm-devel] [PATCH v6 10/18] x86/power/64: Remove VLA usage

2018-07-25 Thread Kees Cook
On Wed, Jul 25, 2018 at 4:32 AM, Rafael J. Wysocki wrote: > On Tue, Jul 24, 2018 at 6:49 PM, Kees Cook wrote: >> In the quest to remove all stack VLA usage from the kernel[1], this >> removes the discouraged use of AHASH_REQUEST_ON_STACK by switching to >> shash di

[dm-devel] [PATCH v6 04/18] dm: Remove VLA usage from hashes

2018-07-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the new HASH_MAX_DIGESTSIZE from the crypto layer to allocate the upper bounds on stack usage. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook

[dm-devel] [PATCH v6 09/18] ppp: mppe: Remove VLA usage

2018-07-24 Thread Kees Cook
+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook Acked-by: Arnd Bergmann --- drivers/net/ppp/ppp_mppe.c | 56 -- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/drivers/net/ppp/ppp_mppe.c b/drivers/net/ppp

[dm-devel] [PATCH v6 12/18] drbd: Convert from ahash to shash

2018-07-24 Thread Kees Cook
and reduces stack usage. The stack allocation will be made a fixed size in a later patch to the crypto subsystem. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- drivers/block/drbd/drbd_int.h | 13 +++ drivers/block

[dm-devel] [PATCH v6 08/18] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-07-24 Thread Kees Cook
crypto_skcipher_set_reqsize: 88 crypto_skcipher_set_reqsize: 472 [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook --- include/crypto/internal/skcipher.h | 1 + include/crypto/skcipher.h | 4

  1   2   3   >