From: Andi Kleen <ak@muc.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Paul Jackson <pj@sgi.com>, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix argument checking in sched_setaffinity
Date: 6 Sep 2004 15:16:18 +0200
Date: Mon, 6 Sep 2004 15:16:18 +0200 [thread overview]
Message-ID: <20040906131618.GB46770@muc.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0409041717230.4735@ppc970.osdl.org>
On Sat, Sep 04, 2004 at 05:18:30PM -0700, Linus Torvalds wrote:
>
>
> On Sat, 4 Sep 2004, Paul Jackson wrote:
> >
> > How is what Linus left more broken?
>
> 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. But if it can't be
I don't think writing a syscall loop is a good idea for this.
The main reason is that when you get an EINVAL for some other
reason you will still blow up your memory until you
hit some arbitary upper size.
Currently this EINVAL is the only instance in this syscall,
but this may change in some future version.
A sysctl may have worked, but it results in a lot of code
bloat in the application to handle it.
> bothered, then Andi's code certainly just made things worse.
I disagree on that. It was not perfect, but with minor fixes
could have been a proper solution. Your current code is even worse than
what was there before my patch.
Alternative would be the sysctl and strict check again. I don't
like it too much because it makes the application more complicated
(i prefer simple interfaces, because complex interfaces tend to
have more bugs)
-Andi
prev parent reply other threads:[~2004-09-06 13:16 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
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 [this message]
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=20040906131618.GB46770@muc.de \
--to=ak@muc.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.com \
--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