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, 29 Oct 2007 10:25:54 -0500
From:	Mark Rustad <mrustad@...il.com>
To:	Al Viro <viro@....linux.org.uk>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	anil.s.keshavamurthy@...el.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] intel-iommu fixes

On Oct 28, 2007, at 11:51 PM, Al Viro wrote:

> 	* off by one in dmar_get_fault_reason() (maximal index in
> array is ARRAY_SIZE()-1, not ARRAY_SIZE())
> 	* NULL noise removal
> 	* __iomem annotation fix
>
> Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
> ---
> diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
> index 0c4ab3b..9b35259 100644
> --- a/drivers/pci/intel-iommu.c
> +++ b/drivers/pci/intel-iommu.c
> @@ -745,7 +745,7 @@ static char *fault_reason_strings[] =
>  	"non-zero reserved fields in PTE",
>  	"Unknown"
>  };
> -#define MAX_FAULT_REASON_IDX 	ARRAY_SIZE(fault_reason_strings)
> +#define MAX_FAULT_REASON_IDX 	ARRAY_SIZE(fault_reason_strings) - 1

This define now should really have ()'s around its value now that it  
is an expression to avoid potential problems at its reference sites.

<snip>

-- 
Mark Rustad, MRustad@...il.com


-
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