Page MenuHomeFreeBSD

Restore the API of the kf_sa_local and kf_sa_peer members.
ClosedPublic

Authored by jhb on Sep 20 2018, 6:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 10:47 AM
Unknown Object (File)
Thu, Dec 5, 4:18 AM
Unknown Object (File)
Thu, Nov 28, 9:18 PM
Unknown Object (File)
Nov 3 2024, 4:12 PM
Unknown Object (File)
Oct 25 2024, 2:22 AM
Unknown Object (File)
Oct 5 2024, 6:56 AM
Unknown Object (File)
Sep 26 2024, 5:47 PM
Unknown Object (File)
Sep 24 2024, 3:40 AM
Subscribers

Details

Summary

In 11.x and earlier these were accessible as direct members of
'struct kinfo_file'. This adds wrapper macros to restore that API
similar to those used for kf_sock_domain and some other fields.

Test Plan
  • buildworld and buildkernel
  • noticed because my very recent changes to gdb to add 'info proc files' failed to build on head

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19711
Build 19274: arc lint + arc unit

Event Timeline

sys/sys/user.h
354

Then rename it to kf_sock_local0 ?

jhb marked an inline comment as done.Sep 20 2018, 6:23 PM
jhb added inline comments.
sys/sys/user.h
354

Hmm, in that case I can drop the 0 and just use kf_sock_local.

  • Use kf_sock_local/peer instead of kf_sa_local0/peer0.
This revision is now accepted and ready to land.Sep 20 2018, 6:34 PM

when modifying calls to bcopy with non-verlapping stores, please change them to memcpy

  • Use an anonymous union and struct for FreeBSD 11 compat fields.
  • Rename the kf_un.kf_sock variants back to their original names.
This revision now requires review to proceed.Sep 21 2018, 12:38 AM

So the fact that some things were updated for the new name and that it clashed with the old name made just reverting to the old name messy. I already had done the union change as a followup to remove the compat macros, and it occurred to me that since I had it, I could actually go back to using kf_sa_local/peer in both places which would let both the old and new names work at the same time. This in theory shouldn't require reverting any of the ports changes or upstream port changes while still preserving the existing API. We could even go back and fix the kf_sock_ variants to remove the trailing '0' now if we wished to as well.

This revision is now accepted and ready to land.Sep 21 2018, 11:44 AM
This revision was automatically updated to reflect the committed changes.