This is an archive of the discontinued LLVM Phabricator instance.

Teach sanitizer about NetBSD specific ioctl(2) calls
ClosedPublic

Authored by krytarowski on Dec 29 2017, 3:04 PM.

Details

Summary

Introduce handling of 1200 NetBSD specific ioctl(2) calls.
Over 100 operations are disabled as unavailable or conflicting
with the existing ones (the same operation number).

Add a script that generates the rules to detect ioctls on NetBSD.
The generate_netbsd_ioctls.awk script has been written
in NetBSD awk(1) (patched nawk) and is compatible with gawk.

Generate lib/sanitizer_common/sanitizer_interceptors_ioctl_netbsd.inc
with the awk(1) script.

Update sanitizer_platform_limits_netbsd accordingly to add the needed
definitions.

Sponsored by <The NetBSD Foundation>

Diff Detail

Event Timeline

krytarowski created this revision.Dec 29 2017, 3:04 PM
vitalybuka accepted this revision.Feb 14 2018, 5:36 PM
vitalybuka added inline comments.
lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc
3 ↗(On Diff #128348)

please rename to sanitizer_interceptors_ioctl_netbsd.inc

This revision is now accepted and ready to land.Feb 14 2018, 5:36 PM
krytarowski added inline comments.Feb 14 2018, 5:47 PM
lib/sanitizer_common/sanitizer_netbsd_interceptors_ioctl.inc
3 ↗(On Diff #128348)

I will do it and land the diff. Thank you for review!

krytarowski edited the summary of this revision. (Show Details)

Rename sanitizer_netbsd_interceptors_ioctl.inc to sanitizer_interceptors_ioctl_netbsd.inc
Handle one more ioctl(2) from new NetBSD HEAD: RF_ProgressInfo_t

This revision was automatically updated to reflect the committed changes.