On Sun, Mar 11, 2018 at 12:12 AM, Kees Cook wrote:
>
> The problem is that it's not a "constant expression", so the compiler
> frontend still yells about it under -Wvla. I would characterize this
> mainly as a fix for "accidental VLA" or "misdetected VLA" or something
> like that. AIUI, there real
> I don't think the difference between C and C++ const pointer
> conversions
I mean I don't think the difference between them was intended.
No, it's undefined behavior to write to a const variable. The `static`
and `const` on the variable both change the code generation in the
real world as permitted / encouraged by the standard. It's placed in
read-only memory. Trying to write to it will break. It's not
"implemented defined" to write
From: Daniel Micay
> Sent: 10 March 2018 23:45
>
> > Just wondering. Is this actually a VLA. FFT_NUM_SAMPLES was static const so
> > not really going to show a lot of variation. This array will always have the
> > same size on the stack.
>
> The issue is that unlike in C++, a `static const` can't
On 03/10/2018 05:12 PM, Kees Cook wrote:
On Sat, Mar 10, 2018 at 3:06 PM, Arend van Spriel
wrote:
On 3/9/2018 1:30 PM, Andreas Christoforou wrote:
The kernel would like to have all stack VLA usage removed.
I think there was a remark made earlier to give more explanation here. It
should e
> Just wondering. Is this actually a VLA. FFT_NUM_SAMPLES was static const so
> not really going to show a lot of variation. This array will always have the
> same size on the stack.
The issue is that unlike in C++, a `static const` can't be used in a
constant expression in C. It's unclear why C i
On Sat, Mar 10, 2018 at 3:06 PM, Arend van Spriel
wrote:
> On 3/9/2018 1:30 PM, Andreas Christoforou wrote:
>>
>> The kernel would like to have all stack VLA usage removed.
>
>
> I think there was a remark made earlier to give more explanation here. It
> should explain why we want "VLA on stack" r
On 3/9/2018 1:30 PM, Andreas Christoforou wrote:
The kernel would like to have all stack VLA usage removed.
I think there was a remark made earlier to give more explanation here.
It should explain why we want "VLA on stack" removed.
Signed-off-by: Andreas Christoforou
---
drivers/net/wir
Himanshu Jha writes:
> On Fri, Mar 09, 2018 at 02:30:12PM +0200, Andreas Christoforou wrote:
>> The kernel would like to have all stack VLA usage removed.
>>
>> Signed-off-by: Andreas Christoforou
>> ---
>> drivers/net/wireless/ath/ath9k/dfs.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 dele
On Fri, Mar 09, 2018 at 02:30:12PM +0200, Andreas Christoforou wrote:
> The kernel would like to have all stack VLA usage removed.
>
> Signed-off-by: Andreas Christoforou
> ---
> drivers/net/wireless/ath/ath9k/dfs.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/driv
The kernel would like to have all stack VLA usage removed.
Signed-off-by: Andreas Christoforou
---
drivers/net/wireless/ath/ath9k/dfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/dfs.c
b/drivers/net/wireless/ath/ath9k/dfs.c
index 6fee9a4
11 matches
Mail list logo