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-next>] [day] [month] [year] [list]
Message-Id: <1437035444-13867-1-git-send-email-joro@8bytes.org>
Date:	Thu, 16 Jul 2015 10:30:42 +0200
From:	Joerg Roedel <joro@...tes.org>
To:	Will Deacon <will.deacon@....com>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>
Cc:	linux-arm-kernel@...ts.infradead.org,
	iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org, Joerg Roedel <jroedel@...e.de>
Subject: [PATCH 0/2 v2] Fix MAX_PHANDLE_ARGS limitations

From: Joerg Roedel <jroedel@...e.de>

Hi,

here is the second version of my patches to fix the
MAX_PHANDLE_ARGS limitation for the arm-smmu driver. On my
AMD Seattle system the max value of 16 is not enough to
initialize the SMMU, as the device tree node has an entry
with 25 phandle args (possible are up to 128). The result is
a WARNING and incorrect SMMU initialization.

On the other side MAX_PHANDLE_ARGS can't grow indefinitly,
as it causes 'struct of_phandle_args' to get bigger. This
struct is often allocated on-stack and should be small by
default.

So these patches introduce a way to make 'struct
of_phandle_args' bigger only when needed and change the
ARM-SMMU driver to make use of it.

The patches have been tested on my AMD Seattle system.

Please review.

Thanks,

	Joerg

Changes to v1:

	* Rebased to v4.2-rc2
	* Fixed leak in patch 2, as pointed out by Will
	  Deacon

Joerg Roedel (2):
  of: base: Allow more args than MAX_PHANDLE_ARGS if required
  arm/smmu: Make use of of_parse_phandle_with_var_args

 drivers/iommu/arm-smmu.c | 23 ++++++++++++++++-------
 drivers/of/base.c        | 43 ++++++++++++++++++++++++++++++++++++-------
 include/linux/of.h       |  7 +++++++
 3 files changed, 59 insertions(+), 14 deletions(-)

-- 
1.8.4.5

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