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:   Wed, 4 Aug 2021 08:21:12 +0200
From:   Michal Hocko <mhocko@...e.com>
To:     Suren Baghdasaryan <surenb@...gle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        David Rientjes <rientjes@...gle.com>,
        Matthew Wilcox <willy@...radead.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Roman Gushchin <guro@...com>, Rik van Riel <riel@...riel.com>,
        Minchan Kim <minchan@...nel.org>,
        Christian Brauner <christian@...uner.io>,
        Christoph Hellwig <hch@...radead.org>,
        Oleg Nesterov <oleg@...hat.com>,
        David Hildenbrand <david@...hat.com>,
        Jann Horn <jannh@...gle.com>,
        Shakeel Butt <shakeelb@...gle.com>,
        Andy Lutomirski <luto@...nel.org>,
        Christian Brauner <christian.brauner@...ntu.com>,
        Florian Weimer <fweimer@...hat.com>,
        Jan Engelhardt <jengelh@...i.de>,
        Tim Murray <timmurray@...gle.com>,
        Linux API <linux-api@...r.kernel.org>,
        linux-mm <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-team <kernel-team@...roid.com>
Subject: Re: [PATCH v4 1/2] mm: introduce process_mrelease system call

On Tue 03-08-21 15:09:43, Suren Baghdasaryan wrote:
> On Tue, Aug 3, 2021 at 10:27 AM Suren Baghdasaryan <surenb@...gle.com> wrote:
[...]
> > > > +     if (task_will_free_mem(task) && (task->flags & PF_KTHREAD) == 0) {
> > > > +             mm = task->mm;
> > > > +             mmget(mm);
> > > > +     }
> > > > +     task_unlock(task);
> > > > +     if (!mm) {
> > >
> > > Do we want to treat MMF_OOM_SKIP as a failure?
> >
> > Yeah, I don't think we want to create additional contention if
> > oom-killer is already working on this mm. Should we return EBUSY in
> > this case? Other possible options is ESRCH, indicating that this
> > process is a goner, so don't bother. WDYT?
> 
> After considering this some more I think ESRCH would be more
> appropriate. EBUSY might be understood as "I need to retry at a better
> time", which is not what we want here.

Why cannot we simply return 0 in that case. The work has been done
already by the kernel so why should we tell the caller that there was
something wrong?

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ