Page MenuHomeFreeBSD

Fix access to ifru_buffer on freebsd32.
ClosedPublic

Authored by brooks on Mar 25 2018, 5:36 PM.
Tags
None
Referenced Files
F114691988: D14846.id40806.diff
Tue, Apr 15, 12:53 PM
Unknown Object (File)
Mon, Apr 14, 11:06 AM
Unknown Object (File)
Mon, Apr 14, 4:01 AM
Unknown Object (File)
Mon, Apr 14, 12:56 AM
Unknown Object (File)
Mon, Apr 14, 12:28 AM
Unknown Object (File)
Sun, Apr 13, 11:47 PM
Unknown Object (File)
Sun, Apr 13, 9:20 PM
Unknown Object (File)
Sun, Apr 6, 8:14 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.