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)
Sun, Nov 3, 4:12 PM
Unknown Object (File)
Fri, Oct 25, 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
Unknown Object (File)
Sep 23 2024, 10:13 AM
Unknown Object (File)
Sep 23 2024, 6:31 AM
Unknown Object (File)
Sep 19 2024, 10:16 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

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

Event Timeline

sys/sys/user.h
358 ↗(On Diff #48275)

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
358 ↗(On Diff #48275)

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.