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] [day] [month] [year] [list]
Date:	Mon, 11 Feb 2008 00:12:03 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Julia Lawall <julia@...u.dk>
Cc:	gregkh@...e.de, linux-usb-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 7/8] drivers/usb: Use FIELD_SIZEOF

On Sun, Feb 10, 2008 at 09:15:09PM +0100, Julia Lawall wrote:
> --- a/drivers/usb/atm/usbatm.c
> +++ b/drivers/usb/atm/usbatm.c
> @@ -1349,7 +1349,7 @@ static int __init usbatm_usb_init(void)
>  {
>  	dbg("%s: driver version %s", __func__, DRIVER_VERSION);
>  
> -	if (sizeof(struct usbatm_control) > sizeof(((struct sk_buff *) 0)->cb)) {
> +	if (sizeof(struct usbatm_control) > FIELD_SIZEOF(struct sk_buff, cb)) {

NAK. Driver should BUILD_BUG_ON instead.

>  		printk(KERN_ERR "%s unusable with this kernel!\n", usbatm_driver_name);
>  		return -EIO;
>  	}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ