[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1263378784.3853.67.camel@Palantir>
Date: Wed, 13 Jan 2010 11:33:04 +0100
From: Raistlin <raistlin@...ux.it>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
michael trimarchi <michael@...dence.eu.com>,
Fabio Checconi <fabio@...dalf.sssup.it>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Dhaval Giani <dhaval.giani@...il.com>,
Johan Eker <johan.eker@...csson.com>,
"p.faure" <p.faure@...tech.ch>,
Chris Friesen <cfriesen@...tel.com>,
Steven Rostedt <rostedt@...dmis.org>,
Henrik Austad <henrik@...tad.us>,
Frederic Weisbecker <fweisbec@...il.com>,
Darren Hart <darren@...art.com>,
Sven-Thorsten Dietrich <sven@...bigcorporation.com>,
Bjoern Brandenburg <bbb@...unc.edu>,
Tommaso Cucinotta <tommaso.cucinotta@...up.it>,
"giuseppe.lipari" <giuseppe.lipari@...up.it>,
Juri Lelli <juri.lelli@...il.com>
Subject: Re: [RFC 12/12][PATCH] SCHED_DEADLINE: modified sched_*_ex API
On Tue, 2009-12-29 at 13:15 +0100, Peter Zijlstra wrote:
> > if (!param_ex || pid < 0)
> > return -EINVAL;
> > + if (len < sizeof(struct sched_param_ex))
> > + return -EINVAL;
> >
> > read_lock(&tasklist_lock);
> > p = find_process_by_pid(pid);
> > @@ -6837,7 +6844,7 @@ SYSCALL_DEFINE2(sched_getparam_ex, pid_t, pid,
> > /*
> > * This one might sleep, we cannot do it with a spinlock held ...
> > */
> > - retval = copy_to_user(param_ex, &lp, sizeof(*param_ex)) ? -EFAULT : 0;
> > + retval = copy_to_user(param_ex, &lp, len) ? -EFAULT : 0;
> >
> > return retval;
> >
>
> I think this doesn't even do what it claims to do, namely provide a
> flexible ABI, since you fail the operation when there is not enough room
> provided. Hence, when we grow the struct an older program that was
> compiled against the smaller one will become an insta-fail.
>
> What this should do is deal with smaller structs by ensuring the tail is
> 0 and simply copying out the head.
>
Yep... As said in the previous mail I wanted to do so, and I'll do it
now that I see how odd was what I wrote! :-P
> New bits in the flags field are also an interesting challenge.
>
Right... I think that a (partial?) solution could be to properly choose
default values for newcomer flags, could that be right?
Thanks and regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
----------------------------------------------------------------------
Dario Faggioli, ReTiS Lab, Scuola Superiore Sant'Anna, Pisa (Italy)
http://blog.linux.it/raistlin / raistlin@...ga.net /
dario.faggioli@...ber.org
Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)
Powered by blists - more mailing lists