cve-2015-3290: build with O0
PATCH 1/1 cve-2015-3290: build with O0
Hit a compile broken for this test in rhel10 gcc-14.2.1-6.el10.x86_64 and find only with O0 it could be compiled pass.
CC testcases/cve/cve-2014-0196cve-2015-3290.c: In function ‘child_thread’:
cve-2015-3290.c:437:1: error: bp cannot be used in ‘asm’ here
437 | }
| ^
make: *** [../../include/mk/rules.mk:45: cve-2015-3290] Error 1
--- testcases/cve/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/cve/Makefile +1 -1
@@ -22,6 +22,6 @@ ifneq (,$(filter $(HOST_CPU),x86 x86_64)) meltdown: CFLAGS += -msse2 endif -cve-2015-3290: CFLAGS += -pthread -fomit-frame-pointer +cve-2015-3290: CFLAGS += -pthread -fomit-frame-pointer -O0 include $(top_srcdir)/include/mk/generic_leaf_target.mk
Signature · 5 lines
2.47.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Quoted 9 lines
Hit a compile broken for this test in rhel10 gcc-14.2.1-6.el10.x86_64 and find only with O0 it could be compiled pass.
CC testcases/cve/cve-2014-0196
cve-2015-3290.c: In function ‘child_thread’:
cve-2015-3290.c:437:1: error: bp cannot be used in ‘asm’ here
437 | }| ^make: *** [
../../include/mk/rules.mk:45: cve-2015-3290] Error 1
Exactly this should be solved by -fomit-frame-pointer, at least that how the problem is fixed for most of the gcc releases. Also the original exploit is supposed to be build with -O2 so I do not think that this is the right fix.
Quoted 23 lines
Signed-off-by Chunyu Hu <[email protected]>--- testcases/cve/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)testcases/cve/Makefile +1
-1@@ -22,6 +22,6 @@ ifneq (,$(filter $(HOST_CPU),x86 x86_64)) meltdown: CFLAGS += -msse2 endif -cve-2015-3290: CFLAGS += -pthread -fomit-frame-pointer +cve-2015-3290: CFLAGS += -pthread -fomit-frame-pointer -O0 include $(top_srcdir)/include/mk/generic_leaf_target.mkSignature · 5 lines
2.47.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp