lkml.org 
[lkml]   [2003]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Make modules work in Linus' tree on ARM

On 14 Aug 2003, Alan Cox wrote:
>
> And why can't you put the pointer size at the start of the buffer ?

Historical aside: this was pretty much _exactly_ the bug that we used to
have in the old style timer tick profiler: it was impossible to figure out
what the "profile shift" value was. So you got a series of "unsigned int"
counts, but you didn't know what the granularity was for the hit counting.
That was fixed by just making read_profile() return the sample step size
as the first word. See

fs/proc/proc_misc.c: read_profile()

and note the small

while (p < sizeof(unsigned int) && count > 0) {
put_user(*((char *)(&sample_step)+p),buf);
buf++; p++; count--; read++;
}
loop (and a few "+1" things for adjusting size comparisons).

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.074 / U:0.536 seconds]
©2003-2011 Jasper Spaans. Advertise on this site