amd64: extract uiomove_mem() from memrw() The MD function with MI interface to provide a way to read arbitrary (canonical) KVA. amd64 only for now. Tested by: aokblast
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
| sys/amd64/amd64/trap.c | ||
|---|---|---|
| 797 ↗ | (On Diff #178476) | I believe that the first check for tf_rip makes the shortest path through the condition: userspace must work hard to fault with this specific %rip, and kernel most likely would not fault on safe_read_read with other conditions false. |
| sys/amd64/amd64/machdep.c | ||
|---|---|---|
| 1868 | uio_rw is indeed used. uio_segflg too, if we end up calling uiomove(). | |
| sys/amd64/amd64/uio_machdep.c | ||
|---|---|---|
| 194 | I believe it is enough for the use at hand, D46193. More, returning to the 'faulting' implementation, I now think that it opened the access too wide, it should check at least that the address is in KVA. Of course we can return to the 'faulting' way of doing things for other addresses which cannot be handled by pmap_extract(kernel_pmap). I thought that avoiding adding a check to the page fault path is good. | |