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]
Date:   Fri, 14 Apr 2023 17:24:20 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Michal Hocko <mhocko@...e.com>
Cc:     Ackerley Tng <ackerleytng@...gle.com>, kvm@...r.kernel.org,
        linux-api@...r.kernel.org, linux-arch@...r.kernel.org,
        linux-doc@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        qemu-devel@...gnu.org, aarcange@...hat.com, ak@...ux.intel.com,
        akpm@...ux-foundation.org, arnd@...db.de, bfields@...ldses.org,
        bp@...en8.de, chao.p.peng@...ux.intel.com, corbet@....net,
        dave.hansen@...el.com, david@...hat.com, ddutile@...hat.com,
        dhildenb@...hat.com, hpa@...or.com, hughd@...gle.com,
        jlayton@...nel.org, jmattson@...gle.com, joro@...tes.org,
        jun.nakajima@...el.com, kirill.shutemov@...ux.intel.com,
        linmiaohe@...wei.com, luto@...nel.org, mail@...iej.szmigiero.name,
        michael.roth@....com, mingo@...hat.com, naoya.horiguchi@....com,
        pbonzini@...hat.com, qperret@...gle.com, rppt@...nel.org,
        shuah@...nel.org, steven.price@....com, tabba@...gle.com,
        tglx@...utronix.de, vannapurve@...gle.com, vbabka@...e.cz,
        vkuznets@...hat.com, wanpengli@...cent.com, wei.w.wang@...el.com,
        x86@...nel.org, yu.c.zhang@...ux.intel.com, muchun.song@...ux.dev,
        feng.tang@...el.com, brgerst@...il.com, rdunlap@...radead.org,
        masahiroy@...nel.org, mailhol.vincent@...adoo.fr
Subject: Re: [RFC PATCH 0/6] Setting memory policy for restrictedmem file

On Fri, Apr 14, 2023, Michal Hocko wrote:
> On Fri 14-04-23 00:11:49, Ackerley Tng wrote:
> > 3. A more generic fbind(): it seems like this new functionality is
> >    really only needed for restrictedmem files, hence a separate,
> >    specific syscall was proposed to avoid complexities with handling
> >    conflicting policies that may be specified via other syscalls like
> >    mbind()
> 
> I do not think it is a good idea to make the syscall restrict mem
> specific.

+1.  IMO, any uAPI that isn't directly related to the fundamental properties of
restricted memory, i.e. isn't truly unique to restrictedmem, should be added as
generic fd-based uAPI.

> History shows that users are much more creative when it comes
> to usecases than us. I do understand that the nature of restricted
> memory is that it is not mapable but memory policies without a mapping
> are a reasonable concept in genereal. After all this just tells where
> the memory should be allocated from. Do we need to implement that for
> any other fs? No, you can safely return EINVAL for anything but
> memfd_restricted fd for now but you shouldn't limit usecases upfront.

I would even go a step further and say that we should seriously reconsider the
design/implemenation of memfd_restricted() if a generic fbind() needs explicit
handling from the restricted memory code.  One of the goals with memfd_restricted()
is to rely on the underlying backing store to handle all of the "normal" behaviors.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ