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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 16 Apr 2019 14:08:11 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     hpa@...or.com, mingo@...nel.org, linux-kernel@...r.kernel.org,
        torvalds@...ux-foundation.org, tglx@...utronix.de,
        john.ogness@...utronix.de, linux-tip-commits@...r.kernel.org
Subject: Re: [tip:sched/core] sched/core: Document that RT task priorities
 are 1...99

On 2019-04-16 13:22:35 [+0200], Peter Zijlstra wrote:
> On Tue, Apr 16, 2019 at 11:47:27AM +0200, Sebastian Andrzej Siewior wrote:
> > On 2019-04-16 11:36:34 [+0200], Peter Zijlstra wrote:
> > > On Tue, Apr 16, 2019 at 01:13:11AM -0700, tip-bot for Sebastian Andrzej Siewior wrote:
> > > > Commit-ID:  37a8f8590f307db8f8cfa62dfd82b3fc0978607c
> > > > Gitweb:     https://git.kernel.org/tip/37a8f8590f307db8f8cfa62dfd82b3fc0978607c
> > > > Author:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> > > > AuthorDate: Wed, 3 Apr 2019 23:08:21 +0200
> > > > Committer:  Ingo Molnar <mingo@...nel.org>
> > > > CommitDate: Tue, 16 Apr 2019 10:06:08 +0200
> > > > 
> > > > sched/core: Document that RT task priorities are 1...99
> > > > 
> > > > John identified three files which claim that RT task priorities start at
> > > > zero. As far as I understand, 0 is used for DL and has nothing to do
> > > > wihich RT priorities as identified by the RT policy.
> > > 
> > > DL is -1, 0 is still very much FIFO/FF
> > 
> > but it can't be set. The lowest we can set is 1. Is this a bug then?
> 
> What cannot be set?
|         {
|                 struct sched_param sp;
|                 int r;
| 
|                 sp.sched_priority = 0;
|                 r = sched_setscheduler_nocheck(current, SCHED_FIFO, &sp);
|                 pr_err("%s(%d): %d\n", __func__, __LINE__, r);
| 
|         }

-22 due to

4160 static int __sched_setscheduler(struct task_struct *p,
…
4191         /*
4192          * Valid priorities for SCHED_FIFO and SCHED_RR are
4193          * 1..MAX_USER_RT_PRIO-1, valid priority for SCHED_NORMAL,
4194          * SCHED_BATCH and SCHED_IDLE is 0.
4195          */
4196         if ((p->mm && attr->sched_priority > MAX_USER_RT_PRIO-1) ||
4197             (!p->mm && attr->sched_priority > MAX_RT_PRIO-1))
4198                 return -EINVAL;
4199         if ((dl_policy(policy) && !__checkparam_dl(attr)) ||
4200             (rt_policy(policy) != (attr->sched_priority != 0)))
4201                 return -EINVAL;
                               ↑

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ