From: Snaipe <me@snai.pe>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [RFC PATCH 1/1] fs,ns: allow copying of shm_mnt mount trees
Date: Fri, 30 Jan 2026 15:17:56 +0100 [thread overview]
Message-ID: <CACyTCKj_=U-upyY+p_8ns9EpDp0utNJjN-ozCV8=m6tEoOPeoA@mail.gmail.com> (raw)
In-Reply-To: <60f683fa-bd25-4656-ae53-fc247962bac7@wdc.com>
On Fri, Jan 30, 2026 at 9:39 AM Johannes Thumshirn
<Johannes.Thumshirn@wdc.com> wrote:
>
> On 1/29/26 6:39 PM, Snaipe wrote:
> > diff --git a/fs/namespace.c b/fs/namespace.c
> > index d82910f33dc4..f51ad2013662 100644
> > --- a/fs/namespace.c
> > +++ b/fs/namespace.c
> > @@ -38,6 +38,9 @@
> > #include "pnode.h"
> > #include "internal.h"
> >
> > +/* For checking memfd bind-mounts via shm_mnt */
> > +#include "../mm/internal.h"
> > +
>
> Hi,
>
> I don't want to comment on the rest of the change as I don't know enough
> of the subject but this screams layering violation to me.
Yes -- which is why I was a bit uncomfortable to do this. I tried a
couple of other approaches before this which did not involve including
mm/internal.h and poking at shm_mnt, but they ended up not working.
The only reason I ended up settling on this is that there is precedent
in including mm/internal.h in other parts of the kernel (fs/exec.c
being one example). This may be a bad justification, but if there's a
better way to do what I'm trying to do here I'm gladly taking it.
--
Franklin "Snaipe" Mathieu
🝰 https://snai.pe
next prev parent reply other threads:[~2026-01-30 14:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 17:35 [RFC PATCH 0/1] Bind-mounting memfds Snaipe
2026-01-29 17:35 ` [RFC PATCH 1/1] fs,ns: allow copying of shm_mnt mount trees Snaipe
2026-01-30 8:38 ` Johannes Thumshirn
2026-01-30 14:17 ` Snaipe [this message]
2026-02-04 16:51 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACyTCKj_=U-upyY+p_8ns9EpDp0utNJjN-ozCV8=m6tEoOPeoA@mail.gmail.com' \
--to=me@snai.pe \
--cc=Johannes.Thumshirn@wdc.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox