Page MenuHomeFreeBSD

Rename kernel-only members of semid_ds and msgid_ds.
ClosedPublic

Authored by brooks on Feb 23 2018, 9:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 29, 2:06 AM
Unknown Object (File)
Feb 21 2024, 9:34 PM
Unknown Object (File)
Feb 14 2024, 11:04 AM
Unknown Object (File)
Feb 14 2024, 11:04 AM
Unknown Object (File)
Feb 14 2024, 11:04 AM
Unknown Object (File)
Feb 14 2024, 11:04 AM
Unknown Object (File)
Feb 14 2024, 11:04 AM
Unknown Object (File)
Feb 14 2024, 9:37 AM
Subscribers

Details

Summary

This deliberately breaks the API in preperation for future syscall
revisions which will remove these members.

In an exp-run a single port (qemu-user-static) was found to use them
which it did becuase it emulates system calls. This has been fixed in
the ports tree.

PR: 224443

Diff Detail

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

Event Timeline

I am fine with the rename. For the action to be more explicit, you might put the fields names into private namespace, prefixing them with '__'.

This revision is now accepted and ready to land.Feb 23 2018, 9:54 PM
sys/compat/linux/linux_ipc.c
163 ↗(On Diff #39664)

If this represent's Linux's native type then I think we should leave this as-is.

sys/i386/ibcs2/ibcs2_ipc.c
77 ↗(On Diff #39664)

The Linux routines don't bother copying these over, so I think we can probably just not bother copying them here either.

sys/i386/ibcs2/ibcs2_ipc.h
48 ↗(On Diff #39664)

Likewise if these are native ibcs2 types.

  • Don't change the names of members in linux and ibcs.
  • Use __foo rather than kfoo for internal members.
This revision now requires review to proceed.Mar 1 2018, 7:17 PM
This revision is now accepted and ready to land.Mar 1 2018, 7:44 PM
jhb added inline comments.
sys/kern/sysv_msg.c
1678 ↗(On Diff #39865)

Just a note for your next change. If you haven't already done so, it would probably be best if these compat structures are explicitly cleared with 'bzero' or some such before fields are copied over to avoid leaking stack garbage. Right now it probably doesn't matter (though would if there was any padding in the structures), but once the first/last pointers are removed it will presumably matter.

sys/i386/ibcs2/ibcs2_ipc.c
76 ↗(On Diff #39865)

You need to bzero() or memset() *ibp now to avoid leaking stack garbage after removing these assignments. Sorry I missed that earlier.

  • Zero ibp before update to avoid leaking stack garbage.
  • Pre-commit rebase.
This revision now requires review to proceed.Mar 2 2018, 8:09 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 2 2018, 10:11 PM
This revision was automatically updated to reflect the committed changes.