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]
Message-ID: <44CE515B.1060302@gmail.com>
Date:	Tue, 01 Aug 2006 03:52:11 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	"J.A. Magall?n" <jamagallon@....com>,
	"Linux-Kernel," <linux-kernel@...r.kernel.org>,
	linux-ide@...r.kernel.org, Jeff Garzik <jgarzik@...ox.com>,
	Andrew Morton <akpm@...l.org>
Subject: Re: [2.6.18-rc2-mm1] libata ate one PATA channel

Hello,

Alan Cox wrote:
[--snip--]
>> I killed hard_port_no by s/ap->hard_port_no/ap->port_no/g without 
>> actually reviewing the usages (man, those are a LOT).  If all pata 
>> drivers always relied on ap->hard_port_no representing the actual port 
>> index in the controller, there shouldn't be a problem.  But, just in 
>> case, please review the change.
> 
> Think about the following execution sequence
> 
> ati_pci_init_one
> 	primary port already stolen by drivers/ide 
> 	secondary port free
> 
> 	legacy_mode = ATA_PORT_SECONDARY
> 	ata_pci_init_legacy_port
> 
> 	port_num = 0
> 	hard_port_num = 1
> 
> 	*kerunnccchhhhhh*

Ah... You're right.  That will make port_no different from the hw port#.

>> If this fixes Magallon's problem and you agree with the fix, I'll break 
>> it down to two patches and submit'em to you with proper heading and all.
> 
> I agree with the theory and the diagnosis. I'm a bit worried about
> hard_port_no however and I don't think that bit is safe in the secondary
> only corner case. Registering both always and disabling one works for me
> as a cleanup.
> 
> If you do that then I'll audit all the drivers use of ->port_no against
> the patches.

I like 'registering both always and disabling one' approach for 
partially stolen legacy devices.  We can make ->hard_port_no do the job 
as before, but IMHO it's error-prone and only useful for very limited 
cases (first legacy port stolen).

Jeff, what do you think?

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