Re: [PATCH 3/3] btrfs: tree-checker: Avoid accidental stack VLA

2018-03-08 Thread David Sterba
On Wed, Mar 07, 2018 at 07:30:47PM -0800, Kees Cook wrote: > In the quest to remove all stack VLAs from the kernel[1], this refactors > the stack array size calculation to avoid using max(), which makes the > compiler think the size isn't fixed. > > [1] https://lkml.org/lkml/2018/3/7/621 > >

Re: [PATCH 3/3] btrfs: tree-checker: Avoid accidental stack VLA

2018-03-08 Thread David Sterba
On Wed, Mar 07, 2018 at 07:30:47PM -0800, Kees Cook wrote: > In the quest to remove all stack VLAs from the kernel[1], this refactors > the stack array size calculation to avoid using max(), which makes the > compiler think the size isn't fixed. > > [1] https://lkml.org/lkml/2018/3/7/621 > >

[PATCH 3/3] btrfs: tree-checker: Avoid accidental stack VLA

2018-03-07 Thread Kees Cook
In the quest to remove all stack VLAs from the kernel[1], this refactors the stack array size calculation to avoid using max(), which makes the compiler think the size isn't fixed. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Kees Cook ---

[PATCH 3/3] btrfs: tree-checker: Avoid accidental stack VLA

2018-03-07 Thread Kees Cook
In the quest to remove all stack VLAs from the kernel[1], this refactors the stack array size calculation to avoid using max(), which makes the compiler think the size isn't fixed. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Kees Cook --- fs/btrfs/tree-checker.c | 3 ++- 1 file