Re: [PATCH 1/11] oprofile: add check_user_page_readable()

From: Greg Banks
Date: Tue Nov 09 2004 - 06:56:19 EST

On Tue, 2004-11-09 at 22:26, Andrew Morton wrote:
> > The i386 callgraph code attempts to follow user stacks, from
> > an interrupt (perfmon, NMI, or timer)
> Yikes.

There are a number of problems with this, for example modern libcs
built with -fomit-frame-pointer limit it's usefulness. But when it
does get meaningful traces it's really quite useful.

> > > And why is that usage
> > > pattern not racy in the presence of paging activity?
> >
> > The i386 backtracer takes the &current->mm->page_table_lock,
> But that cannot be taken from interrupt context. A trylock would be OK I
> guess.

The code reads:

if (!spin_trylock(&current->mm->page_table_lock))

i.e. it tries to get the lock and abandons the trace if it can't.

Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at