Re: [PATCH] rtc: s5m: Remove VLA usage

2018-03-09 Thread Gustavo A. R. Silva
Hi Krzysztof, On 03/09/2018 07:04 AM, Krzysztof Kozlowski wrote: On Thu, Mar 8, 2018 at 7:03 PM, Gustavo A. R. Silva wrote: On 03/08/2018 11:58 AM, Kees Cook wrote: On Thu, Mar 8, 2018 at 9:20 AM, Gustavo A. R. Silva wrote: In

Re: [PATCH] rtc: s5m: Remove VLA usage

2018-03-09 Thread Gustavo A. R. Silva
Hi Krzysztof, On 03/09/2018 07:04 AM, Krzysztof Kozlowski wrote: On Thu, Mar 8, 2018 at 7:03 PM, Gustavo A. R. Silva wrote: On 03/08/2018 11:58 AM, Kees Cook wrote: On Thu, Mar 8, 2018 at 9:20 AM, Gustavo A. R. Silva wrote: In preparation to enabling -Wvla, remove VLAs and replace

Re: [PATCH] rtc: s5m: Remove VLA usage

2018-03-09 Thread Krzysztof Kozlowski
On Thu, Mar 8, 2018 at 7:03 PM, Gustavo A. R. Silva wrote: > > > On 03/08/2018 11:58 AM, Kees Cook wrote: >> >> On Thu, Mar 8, 2018 at 9:20 AM, Gustavo A. R. Silva >> wrote: >>> >>> In preparation to enabling -Wvla, remove VLAs and replace them

Re: [PATCH] rtc: s5m: Remove VLA usage

2018-03-09 Thread Krzysztof Kozlowski
On Thu, Mar 8, 2018 at 7:03 PM, Gustavo A. R. Silva wrote: > > > On 03/08/2018 11:58 AM, Kees Cook wrote: >> >> On Thu, Mar 8, 2018 at 9:20 AM, Gustavo A. R. Silva >> wrote: >>> >>> In preparation to enabling -Wvla, remove VLAs and replace them >>> with fixed-length arrays instead. >>> >>> From

Re: [PATCH] rtc: s5m: Remove VLA usage

2018-03-08 Thread Gustavo A. R. Silva
On 03/08/2018 11:58 AM, Kees Cook wrote: On Thu, Mar 8, 2018 at 9:20 AM, Gustavo A. R. Silva wrote: In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. From a security viewpoint, the use of Variable Length Arrays can be a

Re: [PATCH] rtc: s5m: Remove VLA usage

2018-03-08 Thread Gustavo A. R. Silva
On 03/08/2018 11:58 AM, Kees Cook wrote: On Thu, Mar 8, 2018 at 9:20 AM, Gustavo A. R. Silva wrote: In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. From a security viewpoint, the use of Variable Length Arrays can be a vector for stack

Re: [PATCH] rtc: s5m: Remove VLA usage

2018-03-08 Thread Kees Cook
On Thu, Mar 8, 2018 at 9:20 AM, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove VLAs and replace them > with fixed-length arrays instead. > > From a security viewpoint, the use of Variable Length Arrays can be > a vector for stack overflow attacks.

Re: [PATCH] rtc: s5m: Remove VLA usage

2018-03-08 Thread Kees Cook
On Thu, Mar 8, 2018 at 9:20 AM, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove VLAs and replace them > with fixed-length arrays instead. > > From a security viewpoint, the use of Variable Length Arrays can be > a vector for stack overflow attacks. Also, in general, as the

[PATCH] rtc: s5m: Remove VLA usage

2018-03-08 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus,

[PATCH] rtc: s5m: Remove VLA usage

2018-03-08 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus,