Re: [PATCH] cpumask 5/10 rewrite cpumask.h - single bitmap basedimplementation

From: Paul Jackson
Date: Fri Jun 04 2004 - 12:29:07 EST


Bill wrote:
> This is patently ridiculous. Make a compat_sched_getaffinity(), and
> likewise for whatever else is copying unsigned long arrays to userspace.

Earlier, Andrew wrote:
> In that case the cpumask code should provide some API function which
> converts a cpumask_t into (and from?) some canonical and documented form.
> Then you copy what it gave you to userspace.

I'd vote to have the documented form that Andrew speaks of be arrays
of 32-bit words, which is what I understood Mikael was doing. I agree
with Andrew's suggested to/from canonical functions.

I'd prefer not copying arrays of unsigned longs, due to the confusions
of coding to them across 32/64 bit and big/little endian architectures.
At times I have wished the kernel had chosen u32 arrays instead of
unsigned long arrays for bitmaps, for the same reason. The cpumask
sprintf and parse format is intentionally 32-bit chunk friendly.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/