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]
Date:	Thu, 1 Nov 2007 19:13:55 +0100
From:	Ingo Oeser <netdev@...eo.de>
To:	Grant Likely <grant.likely@...retlab.ca>
Cc:	netdev@...r.kernel.org, jgarzik@...ox.com, domen.puncer@...argo.com
Subject: Re: [PATCH 2/2] [POWERPC] Fix region size check in mpc5200 FEC driver

Hi Grant,

Grant Likely schrieb:
> From: Grant Likely <grant.likely@...retlab.ca>
> 
> Driver shouldn't complain if the register range is larger than what
> it expects.  This works around failures with some device trees.
> 

But maybe the firmware guys like to know about it?
May I suggest putting this in front of the other check?

if ((mem.end - mem.start + 1) > sizeof(struct mpc52xx_fec)) {
  		printk(KERN_DEBUG DRIVER_NAME
			" - gratious resource size (%lx > %x), check mpc52xx_devices.c\n",
  			(unsigned long)(mem.end - mem.start + 1), sizeof(struct mpc52xx_fec));
}

> -	if ((mem.end - mem.start + 1) != sizeof(struct mpc52xx_fec)) {
> +	if ((mem.end - mem.start + 1) < sizeof(struct mpc52xx_fec)) {
>  		printk(KERN_ERR DRIVER_NAME
> -			" - invalid resource size (%lx != %x), check mpc52xx_devices.c\n",
> +			" - invalid resource size (%lx < %x), check mpc52xx_devices.c\n",
>  			(unsigned long)(mem.end - mem.start + 1), sizeof(struct mpc52xx_fec));
>  		return -EINVAL;
>  	}


Best Regards

Ingo Oeser
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ