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:   Fri, 24 Aug 2018 15:10:08 +0200
From:   Christian König <ckoenig.leichtzumerken@...il.com>
To:     Michal Hocko <mhocko@...nel.org>,
        Christian König <christian.koenig@....com>
Cc:     kvm@...r.kernel.org,
        Radim Krčmář <rkrcmar@...hat.com>,
        Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Sudeep Dutt <sudeep.dutt@...el.com>,
        dri-devel@...ts.freedesktop.org, linux-mm@...ck.org,
        Andrea Arcangeli <aarcange@...hat.com>,
        "David (ChunMing) Zhou" <David1.Zhou@....com>,
        Dimitri Sivanich <sivanich@....com>,
        Jason Gunthorpe <jgg@...pe.ca>, linux-rdma@...r.kernel.org,
        amd-gfx@...ts.freedesktop.org, David Airlie <airlied@...ux.ie>,
        Doug Ledford <dledford@...hat.com>,
        David Rientjes <rientjes@...gle.com>,
        xen-devel@...ts.xenproject.org, intel-gfx@...ts.freedesktop.org,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Leon Romanovsky <leonro@...lanox.com>,
        Jérôme Glisse <jglisse@...hat.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>,
        Mike Marciniszyn <mike.marciniszyn@...el.com>,
        Dennis Dalessandro <dennis.dalessandro@...el.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Ashutosh Dixit <ashutosh.dixit@...el.com>,
        Alex Deucher <alexander.deucher@....com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Felix Kuehling <felix.kuehling@....com>
Subject: Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

Am 24.08.2018 um 15:01 schrieb Michal Hocko:
> On Fri 24-08-18 14:52:26, Christian König wrote:
>> Am 24.08.2018 um 14:33 schrieb Michal Hocko:
> [...]
>>> Thiking about it some more, I can imagine that a notifier callback which
>>> performs an allocation might trigger a memory reclaim and that in turn
>>> might trigger a notifier to be invoked and recurse. But notifier
>>> shouldn't really allocate memory. They are called from deep MM code
>>> paths and this would be extremely deadlock prone. Maybe Jerome can come
>>> up some more realistic scenario. If not then I would propose to simplify
>>> the locking here. We have lockdep to catch self deadlocks and it is
>>> always better to handle a specific issue rather than having a code
>>> without a clear indication how it can recurse.
>> Well I agree that we should probably fix that, but I have some concerns to
>> remove the existing workaround.
>>
>> See we added that to get rid of a real problem in a customer environment and
>> I don't want to that to show up again.
> It would really help to know more about that case and fix it properly
> rather than workaround it like this. Anyway, let me think how to handle
> the non-blocking notifier invocation then. I was not able to come up
> with anything remotely sane yet.

With avoiding allocating memory in the write lock path I don't see an 
issue any more with that.

All what the write lock path does now is adding items to a linked lists, 
arrays etc....

So there is no more blocking involved here and the read lock side should 
be able to grab the lock immediately.

Christian.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ