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: <20140721090953.GE32208@kwain>
Date:	Mon, 21 Jul 2014 11:09:53 +0200
From:	Antoine Ténart 
	<antoine.tenart@...e-electrons.com>
To:	Hans de Goede <hdegoede@...hat.com>
Cc:	Tejun Heo <tj@...nel.org>,
	Antoine Ténart 
	<antoine.tenart@...e-electrons.com>,
	sebastian.hesselbarth@...il.com, kishon@...com,
	alexandre.belloni@...e-electrons.com,
	thomas.petazzoni@...e-electrons.com, zmxu@...vell.com,
	jszhang@...vell.com, linux-arm-kernel@...ts.infradead.org,
	linux-ide@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v10 0/8] ARM: berlin: add AHCI support

Hi Hans,

On Sat, Jul 19, 2014 at 12:31:19PM +0200, Hans de Goede wrote:
> On 07/19/2014 12:18 PM, Hans de Goede wrote:
> 
> >The problem is that:
> >
> >1) We need to enable resources before we can do ahci_save_initial_config()
> >2) We must do ahci_save_initial_config() before we can do ata_host_alloc_pinfo()
> >3) Therefor we don't have port_info at enable_resources time, which is when we
> >want to enable the phys (and we cannot just enable the phys elsewhere as
> >enable_resouces gets used on e.g. resume too).
> >
> >So I think it is best to just make the phy pointers an array inside
> >ahci_host_priv, with a comment that the array indexes must match port
> >indexes.
> 
> So looking at "[PATCH v10 4/8] ata: libahci: allow to use multiple PHYs"
> I see that currently the phy array indexes do not necessarily match the
> port indexes. Since you already allocate the phys array at nports size,
> I suggest simply making the array sparse, leaving in NULL entries for
> unused ports, and adjusting enable / disable_phys to check for NULL
> pointers. This way we still have a 1:1 way to map ports <-> phys if
> we want to do something with phys on a per port basis in the future.
> 
> Note please also add a check that reg < nports so that we don't use
> the array out of bounds if there is an error in the dts.

Ok. I'll rework patch 4 along with the other modifications requested,
and I'll send a new version early this week.

Antoine

-- 
Antoine Ténart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.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