linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: "Michał Cłapiński" <mclapinski@google.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>,
	Muchun Song <muchun.song@linux.dev>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>, Shuah Khan <shuah@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>, Yi Liu <yi.l.liu@intel.com>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Steve French <stfrench@microsoft.com>,
	Simon Ser <contact@emersion.fr>, Jason Gunthorpe <jgg@ziepe.ca>,
	Marc Dionne <marc.dionne@auristor.com>,
	Jiri Slaby <jirislaby@kernel.org>,
	David Howells <dhowells@redhat.com>,
	Luca Vizzarro <Luca.Vizzarro@arm.com>,
	Jeff Xu <jeffxu@google.com>, Aleksa Sarai <cyphar@cyphar.com>,
	Kees Cook <keescook@chromium.org>,
	Daniel Verkamp <dverkamp@chromium.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 0/2] mm/memfd: add ioctl(MEMFD_CHECK_IF_ORIGINAL)
Date: Fri, 08 Sep 2023 16:07:00 -0600	[thread overview]
Message-ID: <87h6o4z5dn.fsf@meer.lwn.net> (raw)
In-Reply-To: <CAAi7L5f1f3gHGr_8cCv2jW2Q5pjL9bpDD_4zrpXjXkoRmu95fg@mail.gmail.com>

Michał Cłapiński <mclapinski@google.com> writes:

> On Fri, Sep 8, 2023 at 10:34 PM Jonathan Corbet <corbet@lwn.net> wrote:
>> Given that the two file descriptors are otherwise indistinguishable,
>> might a better fix be to make them indistinguishable in this regard as
>> well?  Is there a good reason why the second fd doesn't become
>> exec()able in this scenario and, if not, perhaps that behavior could be
>> changed instead?
>
> It probably could be changed, yes. But I'm worried that would be
> broadening the bug that is the exec()ability of memfds. AFAIK no other
> fd that is opened as writable can be exec()ed. If maintainers would
> prefer this, I could do this.

I'm not convinced that perpetuating the behavior and adding an ioctl()
workaround would be better than that; it seems to me that consistency
would be better.  But I don't have any real say in that matter, of
course; I'm curious what others think.

Thanks,

jon


      reply	other threads:[~2023-09-08 22:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 17:57 Michal Clapinski
2023-09-08 17:57 ` [PATCH v2 1/2] " Michal Clapinski
2023-09-08 20:02   ` kernel test robot
2023-09-08 17:57 ` [PATCH v2 2/2] selftests: test ioctl(MEMFD_CHECK_IF_ORIGINAL) Michal Clapinski
2023-09-08 20:34 ` [PATCH v2 0/2] mm/memfd: add ioctl(MEMFD_CHECK_IF_ORIGINAL) Jonathan Corbet
2023-09-08 21:55   ` Michał Cłapiński
2023-09-08 22:07     ` Jonathan Corbet [this message]

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=87h6o4z5dn.fsf@meer.lwn.net \
    --to=corbet@lwn.net \
    --cc=Luca.Vizzarro@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=contact@emersion.fr \
    --cc=cyphar@cyphar.com \
    --cc=dhowells@redhat.com \
    --cc=dverkamp@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hughd@google.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jeffxu@google.com \
    --cc=jgg@ziepe.ca \
    --cc=jirislaby@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@dominikbrodowski.net \
    --cc=marc.dionne@auristor.com \
    --cc=mclapinski@google.com \
    --cc=mike.kravetz@oracle.com \
    --cc=muchun.song@linux.dev \
    --cc=shuah@kernel.org \
    --cc=stfrench@microsoft.com \
    --cc=yi.l.liu@intel.com \
    /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