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
Unknown Object (File)
Tue, Apr 30, 4:40 PM
Unknown Object (File)
Feb 11 2024, 3:07 PM
Unknown Object (File)
Jan 10 2024, 1:53 AM
Unknown Object (File)
Dec 25 2023, 9:42 AM
Unknown Object (File)
Dec 13 2023, 3:59 AM
Unknown Object (File)
Nov 28 2023, 3:10 PM
Unknown Object (File)
Nov 25 2023, 8:50 AM
Unknown Object (File)
Sep 1 2023, 9:38 AM
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