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:	Thu, 15 Mar 2012 13:28:03 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Al Viro <viro@...IV.linux.org.uk>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...l.org>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Nick Piggin <npiggin@...nel.dk>
Subject: Re: [patch 0/5] seqlock consolidation

On Thu, 15 Mar 2012, Al Viro wrote:

> On Thu, Mar 15, 2012 at 11:44:22AM -0000, Thomas Gleixner wrote:
> 
> > Aside of that replacing open coded constructs with proper functions is
> > a worthwhile cleanup by itself.
> 
> Provided that those are proper primitives to start with...  I don't like
> it - most of ->d_lock uses are _not_ related to ->d_seq, to start with
> and then we get an interesting mix of functions that do and do not assume
> the lock already taken, etc.
> 
> Could you describe RT patch problems in more details?  I really don't like
> this solution - interface is overcomplicated and doesn't fit well...

On RT the spinlock sections (except the raw_spinlock) ones are
becoming preemtible as we replace the spinlocks by "sleeping
spinlock", a PI aware rtmutex.

So now assume the following:

 spin_lock(d->d_lock);
 ....
 d->d_seq++;

 -> Preemption
    read_seqcount_begin()

     repeat:
        ret = ACCESS_ONCE(sl->sequence);
        if (unlikely(ret & 1)) {
                cpu_relax();
                goto repeat;
        }
        smp_rmb();

Now when the preempting task has higher prioriy, the thing loops
forever. Fail ....

The only way out is to lock d->d_lock which is contended, so the
reader side boosts the writer and waits for the lock to be
released. Though with the open coded seqlock we have no idea which
lock we need to take.

Any better ideas ?

Thanks,

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