lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090605145541.GB19690@tango.0pointer.de>
Date:	Fri, 5 Jun 2009 16:55:41 +0200
From:	Lennart Poettering <mzxreary@...inter.de>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	linux-kernel@...r.kernel.org, peterz@...radead.org
Subject: Re: [PATCH] scheduler: introduce SCHED_RESET_ON_FORK scheduling
	policy flag, Second try

On Fri, 05.06.09 13:54, Ingo Molnar (mingo@...e.hu) wrote:

> 
> 
> * Lennart Poettering <mzxreary@...inter.de> wrote:
> 
> > Why expose this via sched_setscheduler() and not other syscalls 
> > such as prctl() or sched_setparam()?
> > 
> > prctl() does not take a pid parameter. Due to that it would be 
> > impossible to modify this flag for other processes than the 
> > current one.
> > 
> > The struct passed to sched_setparam() can unfortunately not be 
> > extended without breaking compatibility, since sched_setparam() 
> > lacks a size parameter.
> 
> Well, it could be extended, if we wanted to. Right now 
> sched_priority has a valid value of 0 to 100. We could introduce a 
> new value '-1' to mean: 'extended struct sched_param'.
> 
> A new getparam syscall could then be introduced - only used by new 
> user-space.

The man page of sched_getparam() is pretty explicit in that the
sched_priority field of the struct must lie between
sched_get_priority_min() and sched_get_priority_max(). If you'd
overload sched_priority like this you might end up breaking applications
that rely on this, for example RT watchdogs that go through /proc and
query the scheduling parameters of all threads.

Any further comments on the patch? Could this be merged? Any changes
necessary?

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ