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: <20180326081512.GB5652@dhcp22.suse.cz>
Date:   Mon, 26 Mar 2018 10:15:12 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     Christian König <christian.koenig@....com>
Cc:     jglisse@...hat.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, David Rientjes <rientjes@...gle.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Joerg Roedel <joro@...tes.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Leon Romanovsky <leonro@...lanox.com>,
        Artemy Kovalyov <artemyko@...lanox.com>,
        Evgeny Baskakov <ebaskakov@...dia.com>,
        Ralph Campbell <rcampbell@...dia.com>,
        Mark Hairgrove <mhairgrove@...dia.com>,
        John Hubbard <jhubbard@...dia.com>,
        Mike Marciniszyn <mike.marciniszyn@...el.com>,
        Dennis Dalessandro <dennis.dalessandro@...el.com>,
        Alex Deucher <alexander.deucher@....com>,
        Sudeep Dutt <sudeep.dutt@...el.com>,
        Ashutosh Dixit <ashutosh.dixit@...el.com>,
        Dimitri Sivanich <sivanich@....com>
Subject: Re: [RFC PATCH 0/3] mmu_notifier contextual information

On Fri 23-03-18 19:34:04, Christian König wrote:
> Am 23.03.2018 um 18:17 schrieb jglisse@...hat.com:
> > From: Jérôme Glisse <jglisse@...hat.com>
> > 
> > This patchset are the improvements to mmu_notifier i wish to discuss
> > at next LSF/MM. I am sending now to give time to people to look at
> > them and think about them.
> > 
> > git://people.freedesktop.org/~glisse/linux mmu-notifier-rfc
> > https://cgit.freedesktop.org/~glisse/linux/log/?h=mmu-notifier-rfc
> > 
> > First patch just use a struct for invalidate_range_start/end arguments
> > this make the other 2 patches easier and smaller.
> > 
> > The idea is to provide more information to mmu_notifier listener on
> > the context of each invalidation. When a range is invalidated this
> > can be for various reasons (munmap, protection change, OOM, ...). If
> > listener can distinguish between those it can take better action.
> > 
> > For instance if device driver allocate structure to track a range of
> > virtual address prior to this patch it always have to assume that it
> > has to free those on each mmu_notifieir callback (having to assume it
> > is a munmap) and reallocate those latter when the device try to do
> > something with that range again.
> > 
> > OOM is also an interesting case, recently a patchset was added to
> > avoid OOM on a mm if a blocking mmu_notifier listener have been
> > registered [1]. This can be improve by adding a new OOM event type and
> > having listener take special path on those. All mmu_notifier i know
> > can easily have a special path for OOM that do not block (beside
> > taking a short lived, across driver, spinlock). If mmu_notifier usage
> > grows (from a point of view of more process using devices that rely on
> > them) then we should also make sure OOM can do its bidding.
> 
> +1 for better handling that.
> 
> The fact that the OOM killer now avoids processes which might sleep during
> their MM destruction gave me a few sleepless night recently.

I have tried to clarify this [1] but could you be more specific about
the issue you were seeing?

[1] http://lkml.kernel.org/r/20180326081356.GA5652@dhcp22.suse.cz
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ