Page MenuHomeFreeBSD

contigmalloc: handle M_EXEC

Authored by kib on Feb 6 2019, 8:20 AM.



I included the larger diff that demonstrates where the functionality is needed. Apparently resume is broken on i386 PAE when nx bit is available, it was so before my PAE merge, but the merge switched normal mode to PAE and the issue become visible. There are several issues:

  • the trampoline page is not mapped executable, so machine faults when paging is on;
  • EFER and %cr4 both should be loaded before paging is enabled, otherwise paging structures are invalid (cr4.PAE and EFER.NX).

There are some more bits still not correct, e.g. unconditional access to %cr4 in resumectx.

So I only request to review the vm_kern.c bits, of course feel free to review/comment on the whole patch.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kib created this revision.Feb 6 2019, 8:20 AM
alc accepted this revision.Feb 6 2019, 5:15 PM
This revision is now accepted and ready to land.Feb 6 2019, 5:15 PM
emaste added a subscriber: emaste.Feb 6 2019, 5:24 PM
markj accepted this revision.Feb 6 2019, 6:06 PM
This revision was automatically updated to reflect the committed changes.