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:	Mon, 12 Oct 2009 15:49:15 +0800
From:	Huang Ying <ying.huang@...el.com>
To:	Andrew Patterson <andrew.patterson@...com>
Cc:	"prarit@...hat.com" <prarit@...hat.com>,
	"andi@...stfloor.org" <andi@...stfloor.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"jbarnes@...tuousgeek.org" <jbarnes@...tuousgeek.org>,
	"pci-linux@...r.kernel.org" <pci-linux@...r.kernel.org>
Subject: Re: [PATCH 3/5] PCI: maintain backwards compatibility with
 aer-inject user-land tool

On Mon, 2009-10-12 at 15:03 +0800, Andrew Patterson wrote: 
> PCI: maintain backwards compatibility with aer-inject user-land tool
> 
> Maintain backwards compatibility with the 0.1 version  of the aer-inject
> user-land tool.
> 
> Signed-off-by: Andrew Patterson<andrew.patterson@...com>
> ---
> 
> diff --git a/drivers/pci/pcie/aer/aer_inject.c b/drivers/pci/pcie/aer/aer_inject.c
> index 5fc5b3e..ac0b5e7 100644
> --- a/drivers/pci/pcie/aer/aer_inject.c
> +++ b/drivers/pci/pcie/aer/aer_inject.c
> @@ -23,10 +23,10 @@
>  #include <linux/pci.h>
>  #include <linux/fs.h>
>  #include <linux/uaccess.h>
> +#include <linux/stddef.h>
>  #include "aerdrv.h"
>  
>  struct aer_error_inj {
> -	u16 domain;
>  	u8 bus;
>  	u8 dev;
>  	u8 fn;
> @@ -36,6 +36,7 @@ struct aer_error_inj {
>  	u32 header_log1;
>  	u32 header_log2;
>  	u32 header_log3;
> +	u16 domain;
>  };
>  
>  struct aer_error {
> @@ -431,10 +432,11 @@ static ssize_t aer_inject_write(struct file *filp, const char __user *ubuf,
>  
>  	if (!capable(CAP_SYS_ADMIN))
>  		return -EPERM;
> -
> -	if (usize != sizeof(struct aer_error_inj))
> +	if (usize < offsetof(struct aer_error_inj, domain) ||
> +	    usize > sizeof(einj))
>  		return -EINVAL;
>  
> +	memset(&einj, 0, sizeof(einj));
>  	if (copy_from_user(&einj, ubuf, usize))
>  		return -EFAULT;
>  

Why not merge this patch with [2/5]?

Best Regards,
Huang Ying


--
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