Page MenuHomeFreeBSD

Move 32-bit compat support for CDIOREADTOCENTRYS to the right place.
ClosedPublic

Authored by brooks on Oct 1 2018, 6:08 PM.
Tags
None
Referenced Files
F174041170: D17378.id48636.diff
Wed, Sep 30, 4:10 AM
F173953106: D17378.id48627.diff
Tue, Sep 29, 3:00 PM
F173949655: D17378.id48627.diff
Tue, Sep 29, 2:19 PM
F173910345: D17378.id48637.diff
Tue, Sep 29, 7:14 AM
Unknown Object (File)
Mon, Sep 28, 2:55 PM
Unknown Object (File)
Mon, Sep 28, 2:06 PM
Unknown Object (File)
Mon, Sep 28, 6:55 AM
Unknown Object (File)
Tue, Sep 8, 9:24 PM
Subscribers
None

Details

Reviewers
kib
jhb
emaste
Summary

ioctl(2) commands only have meaning in the context of a file descriptor
so translating them in the syscall layer is incorrect.

The new handler users an accessor to retrieve/construct a pointer from
the last member of the passed structure and relies on type punning to
access the other members which require no translation.

Obtained from: CheriBSD
Sponsored by: DARPA, AFRL

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19900
Build 19423: arc lint + arc unit

Event Timeline

This seems to work, but the previous 'sincere' copy is better, IMO.

This revision is now accepted and ready to land.Oct 1 2018, 6:32 PM
sys/cam/scsi/scsi_cd.c
1299

In some ways it'd be nicer if this used the ioctl command itself rather than SV_CURPROC_FLAG to decide this as it's really the ioctl command value that determines the layout of the structure.

  • Pass cmd to te_data_get_ptr and switch on the size rather than SV_ILP32.
This revision now requires review to proceed.Oct 1 2018, 10:07 PM
brooks added inline comments.
sys/cam/scsi/scsi_cd.c
1299

I've alter the code to switch on the size embedded in the command. I'm using the size rather than the command it self because using the command isn't a scalable pattern for structs used by many ioctls.

brooks marked an inline comment as done.
  • Use sizeof(union->struct) consistantly.
This revision is now accepted and ready to land.Oct 2 2018, 4:39 PM