lkml.org 
[lkml]   [2011]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2.6.39-rc1-tip 9/26] 9: uprobes: mmap and fork hooks.
* 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


\
 
 \ /
  Last update: 2011-04-19 09:01    [W:0.067 / U:14.780 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site