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)
Jan 13 2024, 3:42 AM
Unknown Object (File)
Jan 1 2024, 6:46 PM
Unknown Object (File)
Dec 21 2023, 5:52 AM
Unknown Object (File)
Dec 20 2023, 2:07 AM
Unknown Object (File)
Nov 7 2023, 11:50 AM
Unknown Object (File)
Nov 6 2023, 7:22 PM
Unknown Object (File)
Oct 17 2023, 9:32 AM
Unknown Object (File)
Jun 22 2023, 5:52 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.