Page MenuHomeFreeBSD

pkru.3: Note that the kernel may not respect PKRU protections
ClosedPublic

Authored by markj on Wed, Apr 15, 5:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 19, 6:48 AM
Unknown Object (File)
Sat, Apr 18, 6:21 AM
Unknown Object (File)
Sat, Apr 18, 6:21 AM
Unknown Object (File)
Sat, Apr 18, 6:21 AM
Unknown Object (File)
Sat, Apr 18, 6:21 AM
Unknown Object (File)
Sat, Apr 18, 5:25 AM
Unknown Object (File)
Fri, Apr 17, 6:14 PM
Unknown Object (File)
Fri, Apr 17, 2:01 PM
Subscribers

Details

Summary

There are cases where the kernel will be able to access memory covered
by a PKRU key which nomially prohibits accesses. I believe regular
copyin()/copyout() are subject to the contents of PKRU, but memory
accesses via uiomove_fromphys() will not be. This can arise when
performing fault I/O, for instance. I didn't test, but I suspect AIO is
another case.

Update the man page to acknowledge this.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72252
Build 69135: arc lint + arc unit

Event Timeline

markj requested review of this revision.Wed, Apr 15, 5:49 PM
lib/libsys/x86/pkru.3
76
78
markj marked 2 inline comments as done.

Handle kib's notes.

kib added inline comments.
lib/libsys/x86/pkru.3
75
This revision is now accepted and ready to land.Thu, Apr 16, 1:33 PM
lib/libsys/x86/pkru.3
75

'the synchronous signal' even

lib/libsys/x86/pkru.3
75

consider "... PKRU register, the offending thread receives a SIGSEGV signal with ..."

markj marked 3 inline comments as done.

Handle feedback

This revision now requires review to proceed.Thu, Apr 16, 4:36 PM
This revision is now accepted and ready to land.Thu, Apr 16, 4:41 PM