Page MenuHomeFreeBSD

arm64: Don't include td_inhibitors when checking td_ast in do_ast
ClosedPublic

Authored by jrtc27 on Dec 19 2022, 8:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 20, 12:54 AM
Unknown Object (File)
Tue, Jun 18, 4:25 AM
Unknown Object (File)
May 5 2024, 9:02 AM
Unknown Object (File)
Apr 26 2024, 8:50 AM
Unknown Object (File)
Apr 26 2024, 8:50 AM
Unknown Object (File)
Apr 26 2024, 8:50 AM
Unknown Object (File)
Apr 26 2024, 1:42 AM
Unknown Object (File)
Dec 20 2023, 7:49 AM
Subscribers

Details

Summary

The td_ast member is an int so only 4 bytes, yet we were using an 8 byte
load and thus also got td_inhibitors in the upper bits. The code prior
to the commit that introduced td_ast did also do a bogus 8 byte load of
td_flags but masked the flags so arguably was correct, if dodgy. Now
that we're using the right width for the load we can also fold the
immediate offset back into the load; because td_ast is at an odd
multiple of 4 bytes from the start of struct thread the normal scaled
load couldn't be used with such an immediate offset when doing an 8 byte
load due to its limited immediate range, but we can use a scaled load
once more now that the offset is a multiple of the load width.

Fixes: c6d31b8306eb ("AST: rework")

Diff Detail

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