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:	Fri, 5 Mar 2010 19:58:24 +0100
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-ide@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	Alan Cox <alan@...ux.intel.com>
Subject: Re: [git patches] libata updates for 2.6.34

On Monday 01 March 2010 09:23:30 pm Jeff Garzik wrote:

>       libata: Pass host flags into the pci helper

It introduces a subtle bug:

struct ata_host {
...
	unsigned long		flags;

> @@ -1642,8 +1643,8 @@ extern int ata_pci_sff_activate_host(struct ata_host *host,
>  				     irq_handler_t irq_handler,
>  				     struct scsi_host_template *sht);
>  extern int ata_pci_sff_init_one(struct pci_dev *pdev,
> -				const struct ata_port_info * const * ppi,
> -				struct scsi_host_template *sht, void *host_priv);
> +		const struct ata_port_info * const * ppi,
> +		struct scsi_host_template *sht, void *host_priv, int hflags);

'int' type is not equal 'unsigned long' one on 64-bit architectures.

Besides doing it this way is clearly suboptimal as the same effect
could have been achieved by doing:

extern int __ata_pci_sff_init_one(struct pci_dev *pdev,
				const struct ata_port_info * const *ppi,
				struct scsi_host_template *sht, void *host_priv,
				int hflag);
static inline int ata_pci_sff_init_one(struct pci_dev *pdev,
				const struct ata_port_info * const *ppi,
				struct scsi_host_template *sht, void *host_priv)
{
	return __ata_pci_sff_init_one(pdev, ppi, sht, host_priv, 0);
}

without the need to update all drivers and without breaking pending
out-of-tree driver patches (yeah, it breaks my pata_ep93xx patches)..

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