Skip to contentSkip to conversation

Add missing symbol exports for grub-pv

PATCH In review Juergen Gross 3 participants 7 messages Oct 29, 2024 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add missing symbol exports for grub-pv

Grub-pv needs start_info_union and phys_to_machine_mapping to be accessible. Export both symbols.

Fixes 33411a11f848 ("Mini-OS: hide all symbols not exported via EXPORT_SYMBOLS()")
---
 arch/x86/mm.c    | 1 +
 arch/x86/setup.c | 1 +
 2 files changed, 2 insertions(+)
arch/x86/mm.c +1 -0
index 572e762e..3ba6d917 100644
@@ -55,6 +55,7 @@
 #endif
 
 unsigned long *phys_to_machine_mapping;
+EXPORT_SYMBOL(phys_to_machine_mapping);
 unsigned long mfn_zero;
 pgentry_t *pt_base;
 EXPORT_SYMBOL(pt_base);
arch/x86/setup.c +1 -0
index b27bbed7..b613083b 100644
@@ -41,6 +41,7 @@
  * address of the shared_info structure, and things like that.
  */
 union start_info_union start_info_union;
+EXPORT_SYMBOL(start_info_union);
 #endif
 
 /*
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit:

Quoted 6 lines

Grub-pv needs start_info_union and phys_to_machine_mapping to be accessible. Export both symbols.

Fixes 33411a11f848 ("Mini-OS: hide all symbols not exported via EXPORT_SYMBOLS()")
Quoted 31 lines
---
 arch/x86/mm.c    | 1 +
 arch/x86/setup.c | 1 +
 2 files changed, 2 insertions(+)
arch/x86/mm.c +1 -0
index 572e762e..3ba6d917 100644
@@ -55,6 +55,7 @@
 #endif
 
 unsigned long *phys_to_machine_mapping;
+EXPORT_SYMBOL(phys_to_machine_mapping);
 unsigned long mfn_zero;
 pgentry_t *pt_base;
 EXPORT_SYMBOL(pt_base);
arch/x86/setup.c +1 -0
index b27bbed7..b613083b 100644
@@ -41,6 +41,7 @@
  * address of the shared_info structure, and things like that.
  */
 union start_info_union start_info_union;
+EXPORT_SYMBOL(start_info_union);
 #endif
 
 /*
Signature · 1 line
2.43.0
#2 lore raw
Quoted 8 lines · Samuel Thibault

Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit:

Quoted 6 lines

Grub-pv needs start_info_union and phys_to_machine_mapping to be accessible. Export both symbols.

Fixes 33411a11f848 ("Mini-OS: hide all symbols not exported via EXPORT_SYMBOLS()")

Committed.

Jurgen, what do you want to do with updating 4.19?  Don't we need to fork a 4.19 branch to avoid the CONFIG_XC change ?

~Andrew

#3 lore raw
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Samuel Thibault

Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit:

Quoted 6 lines

Grub-pv needs start_info_union and phys_to_machine_mapping to be accessible. Export both symbols.

Fixes 33411a11f848 ("Mini-OS: hide all symbols not exported via EXPORT_SYMBOLS()")
Quoted 6 lines
Quoted 1 line

Committed.

Jurgen, what do you want to do with updating 4.19?  Don't we need to fork a 4.19 branch to avoid the CONFIG_XC change ?

Yes, I think this is the way to go.

Juergen

#4 lore raw
Quoted 10 lines · Jürgen Groß
Quoted 9 lines · Andrew Cooper
Quoted 8 lines · Samuel Thibault

Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit:

Quoted 7 lines

Grub-pv needs start_info_union and phys_to_machine_mapping to be accessible. Export both symbols.

Fixes 33411a11f848 ("Mini-OS: hide all symbols not exported via

EXPORT_SYMBOLS()")

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Committed.

Jurgen, what do you want to do with updating 4.19?  Don't we need to fork a 4.19 branch to avoid the CONFIG_XC change ?

Yes, I think this is the way to go.

Ok.  https://xenbits.xen.org/gitweb/?p=mini-os.git;a=summary

master has this fix, and there's a new branch, xen-stable-4.19, starting from the xen-RELEASE-4.19.0 tag with this change backported.

Xen 4.18 and earlier don't have the symbol restrictions.

~Andrew

#5 lore raw
Quoted 18 lines · Andrew Cooper
Quoted 17 lines · Jürgen Groß
Quoted 15 lines · Andrew Cooper
Quoted 9 lines · Samuel Thibault

Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit:

Quoted 7 lines

Grub-pv needs start_info_union and phys_to_machine_mapping to be accessible. Export both symbols.

Fixes 33411a11f848 ("Mini-OS: hide all symbols not exported via

EXPORT_SYMBOLS()")

Committed.

Jurgen, what do you want to do with updating 4.19?  Don't we need to fork a 4.19 branch to avoid the CONFIG_XC change ?

Quoted 8 lines
Quoted 1 line

Yes, I think this is the way to go.

Ok.  https://xenbits.xen.org/gitweb/?p=mini-os.git;a=summary

master has this fix, and there's a new branch, xen-stable-4.19, starting from the xen-RELEASE-4.19.0 tag with this change backported.

Xen 4.18 and earlier don't have the symbol restrictions.

You want a related patch on the Xen 4.19 branch to update the Mini-OS commit in Config.mk.

Juergen

#6 lore raw
Quoted 23 lines · Juergen Gross
Quoted 22 lines · Andrew Cooper
Quoted 10 lines · Jürgen Groß
Quoted 9 lines · Andrew Cooper
Quoted 8 lines · Samuel Thibault

Juergen Gross, le mar. 29 oct. 2024 12:41:58 +0100, a ecrit:

Quoted 7 lines

Grub-pv needs start_info_union and phys_to_machine_mapping to be accessible. Export both symbols.

Fixes 33411a11f848 ("Mini-OS: hide all symbols not exported via

EXPORT_SYMBOLS()")

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Committed.

Jurgen, what do you want to do with updating 4.19?  Don't we need to fork a 4.19 branch to avoid the CONFIG_XC change ?

Yes, I think this is the way to go.

Ok.  https://xenbits.xen.org/gitweb/?p=mini-os.git;a=summary

Quoted 8 lines
Quoted 4 lines

master has this fix, and there's a new branch, xen-stable-4.19, starting from the xen-RELEASE-4.19.0 tag with this change backported.

Xen 4.18 and earlier don't have the symbol restrictions.

You want a related patch on the Xen 4.19 branch to update the Mini-OS commit in Config.mk.

I've only made change to minios.git.  None to Xen.

They'll need separate patches.

~Andrew