lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 14 Nov 2022 12:43:35 +0100 From: "Jiri Slaby (SUSE)" <jirislaby@...nel.org> To: linux-kernel@...r.kernel.org Cc: Andi Kleen <andi@...stfloor.org>, Miguel Ojeda <ojeda@...nel.org>, Nick Desaulniers <ndesaulniers@...gle.com>, Martin Liska <mliska@...e.cz>, Jiri Slaby <jslaby@...e.cz> Subject: [PATCH 37/46] Compiler attributes, lto: disable __flatten with LTO From: Andi Kleen <andi@...stfloor.org> Using __flatten causes a simple gcc 12 LTO build not fit into 16GB anymore. Disable flatten with LTO. With gcc 12, the build still does not finish linking in 10 minutes, eating 40GB of RAM at that point. There is an upstream bug about this: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107014 Until this is resolved, simply disable __flatten with LTO. In the future, instead of this patch, we should likely drop __flatten and its only user (pcpu_build_alloc_info()) and use always_inline to all functions which shall be inlined there. Cc: Miguel Ojeda <ojeda@...nel.org> Cc: Nick Desaulniers <ndesaulniers@...gle.com> Signed-off-by: Andi Kleen <andi@...stfloor.org> Signed-off-by: Martin Liska <mliska@...e.cz> Signed-off-by: Jiri Slaby <jslaby@...e.cz> --- include/linux/compiler_attributes.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h index be6c71fd5ebb..09cf8eebcb0d 100644 --- a/include/linux/compiler_attributes.h +++ b/include/linux/compiler_attributes.h @@ -229,7 +229,12 @@ * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes * clang: https://clang.llvm.org/docs/AttributeReference.html#flatten */ +#ifndef CONFIG_LTO_GCC # define __flatten __attribute__((flatten)) +#else +/* Causes very large memory use with gcc in LTO mode */ +# define __flatten +#endif /* * Note the missing underscores. -- 2.38.1
Powered by blists - more mailing lists