* [LTP] [PATCH] cve-2015-3290: build with O0
@ 2024-11-19 7:28 Chunyu Hu
2024-11-29 12:10 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: Chunyu Hu @ 2024-11-19 7:28 UTC (permalink / raw)
To: ltp
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
Signed-off-by: Chunyu Hu <chuhu@redhat.com>
---
testcases/cve/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile
index 01b9b9ccb..2a769dea8 100644
--- a/testcases/cve/Makefile
+++ b/testcases/cve/Makefile
@@ -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
--
2.47.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] cve-2015-3290: build with O0
2024-11-19 7:28 [LTP] [PATCH] cve-2015-3290: build with O0 Chunyu Hu
@ 2024-11-29 12:10 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2024-11-29 12:10 UTC (permalink / raw)
To: Chunyu Hu; +Cc: ltp
Hi!
> 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.
> Signed-off-by: Chunyu Hu <chuhu@redhat.com>
> ---
> testcases/cve/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile
> index 01b9b9ccb..2a769dea8 100644
> --- a/testcases/cve/Makefile
> +++ b/testcases/cve/Makefile
> @@ -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
> --
> 2.47.0
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-29 12:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19 7:28 [LTP] [PATCH] cve-2015-3290: build with O0 Chunyu Hu
2024-11-29 12:10 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox