This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH v3 2.6.39-rc1-tip 9/26] 9: uprobes: mmap and fork hooks.
- From: Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>
- To: Peter Zijlstra <peterz at infradead dot org>
- Cc: Ingo Molnar <mingo at elte dot hu>, Steven Rostedt <rostedt at goodmis dot org>, Linux-mm <linux-mm at kvack dot org>, Arnaldo Carvalho de Melo <acme at infradead dot org>, Linus Torvalds <torvalds at linux-foundation dot org>, Jonathan Corbet <corbet at lwn dot net>, Christoph Hellwig <hch at infradead dot org>, Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>, Thomas Gleixner <tglx at linutronix dot de>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Oleg Nesterov <oleg at redhat dot com>, LKML <linux-kernel at vger dot kernel dot org>, SystemTap <systemtap at sources dot redhat dot com>, Jim Keniston <jkenisto at linux dot vnet dot ibm dot com>, Roland McGrath <roland at hack dot frob dot com>, Andi Kleen <andi at firstfloor dot org>, Andrew Morton <akpm at linux-foundation dot org>
- Date: Tue, 19 Apr 2011 12:15:11 +0530
- Subject: Re: [PATCH v3 2.6.39-rc1-tip 9/26] 9: uprobes: mmap and fork hooks.
- References: <20110401143223.15455.19844.sendpatchset@localhost6.localdomain6> <20110401143413.15455.75831.sendpatchset@localhost6.localdomain6> <1303144163.32491.875.camel@twins>
- Reply-to: Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>
* Peter Zijlstra <peterz@infradead.org> [2011-04-18 18:29:23]:
> On Fri, 2011-04-01 at 20:04 +0530, Srikar Dronamraju wrote:
> > + if (vaddr > ULONG_MAX)
> > + /*
> > + * We cannot have a virtual address that is
> > + * greater than ULONG_MAX
> > + */
> > + continue;
>
> I'm having trouble with those checks.. while they're not wrong they're
> not correct either. Mostly the top address space is where the kernel
> lives and on 32-on-64 compat the boundary is much lower still. Ideally
> it'd be TASK_SIZE, but that doesn't work since it assumes you're testing
> for the current task.
>
Guess I can use TASK_SIZE_OF(tsk) instead of ULONG_MAX ?
I think TASK_SIZE_OF handles 32-on-64 correctly.
--
Thanks and Regards
Srikar