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)
Mon, Feb 3, 6:34 AM
Unknown Object (File)
Sat, Jan 25, 7:40 PM
Unknown Object (File)
Sat, Jan 25, 7:31 PM
Unknown Object (File)
Fri, Jan 24, 7:06 PM
Unknown Object (File)
Thu, Jan 23, 6:58 PM
Unknown Object (File)
Mon, Jan 20, 7:40 AM
Unknown Object (File)
Fri, Jan 17, 6:16 PM
Unknown Object (File)
Fri, Jan 17, 5:07 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.