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: <20180523130547.GF26965@arm.com>
Date:   Wed, 23 May 2018 14:05:48 +0100
From:   Will Deacon <will.deacon@....com>
To:     Sodagudi Prasad <psodagud@...eaurora.org>
Cc:     keescook@...omium.org, luto@...capital.net, wad@...omium.org,
        akpm@...ux-foundation.org, riel@...hat.com, tglx@...utronix.de,
        mingo@...nel.org, peterz@...radead.org, ebiggers@...gle.com,
        fweisbec@...il.com, sherryy@...roid.com, vegard.nossum@...cle.com,
        cl@...ux.com, aarcange@...hat.com, alexander.levin@...izon.com,
        linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org
Subject: Re: write_lock_irq(&tasklist_lock)

Hi Prasad,

On Tue, May 22, 2018 at 12:40:05PM -0700, Sodagudi Prasad wrote:
> When following test is executed on 4.14.41 stable kernel, observed that one
> of the core is waiting for tasklist_lock for long time with IRQs disabled.
> ./stress-ng-64 --get 8 -t 3h --times --metrics-brief
> 
> Every time when device is crashed, I observed that one the task stuck at
> fork system call and waiting for tasklist_lock as writer with irq disabled.
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/kernel/fork.c?h=linux-4.14.y#n1843

Please use a newer kernel. We've addressed this in mainline by moving
arm64 over to the qrwlock implementation which (after some other changes)
guarantees forward progress for well-behaved readers and writers.

To give an example from locktorture with 2 writers and 8 readers, after
a few seconds I see:

rwlock:
	Writes:	Total: 6725	Max/Min: 0/0	Fail: 0
	Reads:	Total: 5103727	Max/Min: 0/0	Fail: 0

qrwlock:
	Writes:	Total: 155284	Max/Min: 0/0	Fail: 0
	Reads:	Total: 767703	Max/Min: 0/0	Fail: 0

so the ratio is closer to ~6:1 rather than ~191:1 for this case. The
total locking throughput has dropped, but that's expected for this type
of lock where maximum throughput would be achieved by favouring readers.

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ