public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: ak@muc.de, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix argument checking in sched_setaffinity
Date: Sat, 4 Sep 2004 18:05:48 -0700	[thread overview]
Message-ID: <20040904180548.2dcdd488.pj@sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0409041717230.4735@ppc970.osdl.org>

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

  reply	other threads:[~2004-09-05  1:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31 14:30 [PATCH] Fix argument checking in sched_setaffinity Andi Kleen
2004-09-01  1:36 ` Paul Jackson
2004-09-01  1:59   ` Anton Blanchard
2004-09-02  9:33     ` Paul Jackson
2004-09-04 13:40     ` Andi Kleen
2004-09-05 14:27       ` Anton Blanchard
2004-09-04 13:37   ` Andi Kleen
     [not found]     ` <20040904171417.67649169.pj@sgi.com>
2004-09-05  0:18       ` Linus Torvalds
2004-09-05  1:05         ` Paul Jackson [this message]
2004-09-05  1:38           ` Linus Torvalds
2004-09-05  3:48             ` Paul Jackson
2004-09-05  3:57               ` Linus Torvalds
2004-09-05  4:17                 ` Paul Jackson
2004-09-05  4:52                   ` Paul Jackson
2004-09-06 18:23                     ` Andi Kleen
2004-09-06 18:48                       ` Linus Torvalds
2004-09-06 21:11                         ` Paul Jackson
2004-09-07  8:07                         ` Andi Kleen
2004-09-06 13:16         ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040904180548.2dcdd488.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox