Re: -Wswitch Clang warnings in drivers/scsi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2018-10-04 at 23:57 -0700, Nathan Chancellor wrote:
+AD4 Regardless of how the overflow is handled within the switch statement,
+AD4 the overflow is also happening when passing in these values to the ioctl,
+AD4 right? I mean these case values are defined in the uapi files so that
+AD4 userspace can easily pass them in to the ioctl, meaning those values are
+AD4 being passed in as a signed integer and I would assume subsequently
+AD4 overflowing unless I'm just missing something here.

>From the user space header +ADw-sys/ioctl.h+AD4:

extern int ioctl (int +AF8AXw-fd, unsigned long int +AF8AXw-request, ...) +AF8AXw-THROW+ADs

>From the kernel header +ADw-linux/fs.h+AD4:

	long (+ACo-unlocked+AF8-ioctl) (struct file +ACo, unsigned int, unsigned long)+ADs
	long (+ACo-compat+AF8-ioctl) (struct file +ACo, unsigned int, unsigned long)+ADs

Why has the second argument been declared as +ACI-unsigned long+ACI in the glibc
headers and as +ACI-unsigned int+ACI in the kernel headers? That's not clear to me.

Bart.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux