[PATCH v2] [RFC] security: allow using Clang's zero initialization for stack variables

2020-06-16 Thread glider
In addition to -ftrivial-auto-var-init=pattern (used by CONFIG_INIT_STACK_ALL now) Clang also supports zero initialization for locals enabled by -ftrivial-auto-var-init=zero. The future of this flag is still being debated, see https://bugs.llvm.org/show_bug.cgi?id=45497 Right now it is guarded by a

[PATCH] [RFC] security: allow using Clang's zero initialization for stack variables

2020-06-14 Thread glider
In addition to -ftrivial-auto-var-init=pattern (used by CONFIG_INIT_STACK_ALL now) Clang also supports zero initialization for locals enabled by -ftrivial-auto-var-init=zero. The future of this flag is still being debated, see https://bugs.llvm.org/show_bug.cgi?id=45497 Right now it is guarded by a

[PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-04 Thread glider
Under certain circumstances (we found this out running Docker on a Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may return uninitialized value of |error| from ovl_copy_xattr(). It is then returned by ovl_create() to lookup_open(), which casts it to an invalid dentry pointer, that

[PATCH] ovl: explicitly initialize error in ovl_copy_xattr()

2020-06-03 Thread glider
Under certain circumstances (we found this out running Docker on a Clang-built kernel with CONFIG_INIT_STACK_ALL) ovl_copy_xattr() may return uninitialized value of |error| from ovl_copy_xattr(). It is then returned by ovl_create() to lookup_open(), which casts it to an invalid dentry pointer, that