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:	Mon, 30 Mar 2015 11:20:31 -0700
From:	Joe Perches <joe@...ches.com>
To:	Sascha Hauer <s.hauer@...gutronix.de>
Cc:	Mike Turquette <mturquette@...aro.org>,
	Stephen Boyd <sboyd@...eaurora.org>,
	YH Chen <yh.chen@...iatek.com>, linux-kernel@...r.kernel.org,
	Henry Chen <henryc.chen@...iatek.com>,
	linux-mediatek@...ts.infradead.org, kernel@...gutronix.de,
	Matthias Brugger <matthias.bgg@...il.com>,
	Yingjoe Chen <Yingjoe.Chen@...iatek.com>,
	Eddie Huang <eddie.huang@...iatek.com>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/6] clk: make strings in parent name arrays const

On Mon, 2015-03-30 at 20:16 +0200, Sascha Hauer wrote:
> On Mon, Mar 30, 2015 at 10:55:19AM -0700, Joe Perches wrote:
> > On Mon, 2015-03-30 at 19:40 +0200, Sascha Hauer wrote:
> > > The clk functions and structs declare the parent_name arrays as
> > > 'const char **parent_names' which means the parent name strings
> > > are const, but the array itself is not. Use
> > > 'const char * const * parent_names' instead which also makes
> > > the array const. This allows us to put the parent_name arrays into
> > > the __initconst section.
> > 
> > If these are pointer entries are stored, care needs to be
> > taken to make sure that the memory isn't discarded or needed
> > post init.
> 
> The clock framework makes deep copies of all initialization data
> structures.

Great.  Is/Should that be documented somewhere?

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