From: Sasha Levin <sasha.levin@oracle.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: torvalds@linux-foundation.org, mingo@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/9] liblockdep: Support using LD_PRELOAD
Date: Wed, 08 May 2013 09:29:45 -0400 [thread overview]
Message-ID: <518A5349.4030303@oracle.com> (raw)
In-Reply-To: <20130508102220.GB6131@dyad.programming.kicks-ass.net>
Peter,
Thanks for your comments! I'll address them and re-send the patch series.
On 05/08/2013 06:22 AM, Peter Zijlstra wrote:
>> + /*
>> > + * Some programs attempt to initialize and use locks in their
>> > + * allocation path. This means that a call to malloc() would
>> > + * result in locks being initialized and locked.
>> > + *
>> > + * Why is it an issue for us? dlsym() below will try allocating to
>> > + * give us the original function. Since this allocation will result
>> > + * in a locking operations, we have to let pthread deal with it,
>> > + * but we can't! we don't have the pointer to the original API
>> > + * since we're inside dlsym() trying to get it :(
>> > + *
>> > + * We can work around it by telling the program that locking was
>> > + * really okay, and just initialize those locks when we're fully
>> > + * up and running (this is ok because this all happens during
>> > + * initialization phase, when we have just one thread). But
>> > + * this is a big TODO at this point.
>> > + */
> Fun.. got any example programs that trigger this?
firefox.
The problem there is that it uses jemalloc, which tries to do what I've
described in the blurb above.
Thanks,
Sasha
next prev parent reply other threads:[~2013-05-08 13:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 18:54 [PATCH 0/9] liblockdep: userspace lockdep Sasha Levin
2013-04-30 18:54 ` [PATCH 1/9] lockdep: Be nice about building from userspace Sasha Levin
2013-04-30 18:54 ` [PATCH 2/9] liblockdep: Wrap kernel/lockdep.c to allow usage " Sasha Levin
2013-05-08 10:01 ` Peter Zijlstra
2013-05-08 13:27 ` Sasha Levin
2013-05-08 13:35 ` Peter Zijlstra
2013-05-08 13:53 ` Sasha Levin
2013-04-30 18:54 ` [PATCH 3/9] liblockdep: Add public headers for pthread_mutex_t implementation Sasha Levin
2013-04-30 18:54 ` [PATCH 4/9] liblockdep: Add pthread_mutex_t test suite Sasha Levin
2013-04-30 18:54 ` [PATCH 5/9] liblockdep: Add public headers for pthread_rwlock_t implementation Sasha Levin
2013-04-30 18:54 ` [PATCH 6/9] liblockdep: Add pthread_rwlock_t test suite Sasha Levin
2013-04-30 18:54 ` [PATCH 7/9] liblockdep: Support using LD_PRELOAD Sasha Levin
2013-05-08 10:22 ` Peter Zijlstra
2013-05-08 13:29 ` Sasha Levin [this message]
2013-04-30 18:54 ` [PATCH 8/9] liblockdep: Add the 'lockdep' user-space utility Sasha Levin
2013-04-30 18:54 ` [PATCH 9/9] liblockdep: Add a MAINTAINERS entry Sasha Levin
2013-05-07 16:15 ` [PATCH 0/9] liblockdep: userspace lockdep Sasha Levin
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=518A5349.4030303@oracle.com \
--to=sasha.levin@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
/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