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]
Date:	Tue, 10 Jan 2012 17:13:15 +0900
From:	Chanho Min <chanho0207@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...e.hu>, chanho.min@....com
Subject: Re: [PATCH] sched_rt: the task in irq context can be migrated during
 context switching

On Fri, Jan 6, 2012 at 6:45 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Thu, 2012-01-05 at 13:15 -0500, Steven Rostedt wrote:
>> On Thu, 2012-01-05 at 18:55 +0100, Peter Zijlstra wrote:
>>
>> > So the problem is quite real, as already said we don't need to worry
>> > about the future, but we might want to fix this in previous kernels.
>> > What I'm not entirely sure of is the proposed solution, Steven don't we
>> > get in trouble by simply bailing out on the push?
>>
>> It shouldn't break anything. We shouldn't be pushing tasks that are
>> running on a rq anyway.
>
> Its not running, but its in the middle of getting scheduled out.
>
>> I don't see any harm here. As this scenario can
>> only happen if we get an interrupt after letting go of the rq lock and
>> before doing the switch_to(). The schedule_tail() calls
>> post_schedule_rt() which does the push again, and will push task A at
>> that time.
>
> Right, so the post_schedule() hook will try again.
>
>> That said, I'm not sure this patch is enough. I'm worried about a pull
>> happening. As task A is running, we could possible possibly pick it on
>> another CPU to do a pull.
>>
>> Hmm, looking at the code, the pull already does a task_running() test,
>> so I guess we should be fine.
>
> Yeah, I'm not sure all those task_running() things make sense though,
> when !->on_rq && ->on_cpu we should busy wait for tasks, not skip them.
>
> Then again, with this WANT_INTERRUPTS_ON_CTXSW the busy wait crap is
> tricky. Luckily its going the way of the Dodo very soon.

So Will this be applied?  It will be critical and very hard to debug.
( pretty rare, sometimes system hang without any message )
It has been well tested on our ARM platform.

Thanks
Chanho
--
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