From: Jason Andryuk <jason.andryuk@amd.com>
To: Brian Gerst <brgerst@gmail.com>
Cc: Juergen Gross <jgross@suse.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
Paolo Bonzini <pbonzini@redhat.com>,
<xen-devel@lists.xenproject.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/5] x86/pvh: Make PVH entrypoint PIC for x86-64
Date: Thu, 11 Apr 2024 11:26:11 -0400 [thread overview]
Message-ID: <74465ac2-0060-4047-97d7-acadcdff4cd4@amd.com> (raw)
In-Reply-To: <CAMzpN2h6S69bOLXCUhmkVJErvoKxq-wPmfoaqR7eGHYLgirn+Q@mail.gmail.com>
On 2024-04-10 17:00, Brian Gerst wrote:
> On Wed, Apr 10, 2024 at 3:50 PM Jason Andryuk <jason.andryuk@amd.com> wrote:
>> /* 64-bit entry point. */
>> .code64
>> 1:
>> + UNWIND_HINT_END_OF_STACK
>> +
>> /* Set base address in stack canary descriptor. */
>> mov $MSR_GS_BASE,%ecx
>> - mov $_pa(canary), %eax
>> + leal rva(canary)(%ebp), %eax
>
> Since this is in 64-bit mode, RIP-relative addressing can be used.
>
>> xor %edx, %edx
>> wrmsr
>>
>> call xen_prepare_pvh
>>
>> /* startup_64 expects boot_params in %rsi. */
>> - mov $_pa(pvh_bootparams), %rsi
>> - mov $_pa(startup_64), %rax
>> + lea rva(pvh_bootparams)(%ebp), %rsi
>> + lea rva(startup_64)(%ebp), %rax
>
> RIP-relative here too.
Yes, thanks for catching that. With the RIP-relative conversion, there
is now:
vmlinux.o: warning: objtool: pvh_start_xen+0x10d: relocation to !ENDBR:
startup_64+0x0
I guess RIP-relative made it visible. That can be quieted by adding
ANNOTATE_NOENDBR to startup_64.
Thanks,
Jason
next prev parent reply other threads:[~2024-04-11 15:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 19:48 [PATCH 0/5] x86/pvh: Make PVH entry relocatable Jason Andryuk
2024-04-10 19:48 ` [PATCH 1/5] xen: sync elfnote.h from xen tree Jason Andryuk
2024-05-10 8:09 ` Jürgen Groß
2024-04-10 19:48 ` [PATCH 2/5] x86/pvh: Make PVH entrypoint PIC for x86-64 Jason Andryuk
2024-04-10 21:00 ` Brian Gerst
2024-04-11 15:26 ` Jason Andryuk [this message]
2024-04-11 18:15 ` Brian Gerst
2024-04-10 19:48 ` [PATCH 3/5] x86/pvh: Set phys_base when calling xen_prepare_pvh() Jason Andryuk
2024-05-23 11:14 ` Jürgen Groß
2024-04-10 19:48 ` [PATCH 4/5] x86/kernel: Move page table macros to new header Jason Andryuk
2024-05-23 11:40 ` Juergen Gross
2024-05-23 13:59 ` Thomas Gleixner
2024-05-23 14:07 ` Borislav Petkov
2024-04-10 19:48 ` [PATCH 5/5] x86/pvh: Add 64bit relocation page tables Jason Andryuk
2024-05-23 12:11 ` Juergen Gross
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=74465ac2-0060-4047-97d7-acadcdff4cd4@amd.com \
--to=jason.andryuk@amd.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oleksandr_tyshchenko@epam.com \
--cc=pbonzini@redhat.com \
--cc=sstabellini@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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