From: Manuel Bouyer <bouyer@antioche.eu.org>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
xen-devel@lists.xenproject.org, Juergen Gross <jgross@suse.com>
Subject: Re: issue with dom0_pvh on Xen 4.20
Date: Tue, 2 Sep 2025 16:28:40 +0200 [thread overview]
Message-ID: <aLb_GO1lOCAdPiP1@mail.soc.lip6.fr> (raw)
In-Reply-To: <49551fca-5059-4ca4-b551-d282d6099e36@suse.com>
On Tue, Sep 02, 2025 at 04:23:28PM +0200, Jan Beulich wrote:
> >>> kernel symbol table. That seems to be no longer true with Xen 4.20 and a
> >>> PVH dom0 (but probably still true in all other cases).
> >>>
> >>> I can deal with that, but with the new layout how do I get the end of the
> >>> symbol table ?
> >>
> >> You'll need to handle that internally, I expect, perhaps from properties of
> >> your (ELF) binary.
> >
> > But I don't have access to the ELF headers from the kernel binary (nor do I
> > know which kernel was booted).
> >
> > Hum, maybe a I can hardcode this info in some const of the binary with a
> > ld trick ?
>
> For the symbol table to be loaded, it needs to live in some loadable section.
> You should be able to mark that section's end (or the end of the symbol
> table in the section, in case there's more stuff there) with a symbol in the
> linker script (which I assume you use). If you used the GNU toolchain, you
> could also consider using the assembler's .startof. / .sizeof. operators
> (producing symbols that the linker then recognizes and resolves accordingly).
>
> Or wait - are you perhaps using the thing we call "bsd_symtab" in our libelf?
yes, that's it. I'm looking at how it's loaded right now
> Then, as per the scheme in elf_load_bsdsyms(), can't you find the start of
> the ELF header from the end of your kernel? At least that's how I understand
> it's supposed to work.
I can, but at this point I can't easily call C code, and doing it in
assembly doesn't look easy :(
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
next prev parent reply other threads:[~2025-09-02 14:29 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 10:17 issue with dom0_pvh on Xen 4.20 Manuel Bouyer
2025-09-02 10:44 ` Andrew Cooper
2025-09-02 10:56 ` Manuel Bouyer
2025-09-02 11:13 ` Andrew Cooper
2025-09-02 11:23 ` Manuel Bouyer
2025-09-02 12:14 ` Andrew Cooper
2025-09-02 12:24 ` Manuel Bouyer
2025-09-02 12:52 ` Andrew Cooper
2025-09-02 12:55 ` Andrew Cooper
2025-09-02 12:56 ` Manuel Bouyer
2025-09-02 12:00 ` Jan Beulich
2025-09-02 12:10 ` Manuel Bouyer
2025-09-02 12:54 ` Jan Beulich
2025-09-02 12:22 ` Juergen Gross
2025-09-02 12:28 ` Juergen Gross
2025-09-02 12:49 ` Manuel Bouyer
2025-09-02 13:41 ` Manuel Bouyer
2025-09-02 13:55 ` Jan Beulich
2025-09-02 14:06 ` Manuel Bouyer
2025-09-02 14:23 ` Jan Beulich
2025-09-02 14:28 ` Manuel Bouyer [this message]
2025-09-02 14:32 ` Manuel Bouyer
2025-09-02 13:58 ` Andrew Cooper
2025-09-02 12:28 ` Manuel Bouyer
2025-09-02 12:45 ` Jan Beulich
2025-09-02 12:54 ` Manuel Bouyer
2025-09-02 12:56 ` Jan Beulich
2025-09-02 13:05 ` Manuel Bouyer
2025-09-03 15:47 ` Manuel Bouyer
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=aLb_GO1lOCAdPiP1@mail.soc.lip6.fr \
--to=bouyer@antioche.eu.org \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@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.