linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ezequiel Garcia <elezegarcia@gmail.com>
To: JoonSoo Kim <js1304@gmail.com>
Cc: David Rientjes <rientjes@google.com>,
	linux-mm@kvack.org, Pekka Enberg <penberg@kernel.org>,
	Christoph Lameter <cl@linux.com>
Subject: Re: [PATCH 3/5] mm, util: Do strndup_user allocation directly, instead of through memdup_user
Date: Thu, 6 Sep 2012 21:00:01 -0300	[thread overview]
Message-ID: <CALF0-+XHSaZW_mBq_WQAmxOTK46zXx1gEx-wX6Ho1BAskGmhmQ@mail.gmail.com> (raw)
In-Reply-To: <CAAmzW4NOMyZ8GPb7NcJBvcRD55JTFRhVxG7yyo29YcRWKm3mwA@mail.gmail.com>

Hi Joonsoo,

On Thu, Sep 6, 2012 at 4:27 PM, JoonSoo Kim <js1304@gmail.com> wrote:
> 2012/9/6 Ezequiel Garcia <elezegarcia@gmail.com>:
>> Hi David,
>>
>> On Wed, Sep 5, 2012 at 9:59 PM, David Rientjes <rientjes@google.com> wrote:
>>> On Wed, 5 Sep 2012, Ezequiel Garcia wrote:
>>>
>>>> I'm not sure this is the best solution,
>>>> but creating another function to reuse between strndup_user
>>>> and memdup_user seemed like an overkill.
>>>>
>>>
>>> It's not, so you'd need to do two things to fix this:
>>>
>>>  - provide a reason why strndup_user() is special compared to other
>>>    common library functions that also allocate memory, and
>>>
>>
>> Sorry, I don't understand what you mean.
>> strndup_user is *not* special than any other function, simply if you use
>> memdup_user for the allocation you will get traces with strndup_user
>> as the caller,
>> and that's not desirable.
>
> I'm not sure that this changed should be needed.

Why do you think this?

> But, if you want to fix this properly, why don't change __krealloc() ?
> It is called by krealloc(), and may return krealloc()'s address.

That's already fixed and applied on Pekka's tree, it's this one:
mm: Use __do_krealloc to do the krealloc job

I think this kind of issues are important, yet overlooked, for kmem
tracing to become
useful. There's a reason we have kmalloc_track_caller, and it would be nice
to have them all trace properly.

Regards,
Ezequiel.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2012-09-07  0:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 22:48 [PATCH 1/5] mm, slab: Remove silly function slab_buffer_size() Ezequiel Garcia
2012-09-05 22:48 ` [PATCH 2/5] mm, slob: Add support for kmalloc_track_caller() Ezequiel Garcia
2012-09-06  0:57   ` David Rientjes
2012-09-06  1:10     ` Ezequiel Garcia
2012-09-06  7:17       ` Pekka Enberg
2012-09-05 22:48 ` [PATCH 3/5] mm, util: Do strndup_user allocation directly, instead of through memdup_user Ezequiel Garcia
2012-09-06  0:59   ` David Rientjes
2012-09-06  1:06     ` Ezequiel Garcia
2012-09-06 19:27       ` JoonSoo Kim
2012-09-07  0:00         ` Ezequiel Garcia [this message]
2012-09-07 21:12           ` JoonSoo Kim
2012-09-05 22:48 ` [PATCH 4/5] mm, slob: Use only 'ret' variable for both slob object and returned pointer Ezequiel Garcia
2012-09-06 14:18   ` Christoph Lameter
2012-09-06 15:04     ` Ezequiel Garcia
2012-09-05 22:48 ` [PATCH 5/5] mm, slob: Trace allocation failures consistently Ezequiel Garcia
2012-09-06 19:09   ` JoonSoo Kim
2012-09-07  0:03     ` Ezequiel Garcia
2012-09-07 21:23       ` JoonSoo Kim
2012-09-08 13:26         ` Ezequiel Garcia
2012-09-07 21:50   ` JoonSoo Kim
2012-09-07 22:00     ` JoonSoo Kim
2012-09-06  0:54 ` [PATCH 1/5] mm, slab: Remove silly function slab_buffer_size() David Rientjes
2012-09-06  1:07   ` Ezequiel Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALF0-+XHSaZW_mBq_WQAmxOTK46zXx1gEx-wX6Ho1BAskGmhmQ@mail.gmail.com \
    --to=elezegarcia@gmail.com \
    --cc=cl@linux.com \
    --cc=js1304@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox