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: <20150128155044.GJ23038@twins.programming.kicks-ass.net>
Date:	Wed, 28 Jan 2015 16:50:44 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Ingo Molnar <mingo@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 3/4] sched: Pull preemption disablement to __schedule()
 caller

On Wed, Jan 28, 2015 at 01:24:11AM +0100, Frederic Weisbecker wrote:
> +++ b/kernel/sched/core.c
> @@ -2760,7 +2760,6 @@ static void __sched __schedule(void)
>  	struct rq *rq;
>  	int cpu;
>  
> -	preempt_disable();

Implies barrier();

>  	cpu = smp_processor_id();
>  	rq = cpu_rq(cpu);
>  	rcu_note_context_switch();
> @@ -2822,8 +2821,6 @@ static void __sched __schedule(void)
>  		raw_spin_unlock_irq(&rq->lock);
>  
>  	post_schedule(rq);

implies barrier();

> -
> -	sched_preempt_enable_no_resched();
>  }
>  
>  static inline void sched_submit_work(struct task_struct *tsk)

> @@ -2883,9 +2882,9 @@ void __sched schedule_preempt_disabled(void)
>  static void preempt_schedule_common(void)
>  {
>  	do {
> -		preempt_count_add(PREEMPT_ACTIVE);
> +		preempt_count_add(PREEMPT_ACTIVE + PREEMPT_CHECK_OFFSET);

Does _NOT_ imply barrier();

>  		__schedule();
> -		preempt_count_sub(PREEMPT_ACTIVE);

idem.

> +		preempt_count_sub(PREEMPT_ACTIVE + PREEMPT_CHECK_OFFSET);
>  
>  		/*
>  		 * Check again in case we missed a preemption opportunity
--
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