Page MenuHomeFreeBSD

Fix access to ifru_buffer on freebsd32.
ClosedPublic

Authored by brooks on Mar 25 2018, 5:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 8:16 AM
Unknown Object (File)
Sun, Nov 3, 7:53 PM
Unknown Object (File)
Sun, Nov 3, 6:07 PM
Unknown Object (File)
Fri, Nov 1, 2:12 AM
Unknown Object (File)
Oct 3 2024, 7:59 AM
Unknown Object (File)
Oct 3 2024, 12:01 AM
Unknown Object (File)
Oct 2 2024, 7:34 PM
Unknown Object (File)
Oct 1 2024, 8:40 AM
Subscribers

Details

Summary

Make all accesses to ifru_buffer go via access functions which take the
process ABI into account and use an appropriate union to access members
in the correct place in struct ifreq.

Obtained from: CheriBSD
Sponsored by: DARPA, AFRL

Diff Detail

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

Event Timeline

brooks retitled this revision from Fix access to ifru_buffer on 32-bit systems. to Fix access to ifru_buffer on freebsd32..Mar 25 2018, 5:38 PM
sys/net/if.c
2358 ↗(On Diff #40730)

'else' is not needed there and in all subsequent #ifdefs with returns. Then you can un-indent the unconditionally-compiled line.

2373 ↗(On Diff #40730)

Then why the argument is needed ?

  • Remove unneeded else in "get" cases.
  • Rename ifr_buffer_set_buffer to ifr_buffer_set_buffer_null and eliminate
kib added inline comments.
sys/net/if.c
2346 ↗(On Diff #40778)

Does it make sense to provide a stand-alone definition of this union and use it in all functions instead of repeating #ifdefs ?

This revision is now accepted and ready to land.Mar 27 2018, 8:09 AM
  • Rebase
  • Define a union ifreq_union and avoid duplicate anonymous unions.
This revision now requires review to proceed.Mar 27 2018, 5:08 PM
This revision is now accepted and ready to land.Mar 27 2018, 5:47 PM
This revision was automatically updated to reflect the committed changes.