Re: [PATCH] rbd: remove VLA usage

2018-03-30 Thread Gustavo A. R. Silva
On 03/30/2018 03:29 PM, Ilya Dryomov wrote: On Fri, Mar 30, 2018 at 9:17 PM, Gustavo A. R. Silva wrote: In preparation to enabling -Wvla, remove the use of stack VLA. In this particular case, variable buf_size is replaced with a constant expression that can be

Re: [PATCH] rbd: remove VLA usage

2018-03-30 Thread Gustavo A. R. Silva
On 03/30/2018 03:29 PM, Ilya Dryomov wrote: On Fri, Mar 30, 2018 at 9:17 PM, Gustavo A. R. Silva wrote: In preparation to enabling -Wvla, remove the use of stack VLA. In this particular case, variable buf_size is replaced with a constant expression that can be computed at preprocessing

Re: [PATCH] rbd: remove VLA usage

2018-03-30 Thread Ilya Dryomov
On Fri, Mar 30, 2018 at 9:17 PM, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove the use of stack VLA. > > In this particular case, variable buf_size is replaced with a constant > expression that can be computed at preprocessing time. This avoids two

Re: [PATCH] rbd: remove VLA usage

2018-03-30 Thread Ilya Dryomov
On Fri, Mar 30, 2018 at 9:17 PM, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove the use of stack VLA. > > In this particular case, variable buf_size is replaced with a constant > expression that can be computed at preprocessing time. This avoids two > VLA warnings. Also, as

[PATCH] rbd: remove VLA usage

2018-03-30 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove the use of stack VLA. In this particular case, variable buf_size is replaced with a constant expression that can be computed at preprocessing time. This avoids two VLA warnings. Also, as a consequence of the mentioned change, some code was slightly

[PATCH] rbd: remove VLA usage

2018-03-30 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove the use of stack VLA. In this particular case, variable buf_size is replaced with a constant expression that can be computed at preprocessing time. This avoids two VLA warnings. Also, as a consequence of the mentioned change, some code was slightly

Re: [PATCH] rbd: Remove VLA usage

2018-03-12 Thread Ilya Dryomov
On Sat, Mar 10, 2018 at 6:14 AM, Kyle Spiers <k...@spiers.me> wrote: > From 4198ebe2e8058ff676d8e2f993d8806d6ca29c11 Mon Sep 17 00:00:00 2001 > From: Kyle Spiers <k...@spiers.me> > Date: Fri, 9 Mar 2018 12:34:15 -0800 > Subject: [PATCH] rbd: Remove VLA usage > > A

Re: [PATCH] rbd: Remove VLA usage

2018-03-12 Thread Ilya Dryomov
On Sat, Mar 10, 2018 at 6:14 AM, Kyle Spiers wrote: > From 4198ebe2e8058ff676d8e2f993d8806d6ca29c11 Mon Sep 17 00:00:00 2001 > From: Kyle Spiers > Date: Fri, 9 Mar 2018 12:34:15 -0800 > Subject: [PATCH] rbd: Remove VLA usage > > As part of the effort to remove VLAs from the ker

Re: [PATCH] rbd: Remove VLA usage

2018-03-10 Thread Kees Cook
On Fri, Mar 9, 2018 at 9:14 PM, Kyle Spiers <k...@spiers.me> wrote: > From 4198ebe2e8058ff676d8e2f993d8806d6ca29c11 Mon Sep 17 00:00:00 2001 > From: Kyle Spiers <k...@spiers.me> > Date: Fri, 9 Mar 2018 12:34:15 -0800 > Subject: [PATCH] rbd: Remove VLA usage > > As par

Re: [PATCH] rbd: Remove VLA usage

2018-03-10 Thread Kees Cook
On Fri, Mar 9, 2018 at 9:14 PM, Kyle Spiers wrote: > From 4198ebe2e8058ff676d8e2f993d8806d6ca29c11 Mon Sep 17 00:00:00 2001 > From: Kyle Spiers > Date: Fri, 9 Mar 2018 12:34:15 -0800 > Subject: [PATCH] rbd: Remove VLA usage > > As part of the effort to remove VLAs from the ker

[PATCH] rbd: Remove VLA usage

2018-03-09 Thread Kyle Spiers
>From 4198ebe2e8058ff676d8e2f993d8806d6ca29c11 Mon Sep 17 00:00:00 2001 From: Kyle Spiers <k...@spiers.me> Date: Fri, 9 Mar 2018 12:34:15 -0800 Subject: [PATCH] rbd: Remove VLA usage As part of the effort to remove VLAs from the kernel[1], this moves the literal values into the st

[PATCH] rbd: Remove VLA usage

2018-03-09 Thread Kyle Spiers
>From 4198ebe2e8058ff676d8e2f993d8806d6ca29c11 Mon Sep 17 00:00:00 2001 From: Kyle Spiers Date: Fri, 9 Mar 2018 12:34:15 -0800 Subject: [PATCH] rbd: Remove VLA usage As part of the effort to remove VLAs from the kernel[1], this moves the literal values into the stack array calculation inst