Re: [PATCH] ftrace: drop a VLA in module_exists()

2018-03-28 Thread Salvatore Mesoraca
2018-03-27 1:16 GMT+02:00 Kees Cook : > On Tue, Mar 13, 2018 at 12:51 PM, Salvatore Mesoraca > wrote: >> Avoid a VLA[1] by using a real constant expression instead of a variable. >> The compiler should be able to optimize the original code and avoid

Re: [PATCH] ftrace: drop a VLA in module_exists()

2018-03-28 Thread Salvatore Mesoraca
2018-03-27 1:16 GMT+02:00 Kees Cook : > On Tue, Mar 13, 2018 at 12:51 PM, Salvatore Mesoraca > wrote: >> Avoid a VLA[1] by using a real constant expression instead of a variable. >> The compiler should be able to optimize the original code and avoid using >> an actual VLA. Anyway this change is

Re: [PATCH] ftrace: drop a VLA in module_exists()

2018-03-26 Thread Kees Cook
On Tue, Mar 13, 2018 at 12:51 PM, Salvatore Mesoraca wrote: > Avoid a VLA[1] by using a real constant expression instead of a variable. > The compiler should be able to optimize the original code and avoid using > an actual VLA. Anyway this change is useful because it will

Re: [PATCH] ftrace: drop a VLA in module_exists()

2018-03-26 Thread Kees Cook
On Tue, Mar 13, 2018 at 12:51 PM, Salvatore Mesoraca wrote: > Avoid a VLA[1] by using a real constant expression instead of a variable. > The compiler should be able to optimize the original code and avoid using > an actual VLA. Anyway this change is useful because it will avoid a false >

[PATCH] ftrace: drop a VLA in module_exists()

2018-03-13 Thread Salvatore Mesoraca
Avoid a VLA[1] by using a real constant expression instead of a variable. The compiler should be able to optimize the original code and avoid using an actual VLA. Anyway this change is useful because it will avoid a false positive with -Wvla, it might also help the compiler generating better code.

[PATCH] ftrace: drop a VLA in module_exists()

2018-03-13 Thread Salvatore Mesoraca
Avoid a VLA[1] by using a real constant expression instead of a variable. The compiler should be able to optimize the original code and avoid using an actual VLA. Anyway this change is useful because it will avoid a false positive with -Wvla, it might also help the compiler generating better code.