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] [day] [month] [year] [list]
Message-ID: <20111026150344.GA25000@elte.hu>
Date:	Wed, 26 Oct 2011 17:03:44 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [GIT PULL] core/locking changes for v3.2


* Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> On Wed, Oct 26, 2011 at 3:25 PM, Ingo Molnar <mingo@...e.hu> wrote:
> >
> > Note, you will get a conflict in kernel/posix-cpu-timers.c, which i
> > resolved in -tip the following way:
> >
> >        raw_spin_lock_irqsave(&cputimer->lock, flags);
> >        if (!cputimer->running) {
> >                cputimer->running = 1;
> >                /*
> >                 * The POSIX timer interface allows for absolute time expiry
> >                 * values through the TIMER_ABSTIME flag, therefore we have
> >                 * to synchronize the timer to the clock every time we start
> >                 * it.
> >                 */
> >                thread_group_cputime(tsk, &sum);
> >                update_gt_cputime(&cputimer->cputime, &sum);
> >        }
> >        *times = cputimer->cputime;
> >        raw_spin_unlock_irqrestore(&cputimer->lock, flags);
> 
> That seems like a completely bogus resolution. You are 
> re-introducing the incorrect ABBA nesting of cputimer->lock and 
> rq->lock, and basically undoing commit bcd5cff7216f.

oh, i quoted the resolution from the pre-ABBA-fix tree :-/

The one in tip:master is:

void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times)
{
	struct thread_group_cputimer *cputimer = &tsk->signal->cputimer;
	struct task_cputime sum;
	unsigned long flags;

	if (!cputimer->running) {
		/*
		 * The POSIX timer interface allows for absolute time expiry
		 * values through the TIMER_ABSTIME flag, therefore we have
		 * to synchronize the timer to the clock every time we start
		 * it.
		 */
		thread_group_cputime(tsk, &sum);
		raw_spin_lock_irqsave(&cputimer->lock, flags);
		cputimer->running = 1;
		update_gt_cputime(&cputimer->cputime, &sum);
	} else
		raw_spin_lock_irqsave(&cputimer->lock, flags);
	*times = cputimer->cputime;
	raw_spin_unlock_irqrestore(&cputimer->lock, flags);
}

Good thing you double checked it.

Thanks,

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