Re: [PATCH] - prof_cpu_mask problems

From: Paul Jackson <>
Date: 2003-11-20 13:59:02
> Can you tell me, Bill, how it is that having:
>   #define HEX_DIGITS (2*sizeof(cpumask_t))
> leaves room for the terminating nul-byte?  Seems to me that
> a lot of hexnum[] arrays might be one byte short.

To answer my own question - on the output side (reads from /proc), the
code verifies that the user provided HEX_DIGITS+1 count bytes - good.

On the input side (writes into /proc), the code doesn't rely on a
nul-terminator, and ensures that only at most HEX_DIGITS worth are
copied into hexnum[].

It works.  Now let me fire up my time machine and undo one of my posts
from earlier today ...

                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <> 1.650.933.1373
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Wed Nov 19 22:04:32 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:20 EST