On Sat, 10 Mar 2018, Kees Cook wrote:
As part of the effort to remove VLAs from the kernel[1], this moves the literal values into the stack array calculation instead of using a variable for the sizing. The resulting size can be found from sizeof(buf).
VLAs are also used in a number of places in the Ceph codebase. Unfortunately, g++ enables them in C++ (they aren't part of the standard) by default. They're innocently easy to write and give you no ability to check for errors.
Good to see renewed attention drawn to this, and I hope we'll consider removing them from Ceph as well (and/or drawing very close attention to them, where they're truly being useful).
-Jesse -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html