Linux Test Project
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] KVM test infrastructure
Date: Thu, 10 Mar 2022 21:41:25 +0100	[thread overview]
Message-ID: <YipidedAlC6XxX4r@pevik> (raw)
In-Reply-To: <5e9807b7-3b41-8408-42d2-dffaa71741e1@suse.cz>

> On 09. 03. 22 20:13, Petr Vorel wrote:
> > Hi Martin,

> > this patchset looks really great.

> > Unfortunately there are some compilation time errors [1]. Various
> > Debian/Ubuntu versions (but not all) and Alpine have problem to
> > compile it [1]: /usr/bin/ld: bootstrap_x86_64.o: relocation
> > R_X86_64_16 against symbol `kvm_gdt32_desc' can not be used when
> > making a PIE object; recompile with -fPIE

> > Can you please have look into it?

> Can you try whether this one-liner fixes the error? The diff will
> probably get corrupted by my mail client because GUEST_CFLAGS is too
> long but it's trivial to apply this by hand:

> diff --git a/testcases/kernel/kvm/Makefile b/testcases/kernel/kvm/Makefile
> index 139358961..24ca91fc3 100644
> --- a/testcases/kernel/kvm/Makefile
> +++ b/testcases/kernel/kvm/Makefile
> @@ -9,7 +9,7 @@ ASFLAGS =
>  CPPFLAGS += -I$(abs_srcdir)/include
>  GUEST_CPPFLAGS = $(CPPFLAGS) -DCOMPILE_PAYLOAD
>  GUEST_CFLAGS = -ffreestanding -O2 -Wall -fno-asynchronous-unwind-tables
> -mno-mmx -mno-sse
> -GUEST_LDFLAGS = -nostdlib -Wl,--build-id=none
> +GUEST_LDFLAGS = -nostdlib -Wl,--build-id=none,-no-pie
>  GUEST_LDLIBS =

>  FILTER_OUT_MAKE_TARGETS := lib_guest lib_host lib_x86

Unfortunately, just adding -no-pie to GUEST_LDFLAGS does not help:
https://github.com/pevik/ltp/actions/runs/1965302083

/usr/bin/ld: bootstrap_x86_64.o: relocation R_X86_64_16 against symbol `kvm_gdt32_desc' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: -pie: error: PHDR segment not covered by LOAD segment

FYI slightly different OS failed on your original version, but that's probably
not interesting:
https://github.com/pevik/ltp/actions/runs/1959152447

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-03-10 20:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-09 16:49 [LTP] [PATCH 1/2] KVM test infrastructure Martin Doucha
2022-03-09 16:49 ` [LTP] [PATCH 2/2] Add test for CVE 2021-38198 Martin Doucha
2022-03-15 14:19   ` Richard Palethorpe
2022-03-15 15:04     ` Martin Doucha
2022-03-15 15:44       ` Richard Palethorpe
2022-03-15 16:14         ` Martin Doucha
2022-03-17  7:35           ` Richard Palethorpe
2022-03-17 11:55             ` Martin Doucha
2022-03-09 19:13 ` [LTP] [PATCH 1/2] KVM test infrastructure Petr Vorel
2022-03-10 14:10   ` Martin Doucha
2022-03-10 20:41     ` Petr Vorel [this message]
2022-03-15 15:00 ` Richard Palethorpe
2022-03-16 17:03   ` Martin Doucha
2022-03-17  7:59     ` Richard Palethorpe
2022-03-17  8:16     ` Li Wang
2022-03-17 10:42   ` Richard Palethorpe

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=YipidedAlC6XxX4r@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mdoucha@suse.cz \
    /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