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, 13 Apr 2023 08:55:15 +0200
From:   Michal Hocko <mhocko@...e.com>
To:     Jaewon Kim <jaewon31.kim@...sung.com>
Cc:     "T.J. Mercier" <tjmercier@...gle.com>,
        "jstultz@...gle.com" <jstultz@...gle.com>,
        "sumit.semwal@...aro.org" <sumit.semwal@...aro.org>,
        "daniel.vetter@...ll.ch" <daniel.vetter@...ll.ch>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "hannes@...xchg.org" <hannes@...xchg.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "jaewon31.kim@...il.com" <jaewon31.kim@...il.com>
Subject: Re: [PATCH v3] dma-buf/heaps: system_heap: avoid too much allocation

On Thu 13-04-23 09:16:58, Jaewon Kim wrote:
> >On Wed, Apr 12, 2023 at 4:38?AM Jaewon Kim <jaewon31.kim@...sung.com> wrote:
> >
> >> Yes I think you're right. As a allocator, dma-buf system heap looks to be loose
> >> in memory allocation. Limiting dmabuf memory may be required. But I think there
> >> is no nice and reasonable way so far. And the dma-buf system heap is being
> >> widely used in Android mobile system. AFAIK the camera consumes huge memory
> >> through this dma-buf system heap. I actually even looked a huge size request
> >> over 2GB in one dma-buf request.
> >>
> >Hey can you point me to where you saw a request that big? That's a
> >non-buggy request?!
> 
> (let me resend as plain text)
> It was one of camera scenarios. I internally asked and heard that was not a bug
> but normal. I think 2GB looks too big for one graphics buffer but it could be
> for other purposes like camera. I think the system heap should support that.

Is that any of the upstream drivers or something sitting out of the
tree.

> Regarding __GFP_RETRY_MAYFAIL, we may need to say dma-buf system heap was
> designed to gather many pages up to a requested size. If mm returns NULL due to
> __GFP_RETRY_MAYFAIL, dma-buf system heap will release other already allocated
> pages, so that it may help to avoid oom.

This really depends on the other activity on the system. If you have a
more concurrent memory demand at the time then you might be just out of
the luck. Really, claiming huge portion of the memory shouldn't be done
nilly willy.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ