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]
Message-ID: <71834e10-098c-7d15-b9d4-36d33a57499c@google.com>
Date:   Sat, 10 Jun 2023 22:20:31 -0700 (PDT)
From:   David Rientjes <rientjes@...gle.com>
To:     Josh Triplett <josh@...htriplett.org>
cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Muchun Song <muchun.song@...ux.dev>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH] mm: hugetlb: Add Kconfig option to set default
 nr_overcommit_hugepages

On Fri, 9 Jun 2023, Josh Triplett wrote:

> The default kernel configuration does not allow any huge page allocation
> until after setting nr_hugepages or nr_overcommit_hugepages to a
> non-zero value; without setting those, mmap attempts with MAP_HUGETLB
> will always fail with -ENOMEM. nr_overcommit_hugepages allows userspace
> to attempt to allocate huge pages at runtime, succeeding if the kernel
> can find or assemble a free huge page.
> 
> Provide a Kconfig option to make nr_overcommit_hugepages default to
> unlimited, which permits userspace to always attempt huge page
> allocation on a best-effort basis. This makes it easier and more
> worthwhile for random applications and libraries to opportunistically
> attempt MAP_HUGETLB allocations without special configuration.
> 
> In particular, current versions of liburing with IORING_SETUP_NO_MMAP
> attempt to allocate the rings in a huge page. This seems likely to lead
> to more applications and libraries attempting to use huge pages.
> 
> Signed-off-by: Josh Triplett <josh@...htriplett.org>

Why not do this in an initscript?

Or, if absolutely necessary, a kernel command line parameter?

A Kconfig option to set a default value to be ULONG_MAX seems strange if 
you can just write the value to procfs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ