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:   Tue, 28 Nov 2023 08:15:47 -0500
From:   Gregory Price <gregory.price@...verge.com>
To:     Michal Hocko <mhocko@...e.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Gregory Price <gourry.memverge@...il.com>, linux-mm@...ck.org,
        linux-doc@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-api@...r.kernel.org, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org, arnd@...db.de, tglx@...utronix.de,
        luto@...nel.org, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
        tj@...nel.org, ying.huang@...el.com
Subject: Re: [RFC PATCH 00/11] mm/mempolicy: Make task->mempolicy externally
 modifiable via syscall and procfs

On Tue, Nov 28, 2023 at 10:45:02AM +0100, Michal Hocko wrote:
> > 2) Should we combine all the existing operations into set_mempolicy2 and
> >    add an operation arg.
> > 
> >    set_mempolicy2(pidfd, arg_struct, len)
> > 
> >    struct {
> >      int pidfd; /* optional */
> >      int operation; /* describe which op_args to use */
> >      union {
> >        struct {
> >        } set_mempolicy;
> >        struct {
> >        } set_vma_home_node;
> >        struct {
> >        } mbind;
> >        ...
> >      } op_args;
> >    } args;
> > 
> >    capturing:
> >      sys_set_mempolicy
> >      sys_set_mempolicy_home_node
> >      sys_mbind
> > 
> >    or should we just make a separate interface for mbind/home_node to
> >    limit complexity of the single syscall?
> 
> My preference would be to go with specific syscalls. Multiplexing
> syscalls have turned much more complex and less flexible over time.
> Just have a look at futex.

got it, that simplifies things a bit.  I can pull my set/get mempolicy2
work forward and just keep the interfaces pretty much the same. Only
difference being an argument structure that is extensible and possibly
some additional refactoring in do_get_mempolicy to make things a bit
cleaner.

~Gregory

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ