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
F164150055: D58426.id182567.diff
Wed, Jul 29, 4:24 AM
Unknown Object (File)
Tue, Jul 28, 4:00 PM
Unknown Object (File)
Tue, Jul 28, 12:08 PM
Unknown Object (File)
Tue, Jul 28, 11:01 AM
Unknown Object (File)
Tue, Jul 28, 2:30 AM
Unknown Object (File)
Mon, Jul 27, 8:31 PM
Unknown Object (File)
Mon, Jul 27, 3:23 PM
Unknown Object (File)
Sun, Jul 26, 3:26 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