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] [day] [month] [year] [list]
Message-ID: <CAKocOOOyt0Pg7tyPEFQ6XFiK0LCQcvrauoCkdu68SixgL0Z4fQ@mail.gmail.com>
Date:	Fri, 22 Feb 2013 09:06:35 -0700
From:	Shuah Khan <shuahkhan@...il.com>
To:	Raghavendra KT <raghavendra.kt.linux@...il.com>
Cc:	Marcelo Tosatti <mtosatti@...hat.com>, dan.carpenter@...cle.com,
	Ingo Molnar <mingo@...nel.org>, peterz@...radead.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	torvalds@...ux-foundation.org
Subject: Re: sched: Fix signedness bug in yield_to()

On Thu, Feb 21, 2013 at 11:42 PM, Raghavendra KT
<raghavendra.kt.linux@...il.com> wrote:
> On Fri, Feb 22, 2013 at 4:56 AM, Marcelo Tosatti <mtosatti@...hat.com> wrote:
>> On Thu, Feb 21, 2013 at 09:56:54AM +0100, Ingo Molnar wrote:
>>>
>>> * Shuah Khan <shuahkhan@...il.com> wrote:
>>>
>>> > On Tue, Feb 19, 2013 at 7:27 PM, Linux Kernel Mailing List
>>> > <linux-kernel@...r.kernel.org> wrote:
>>> > > Gitweb:     http://git.kernel.org/linus/;a=commit;h=c3c186403c6abd32e719f005f0af950155a9e54d
>>> > > Commit:     c3c186403c6abd32e719f005f0af950155a9e54d
>>> > > Parent:     e0a79f529d5ba2507486d498b25da40911d95cf6
>>> > > Author:     Dan Carpenter <dan.carpenter@...cle.com>
>>> > > AuthorDate: Tue Feb 5 14:37:51 2013 +0300
>>> > > Committer:  Ingo Molnar <mingo@...nel.org>
>>> > > CommitDate: Tue Feb 5 12:59:29 2013 +0100
>>> > >
>>> > >     sched: Fix signedness bug in yield_to()
>>> > >
>>> > >     In 7b270f6099 "sched: Bail out of yield_to when source and
>>> > >     target runqueue has one task" we changed this to store -ESRCH so
>>> > >     it needs to be signed.
>>> >
>>> > Dan, Ingo,
>>> >
>>> > I can't find the 7b270f6099 "sched: Bail out of yield_to when
>>> > source and target runqueue has one task" in the latest Linus's
>>> > git. Am I missing something.
>>> >
>>> > The current kenel/sched/core.c doesn't have the code from the
>>> > associated patch https://patchwork.kernel.org/patch/2016651/
>>>
>>> As per the lkml discussion that one was supposed to go upstream
>>> via the KVM tree. Marcelo?
>>
>> commit c3c186403c6abd32e719f005f0af950155a9e54d
>> Author: Dan Carpenter <dan.carpenter@...cle.com>
>> Date:   Tue Feb 5 14:37:51 2013 +0300
>>
>>     sched: Fix signedness bug in yield_to()
>>
>>     In 7b270f6099 "sched: Bail out of yield_to when source and
>>     target runqueue has one task" we changed this to store -ESRCH so
>>     it needs to be signed.
>>
>>     Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>>     Cc: Peter Zijlstra <peterz@...radead.org>
>>     Cc: kbuild@...org
>>     Cc: Steven Rostedt <rostedt@...dmis.org>
>>     Cc: Mike Galbraith <efault@....de>
>>     Link: http://lkml.kernel.org/r/20130205113751.GA20521@elgon.mountain
>>     Signed-off-by: Ingo Molnar <mingo@...nel.org>
>>
>
> IIUC, we are only changing variable in yield_to  from bool to int.
> I am curious whether we need changes in struct  sched_class (sched.h)
>
>  bool (*yield_to_task) (struct rq *rq, struct task_struct *p, bool preempt);
> ==>
> int (*yield_to_task) (struct rq *rq, struct task_struct *p, bool preempt);
>
> otherwise we would assign bool value  to int here
>
>  yielded = curr->sched_class->yield_to_task(rq, p, preempt);
>
> this return values also cascaded to kvm_main.c.
>
> If we need to patchup entire thing, I can cook a correction patch.
>
> Thanks and Regards
> Raghu

Right/. I was attempting to back-port
c3c186403c6abd32e719f005f0af950155a9e54d to stables when I noticed the
discrepancy. My concerns are:

1. Does it make sense to have c3c186403c6abd32e719f005f0af950155a9e54d
in without 7b270f6099 "sched: Bail out of yield_to when source and
target runqueue has one task" and?
2. Second concern is, is c3c186403c6abd32e719f005f0af950155a9e54d is
enough or more changes are needed? does __yield_to prototype needs
changes as well.

-- Shuah

-- Shuah
--
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