linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Axel Rasmussen <axelrasmussen@google.com>
Cc: Matthew Wilcox <willy@infradead.org>,
	Mike Rapoport <rppt@kernel.org>, Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH] mm/secretmem: fix panic when growing a memfd_secret
Date: Thu, 7 Apr 2022 13:50:53 -0700	[thread overview]
Message-ID: <20220407135053.6652bdad545fe98fc9babfbc@linux-foundation.org> (raw)
In-Reply-To: <CAJHvVchqPygpw9DGYuab+2ymFtF41E7RUyUUOiRHh1wicRgqCA@mail.gmail.com>

On Thu, 31 Mar 2022 10:42:12 -0700 Axel Rasmussen <axelrasmussen@google.com> wrote:

> Any strong opinions on which error code is used? I think overall I
> would still pick EOPNOTSUPP, but happy to change it if anyone feels
> strongly.
> 
> - I think ENOSYS is specific to syscall nr not defined
> - I think ENOTTY is specific to ioctls
> - The kernel (sort of mistakenly) defines ENOTSUPP instead of ENOTSUP,
> but it's marked deprecated and it's recommended to use EOPNOTSUPP
> instead (despite POSIX saying these should be distinct and for
> different uses).

`man ftruncate' sayeth

       EINVAL The argument length is negative or larger than the maximum  file
              size.

which reasonably accurately describes what we're doing here?

+	if ((ia_valid & ATTR_SIZE) && inode->i_size)
+		return -EOPNOTSUPP;




  reply	other threads:[~2022-04-07 20:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 21:09 Axel Rasmussen
2022-03-24 21:32 ` Matthew Wilcox
2022-03-24 21:44   ` Axel Rasmussen
2022-03-31 17:42     ` Axel Rasmussen
2022-04-07 20:50       ` Andrew Morton [this message]
2022-04-11 17:29         ` Axel Rasmussen

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=20220407135053.6652bdad545fe98fc9babfbc@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=willy@infradead.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