Page MenuHomeFreeBSD

contigmalloc: handle M_EXEC
ClosedPublic

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

Details

Summary

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

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

Event Timeline

kib created this revision.Wed, Feb 6, 8:20 AM
alc accepted this revision.Wed, Feb 6, 5:15 PM
This revision is now accepted and ready to land.Wed, Feb 6, 5:15 PM
emaste added a subscriber: emaste.Wed, Feb 6, 5:24 PM
markj accepted this revision.Wed, Feb 6, 6:06 PM
Closed by commit rS343850: contigmalloc: handle M_EXEC. (authored by kib, committed by ). · Explain WhyThu, Feb 7, 2:00 AM
This revision was automatically updated to reflect the committed changes.