Messages in this thread | | | Date | Sat, 4 Sep 2004 18:05:48 -0700 | From | Paul Jackson <> | Subject | Re: [PATCH] Fix argument checking in sched_setaffinity |
| |
Linus wrote: > It's not. If anything, we should probably remove even more. > > I don't see what the problem was with just requiring the right damn size. > User mode can trivially get the size by asking for it
I'll second that motion. Match size, or return -EINVAL.
My understanding of "asking for it" requires at present a user code loop, to probe for the size that works. But my user code already does that, and the first thing for which I audit any changes to this kernel code is not breaking my sizing loop code in user space.
I'd mildly prefer adding a kernel/user API for explicitly providing the two values:
sizeof(cpumask_t) sizeof(nodemask_t)
This might help reduce the unending confusions in the user and library code sitting on top of us.
We could two phase this: 1) add an obvious way to size these masks, and then 2) six months later, require sizes to match in all these calls.
I for one could live with a full and sudden change over, no phasing. But apparently my field exposure is more limited than Andi's is, at this time.
-- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson <pj@sgi.com> 1.650.933.1373 - 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/
| |