NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-amd64/51919: boot-loader doesn't differentiate XEN and PAE module versions

>Number:         51919
>Category:       port-amd64
>Synopsis:       boot-loader doesn't differentiate XEN and PAE module version
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 26 04:40:00 +0000 2017
>Originator:     Paul Goyette
>Release:        NetBSD 7.99.53
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at |
System: NetBSD 7.99.53 NetBSD 7.99.53 (SPEEDY 2016-12-31 23:00:24) #1: Sun Jan 1 01:39:34 UTC 2017 amd64
Architecture: x86_64
Machine: amd64
(Note that although this is filed in the port-amd64 category, it applies
equally to port-i386.)

During normal operation, the default path from which modules are loaded
varies (for x86_64 platforms) depending on whether the kernel is a XEN
or PAE kernel.

However, for modules that are loaded by the boot loader itself (as a
result of being listed in /boot.cfg) and "pushed" to the kernel, no such
distinction is made.  Thus, modules pushed to XEN or PAE kernels would
hve an incorrect ABI, and all sorts of bad stuff can happen.

Install a XEN kernel, add a 'load=<module>' command to /boot.cfg (specify
a module that is not already built-in to the kernel), and reboot.  The
non-XEN version of the module will be pushed into the kernel.
In file sys/arch/i386/stand/lib/exec.c differentiate between XEN, PAE, and
"normal" kernels, similar to what is done in sys/arch/x86/x86/x86_machdep.c
(where module_machine is conditionally defined before its use in
routine module_init() in sys/kern/kern_module.c


Home | Main Index | Thread Index | Old Index