From: Cyril Hrubis <chrubis@suse.cz>
To: Chunyu Hu <chuhu@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] cve-2015-3290: build with O0
Date: Fri, 29 Nov 2024 13:10:08 +0100 [thread overview]
Message-ID: <Z0mvIOV2IZOXPTZQ@yuki.lan> (raw)
In-Reply-To: <20241119072817.415810-1-chuhu@redhat.com>
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
prev parent reply other threads:[~2024-11-29 12:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 7:28 [LTP] [PATCH] cve-2015-3290: build with O0 Chunyu Hu
2024-11-29 12:10 ` Cyril Hrubis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z0mvIOV2IZOXPTZQ@yuki.lan \
--to=chrubis@suse.cz \
--cc=chuhu@redhat.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox