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]
Message-ID: <D9FFE20C522965449E182ACE73889AEB1A6A4055@IRSMSX105.ger.corp.intel.com>
Date:	Mon, 20 Jan 2014 13:46:11 +0000
From:	"Dorau, Lukasz" <lukasz.dorau@...el.com>
To:	"JBottomley@...allels.com" <JBottomley@...allels.com>
CC:	"Baldysiak, Pawel" <pawel.baldysiak@...el.com>,
	"Jiang, Dave" <dave.jiang@...el.com>,
	"Patelczyk, Maciej" <maciej.patelczyk@...el.com>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] isci: reformulate for_each_isci_host macro to fix an
 oops

On Thursday, January 16, 2014 2:16 PM Lukasz Dorau <lukasz.dorau@...el.com> wrote:
> 
> The loop 'for' in macro 'for_each_isci_host' (drivers/scsi/isci/init.c:717)
> is executed more times than it can be. Regardless the condition:
>    'id < ARRAY_SIZE(to_pci_info(pdev)->hosts)' (drivers/scsi/isci/host.h:315)
> it is executed when id equals ARRAY_SIZE(to_pci_info(pdev)->hosts) too.
> (Remark: ARRAY_SIZE(to_pci_info(pdev)->hosts) always equals
> SCI_MAX_CONTROLLERS = 2)
> 
> It sounds crazy, but it is truth. I have checked it in the following way:
> I have added the line:
> 
>    printk(KERN_ERR ">>> (%d < %d) == %d \n", \
>           i, SCI_MAX_CONTROLLERS, (i < SCI_MAX_CONTROLLERS));
> 
> after the 'for_each_isci_host' macro in drivers/scsi/isci/init.c:701
> and received the following output:
> 
>    >>> (0 < 2) == 1
>    >>> (1 < 2) == 1
>    >>> (2 < 2) == 1
> 
> after issuing 'modprobe isci' command on platform with two SCU controllers
> (Patsburg D or T chipset required).
> The kernel was compiled using gcc version 4.8.2.
> 

Hi James,

Please disregard this patch.
It turned to be a GCC 4.8 bug:
http://marc.info/?l=linux-kernel&m=138998871911336&w=2

I will write a new patch.

Lukasz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ