From: Alejandro Vallejo <alejandro.vallejo@cloud.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v3 3/3] x86: Add Kconfig option to require NX bit support
Date: Wed, 19 Jul 2023 12:11:35 +0100 [thread overview]
Message-ID: <64b7c4e8.170a0220.4baaf.8ea6@mx.google.com> (raw)
In-Reply-To: <3c087e81-73f2-b284-d035-807f64b78e6d@suse.com>
On Wed, Jul 19, 2023 at 08:13:27AM +0200, Jan Beulich wrote:
> On 18.07.2023 15:19, Jan Beulich wrote:
> > On 29.06.2023 14:17, Alejandro Vallejo wrote:
> >> --- a/xen/arch/x86/boot/head.S
> >> +++ b/xen/arch/x86/boot/head.S
> >> @@ -123,6 +123,7 @@ multiboot2_header:
> >> .Lbad_ldr_nih: .asciz "ERR: EFI ImageHandle is not provided by bootloader!"
> >> .Lbad_efi_msg: .asciz "ERR: EFI IA-32 platforms are not supported!"
> >> .Lbag_alg_msg: .asciz "ERR: Xen must be loaded at a 2Mb boundary!"
> >> +.Lno_nx_msg: .asciz "ERR: Not an NX-capable CPU!"
> >>
> >> .section .init.data, "aw", @progbits
> >> .align 4
> >> @@ -153,6 +154,11 @@ early_error: /* Here to improve the disassembly. */
> >> .Lnot_aligned:
> >> add $sym_offs(.Lbag_alg_msg), %esi
> >> jmp .Lget_vtb
> >> +#ifdef CONFIG_REQUIRE_NX
> >> +.Lno_nx:
> >> + add $sym_offs(.Lno_nx_msg), %esi
> >> + jmp .Lget_vtb
> >> +#endif
> >
> > Since I'm in the process of introducing more such paths (for the x86-64-v<N>
> > series), I'm curious: Have you actually had success with getting any output
> > from this code path? I see unreadable output come through serial (provided
> > it's the normal com1 I/O port location where the serial port is), which
> > likely is because baud rate wasn't configured yet, and hence I might have
> > success by changing the config of the receiving side. And I see nothing at
> > all on the screen. While kind of expected when in graphics mode, I wonder
> > whether this ever worked, or whether this has simply bitrotted because of
> > never actually coming into play.
I hacked the code to exercise the XD_DISABLE code path, but didn't try to
exercise the failure paths, I'm afraid. Sorry.
>
> Pretty clearly this was broken in the course of adding MB2 support, by
> b28044226e1c using %esi as the "relocation base" after already having
> clobbered it. I'm working on a fix.
>
> Jan
Uh-oh. Good catch.
Alejandro
next prev parent reply other threads:[~2023-07-19 11:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 12:17 [PATCH v3 0/3] Introduce a REQUIRE_NX Kconfig option Alejandro Vallejo
2023-06-29 12:17 ` [PATCH v3 1/3] tools: Add __AC() macro to common-macros.h Alejandro Vallejo
2023-06-29 15:46 ` Alejandro Vallejo
2023-06-30 11:16 ` Andrew Cooper
2023-06-29 12:17 ` [PATCH v3 2/3] x86/boot: Clear XD_DISABLE from the early boot path Alejandro Vallejo
2023-06-29 15:46 ` Alejandro Vallejo
2023-06-30 11:19 ` Andrew Cooper
2023-06-30 12:28 ` Andrew Cooper
2023-06-29 12:17 ` [PATCH v3 3/3] x86: Add Kconfig option to require NX bit support Alejandro Vallejo
2023-06-29 15:48 ` Alejandro Vallejo
2023-07-18 13:19 ` Jan Beulich
2023-07-19 6:13 ` Jan Beulich
2023-07-19 11:11 ` Alejandro Vallejo [this message]
2023-06-29 15:36 ` [PATCH v3 0/3] Introduce a REQUIRE_NX Kconfig option Alejandro Vallejo
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=64b7c4e8.170a0220.4baaf.8ea6@mx.google.com \
--to=alejandro.vallejo@cloud.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.