On Tue, Jan 13, 2015 at 03:37:31PM -0800, Andrew Morton wrote:
> What the heck does (the cheerily undocumented) KERNFS_STATIC_NAME do
> and can we remove it if this patchset is in place?
The same thing, in a narrower scope. It's currently used to avoid
making copies of sysfs file names which are
On 01/14/2015 12:37 AM, Andrew Morton wrote:
> On Mon, 12 Jan 2015 10:18:38 +0100 Andrzej Hajda wrote:
>
>> Hi,
>>
>> kstrdup if often used to duplicate strings where neither source neither
>> destination will be ever modified. In such case we can just reuse the source
>> instead of duplicating
On 01/14/2015 12:37 AM, Andrew Morton wrote:
On Mon, 12 Jan 2015 10:18:38 +0100 Andrzej Hajda a.ha...@samsung.com wrote:
Hi,
kstrdup if often used to duplicate strings where neither source neither
destination will be ever modified. In such case we can just reuse the source
instead of
On Tue, Jan 13, 2015 at 03:37:31PM -0800, Andrew Morton wrote:
What the heck does (the cheerily undocumented) KERNFS_STATIC_NAME do
and can we remove it if this patchset is in place?
The same thing, in a narrower scope. It's currently used to avoid
making copies of sysfs file names which are
On Tue, 13 Jan 2015 16:10:57 -0800 Craig Milo Rogers wrote:
> > As kfree_const() has the exact same signature as kfree(), the risk of
> > accidentally passing pointers returned from kstrdup_const() to kfree() seems
> > high, which may lead to memory corruption if the pointer doesn't point to
> >
> As kfree_const() has the exact same signature as kfree(), the risk of
> accidentally passing pointers returned from kstrdup_const() to kfree() seems
> high, which may lead to memory corruption if the pointer doesn't point to
> allocated memory.
...
>> To verify if the source is in .rodata
On Mon, 12 Jan 2015 21:45:58 +0100 Geert Uytterhoeven
wrote:
> On Mon, Jan 12, 2015 at 10:18 AM, Andrzej Hajda wrote:
> > kstrdup if often used to duplicate strings where neither source neither
> > destination will be ever modified. In such case we can just reuse the source
> > instead of
On Mon, 12 Jan 2015 10:18:38 +0100 Andrzej Hajda wrote:
> Hi,
>
> kstrdup if often used to duplicate strings where neither source neither
> destination will be ever modified. In such case we can just reuse the source
> instead of duplicating it. The problem is that we must be sure that
> the
On Mon, 12 Jan 2015 10:18:38 +0100 Andrzej Hajda a.ha...@samsung.com wrote:
Hi,
kstrdup if often used to duplicate strings where neither source neither
destination will be ever modified. In such case we can just reuse the source
instead of duplicating it. The problem is that we must be sure
On Mon, 12 Jan 2015 21:45:58 +0100 Geert Uytterhoeven ge...@linux-m68k.org
wrote:
On Mon, Jan 12, 2015 at 10:18 AM, Andrzej Hajda a.ha...@samsung.com wrote:
kstrdup if often used to duplicate strings where neither source neither
destination will be ever modified. In such case we can just
As kfree_const() has the exact same signature as kfree(), the risk of
accidentally passing pointers returned from kstrdup_const() to kfree() seems
high, which may lead to memory corruption if the pointer doesn't point to
allocated memory.
...
To verify if the source is in .rodata function
On Tue, 13 Jan 2015 16:10:57 -0800 Craig Milo Rogers rog...@isi.edu wrote:
As kfree_const() has the exact same signature as kfree(), the risk of
accidentally passing pointers returned from kstrdup_const() to kfree() seems
high, which may lead to memory corruption if the pointer doesn't
On Mon, Jan 12, 2015 at 10:18 AM, Andrzej Hajda wrote:
> kstrdup if often used to duplicate strings where neither source neither
> destination will be ever modified. In such case we can just reuse the source
> instead of duplicating it. The problem is that we must be sure that
> the source is
Hi,
kstrdup if often used to duplicate strings where neither source neither
destination will be ever modified. In such case we can just reuse the source
instead of duplicating it. The problem is that we must be sure that
the source is non-modifiable and its life-time is long enough.
I suspect
Hi,
kstrdup if often used to duplicate strings where neither source neither
destination will be ever modified. In such case we can just reuse the source
instead of duplicating it. The problem is that we must be sure that
the source is non-modifiable and its life-time is long enough.
I suspect
On Mon, Jan 12, 2015 at 10:18 AM, Andrzej Hajda a.ha...@samsung.com wrote:
kstrdup if often used to duplicate strings where neither source neither
destination will be ever modified. In such case we can just reuse the source
instead of duplicating it. The problem is that we must be sure that
16 matches
Mail list logo