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: <CAPub14-Oot_wJsRTv2AGu3SAAf40+3_wK43=0Swxj+5XjPaDew@mail.gmail.com>
Date:	Sat, 1 Sep 2012 16:44:29 +0530
From:	shiraz hashim <shiraz.linux.kernel@...il.com>
To:	Roland Stigge <stigge@...com.de>
Cc:	linus.walleij@...aro.org, aletes.xgr@...il.com,
	broonie@...nsource.wolfsonmicro.com, grant.likely@...retlab.ca,
	rob.herring@...xeda.com, rob@...dley.net,
	devicetree-discuss@...ts.ozlabs.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	spi-devel-general@...ts.sourceforge.net,
	gabriel.fernandez@...ricsson.com, lee.jones@...aro.org,
	viresh.kumar@...aro.org, sachin.verma@...co
Subject: Re: [PATCH v6 1/3] spi/pl022: Add chip select handling via GPIO

Hi Roland,

On Wed, Aug 22, 2012 at 7:19 PM, Roland Stigge <stigge@...com.de> wrote:
> @@ -2016,6 +2030,8 @@ pl022_probe(struct amba_device *adev, co
>         pl022->master_info = platform_info;
>         pl022->adev = adev;
>         pl022->vendor = id->data;
> +       /* Point chipselects to allocated memory beyond the main struct */
> +       pl022->chipselects = (int *) pl022 + sizeof(struct pl022);

This is going beyond memory allocated for chipselects
as it adds 4 * sizeof(struct pl022) bytes to pl022.

pl022->chipselects = (int *) &pl022[1];
can be musch safer.

-- 
regards
Shiraz Hashim
--
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