Page MenuHomeFreeBSD

Move td_sigqueue to the end of struct thread
ClosedPublic

Authored by badger on Apr 26 2017, 9:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 4:25 PM
Unknown Object (File)
Thu, Nov 7, 9:25 PM
Unknown Object (File)
Tue, Nov 5, 11:52 AM
Unknown Object (File)
Tue, Nov 5, 10:21 AM
Unknown Object (File)
Oct 10 2024, 1:26 PM
Unknown Object (File)
Oct 10 2024, 1:26 PM
Unknown Object (File)
Oct 10 2024, 1:26 PM
Unknown Object (File)
Oct 10 2024, 12:50 PM
Subscribers

Details

Summary

In order to preserve KBI in stable branches, replace the existing
td_sigqueue slot with padding and move the expanded (as of r315949)
td_sigqueue to the end of the struct.

Test Plan

I checked the offset of td_lend_user_pri (the first member after
the original td_sigqueue) in struct proc on a couple of architectures and
ensured that it was the same as it was before r315949.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I think, it might be useful to add _Static_assert() on stable branches that e.g. offsetof(struct thread, td_pflags) is equal to the specific hard-coded values for i386, amd64 and arms. Then such issues can be catched automatically.

IMO the asserts would be useful even for head, but then some explanation in the comment might be warranted.

This revision is now accepted and ready to land.Apr 26 2017, 9:23 PM

Also, to be clear, this would just be a direct commit to stable/{10,11}, it would not go into HEAD.

In D10515#217891, @jhb wrote:

Also, to be clear, this would just be a direct commit to stable/{10,11}, it would not go into HEAD.

Understood, and thank you.

This revision was automatically updated to reflect the committed changes.