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)
Thu, Apr 11, 3:19 AM
Unknown Object (File)
Thu, Apr 11, 3:19 AM
Unknown Object (File)
Thu, Apr 11, 3:19 AM
Unknown Object (File)
Thu, Apr 11, 3:19 AM
Unknown Object (File)
Thu, Apr 11, 3:18 AM
Unknown Object (File)
Thu, Apr 11, 2:18 AM
Unknown Object (File)
Mar 2 2024, 1:29 PM
Unknown Object (File)
Feb 25 2024, 5:47 PM
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.