Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 13 Mar 2018 12:32:17 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Daniel Micay' <>, Arend van Spriel
CC: Andreas Christoforou <>, Kees Cook
	<>, Kernel Hardening
	<>, QCA ath9k Development
	<>, Kalle Valo <>,
	"" <>, Netdev
	<>, kernel list <>
Subject: RE: [PATCH] drivers: net: wireless: ath: ath9: dfs: remove VLA usage

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 be used in a
> constant expression in C. It's unclear why C is defined that way but
> it's how it is and there isn't currently a GCC extension making more
> things into constant expressions like C++.

'static' and 'const' are both just qualifiers to a 'variable'
You can still take it's address.
The language allows you to cast away the 'const' and write to
the variable - the effect is probably 'implementation defined'.

It is probably required to be valid for 'static const' items
to be patchable.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.