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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGRGNgXw1c-Yt1nbkmh_WfhhCUQ6kn7bESS6EpoTSu=XQ=iR6Q@mail.gmail.com>
Date:	Thu, 15 Nov 2012 09:46:44 +1100
From:	Julian Calaby <julian.calaby@...il.com>
To:	Grant Likely <grant.likely@...retlab.ca>
Cc:	David Miller <davem@...emloft.net>, linux-kernel@...r.kernel.org,
	devicetree-discuss@...ts.ozlabs.org, sparclinux@...r.kernel.org,
	benh@...nel.crashing.org
Subject: Re: [PATCH] drivers/of: Constify device_node->name and ->path_component_name

Hi Grant,

On Thu, Nov 15, 2012 at 9:42 AM, Grant Likely <grant.likely@...retlab.ca> wrote:
> On Wed, Nov 14, 2012 at 10:33 PM, David Miller <davem@...emloft.net> wrote:
>>
>> You're making other changes here, such as the kstrdup() stuff,
>> seperate that into another patch.
>
> It's part of the same change. The original code was allocating a
> buffer, saving the pointer in the name field and then modifying it.
> Making the code to a kstrdup() gets rid of modifying the const buffer.

You should really mention this in the commit log, maybe something like:


[PATCH] drivers/of: Constify device_node->name and ->path_component_name

Neither of these should ever be changed once set. Make them const

Also use kstrdup() instead of memcpy() so we don't attempt to modify them.

Build tested with defconfigs on ARM, PowerPC, Sparc, MIPS, x86 among
others.


Thanks,

-- 
Julian Calaby

Email: julian.calaby@...il.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
--
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