News for hackers. Stuff that matters.
Re:The Linux Kernel Is Now VLA (Variable-Length Array) Free by jcelerier on Monday October 29, 2018 @07:14AM (#18326469)
> meaningfully slower

really ? there's a difference but unless you keep allocating in a hot-loop this should hardly ever have observable costs : https://gcc.godbolt.org/z/SN9Ois

Re:The Linux Kernel Is Now VLA (Variable-Length Array) Free by jabl on Monday October 29, 2018 @08:34AM (#18326949)
The problem is with how to access other variables on the stack. Usually the compiler uses an offset from the stack pointer, which without VLA's is known at compile time. However, if you have VLA's, you might need a calculation at runtime to figure out where that variable is stored. Or maybe the offset from the frame pointer is known statically, but then you can't do the "omit frame pointer" optimization and you thus waste a register. Or if you have a variable that is between two VLA's, then you need a runtime calculation regardless.
Re:The Linux Kernel Is Now VLA (Variable-Length Array) Free by pjmlp on Monday October 29, 2018 @07:22AM (#18326518)
Yes there is a talk done by Google at Linux Kernel Security Summit 2018 about it.