Details
- Reviewers
 emaste jhb - Commits
 - rS336876: Use SMAP on amd64.
rS333461: Make fpusave() and fpurestore() on amd64 ifuncs.
rS333229: Add helper macros to hide some boring repeatable ceremonies to define
rS333228: Implement support for ifuncs in the kernel linker.
rS333208: Style.
rS327965: Add STAC and CLAC instructions wrappers.
rS327822: Skip IRELATIVE relocations when loader processes ELF files.
rS327819: Do not clear %RFLAGS.DF on fast syscall entry. 
Diff Detail
- Lint
 Lint Skipped - Unit
 Tests Skipped 
Event Timeline
In general this looks ok to me. As we discussed on IRC I think it would be useful to split up into multiple commits. (e.g. ifunc, fpu/npx usage, pmap usage, fast_syscall changes that don't use SMAP (remove cld and shared function), and then SMAP itself).
| sys/amd64/amd64/support.S | ||
|---|---|---|
| 292 | I wonder if this comment is a bit stale? It doesn't seem like any pre-486 CPUs will ever support SMAP. OTOH, I'm not quite sure what is even meant by "486 write protection".  | |
| 370 | (I know this is old code, but I wonder if this 'cld' is even needed anymore since 'cld' is now part of the ABI?)  | |
| sys/amd64/ia32/ia32_exception.S | ||
| 70–72 | Picking one at random. Is there a reason to think that pushf/andl/popf is better than 'cld/clac'? Ah to answer my own question (and for future readers): clac may not be supported on all processors but this pattern is.  | |
| sys/amd64/include/asmacros.h | ||
| 182 | Perhaps go ahead and break these out on separate lines since all the other instructions are on separate lines?  | |
| sys/amd64/include/cpufunc.h | ||
| 840 ↗ | (On Diff #37756) | s/slac/stac/? (I don't think this is used in any C code though as it wouldn't compile if so?)  | 
| sys/amd64/amd64/support.S | ||
|---|---|---|
| 292 | As discussed, 'the protection' means CR0.WP=1. In fact this comment is wrong in more fundamental way. The lack of CoW when user tricked copyout to copy into KVA is the least of the problems. I rewrote it there and for i386. If CR0,WP=0, CoW would not work anyway, checked or not.  | |