lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1539024429.64374.40.camel@acm.org>
Date:   Mon, 08 Oct 2018 11:47:09 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Nathan Chancellor <natechancellor@...il.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: -Wswitch Clang warnings in drivers/scsi

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

>From the user space header <sys/ioctl.h>:

extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;

>From the kernel header <linux/fs.h>:

	long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
	long (*compat_ioctl) (struct file *, unsigned int, unsigned long);

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

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ