Page MenuHomeFreeBSD

arm64: Handle atomic operations on unaligned userland addresses
ClosedPublic

Authored by cognet on Thu, Jul 23, 11:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 18, 9:37 PM
Unknown Object (File)
Wed, Aug 12, 1:26 PM
Unknown Object (File)
Tue, Aug 11, 7:14 AM
Unknown Object (File)
Tue, Aug 11, 2:11 AM
Unknown Object (File)
Tue, Aug 11, 12:57 AM
Unknown Object (File)
Sun, Aug 9, 6:53 AM
Unknown Object (File)
Sun, Aug 9, 4:32 AM
Unknown Object (File)
Sun, Aug 9, 4:22 AM
Subscribers

Details

Summary
Even if unaligned memory operations are allowed, there may still be
restrictions when it comes to atomic operations.
We do such atomic operations on userland addresses at least when _umtx_op()
is used, which will use casueword32().
Fix that by not panicing if pcb_onfault is set, and just go back to that
fault handler instead.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

While here I think it would make sense to also handle this case in tag_check_abort, although I don't think we can currently hit it there (no tag checking in the kernel).

This revision is now accepted and ready to land.Tue, Jul 28, 9:15 AM