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 Jul 2020 16:26:29 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     Muchun Song <songmuchun@...edance.com>
Cc:     mike.kravetz@...cle.com, Andrew Morton <akpm@...ux-foundation.org>,
        David Rientjes <rientjes@...gle.com>, mgorman@...e.de,
        walken@...gle.com,
        Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Jianchao Guo <guojianchao@...edance.com>
Subject: Re: [Phishing Risk] [External] Re: [PATCH v2] mm/hugetlb: add
 mempolicy check in the reservation routine

On Fri 24-07-20 21:56:29, Muchun Song wrote:
> On Fri, Jul 24, 2020 at 7:34 PM Michal Hocko <mhocko@...nel.org> wrote:
[...]
> > I believe you can simplify this and use a similar pattern as the page
> > allocator. Something like
> >
> >         for_each_node_mask(node, mpol_allowed) {
> >                 if (node_isset(node, &cpuset_current_mems_allowed))
> >                         nr += array[node];
> >         }
> >
> > There shouldn't be any need to allocate a potentially large nodemask on
> > the stack.
> 
> An unsigned long can satisfy 64 nodes. So I think that nodemask is using
> little stack memory. Right?

CONFIG_NODES_SHIFT=10

is not something surprising. E.g. SLES is using that default for a long
time because those kernels tend to run on very large machines.

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ