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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d882dbe6-2a8a-4fe4-90e2-b170f6e4d519@lucifer.local>
Date: Mon, 23 Jun 2025 17:58:17 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: Vlastimil Babka <vbabka@...e.cz>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Liam R. Howlett" <Liam.Howlett@...cle.com>,
        David Hildenbrand <david@...hat.com>, Jann Horn <jannh@...gle.com>,
        Mike Rapoport <rppt@...nel.org>, Michal Hocko <mhocko@...e.com>,
        Colin Cross <ccross@...gle.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 2/2] mm, madvise: move prctl_set_vma() to mm/madvise.c

On Mon, Jun 23, 2025 at 09:47:49AM -0700, Suren Baghdasaryan wrote:
> > -static int prctl_set_vma(unsigned long opt, unsigned long addr,
> > -                        unsigned long size, unsigned long arg)
> > -{
> > -       struct mm_struct *mm = current->mm;
> > -       const char __user *uname;
> > -       struct anon_vma_name *anon_name = NULL;
> > -       int error;
> > -
> > -       switch (opt) {
> > -       case PR_SET_VMA_ANON_NAME:
> > -               uname = (const char __user *)arg;
>
> My issue with this refactoring is that prctl_set_vma() might grow some
> other opt which does not belong in madvise.c. Moving it into vma.c
> seems a bit more appropriate IMHO.

And this itself is an argument against the horror show that is prctl()...! :)

Anyway we'd have to find a way to abstract past this, since vma.c is
inaccessible to anything outside of mm.

This is part of the reason I so _hate_ prctl() - we do mm stuff there, in a
place that shouldn't...

I'll reply to patch directly as I have thoughts here though

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ