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]
Message-Id: <20220407135053.6652bdad545fe98fc9babfbc@linux-foundation.org>
Date:   Thu, 7 Apr 2022 13:50:53 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Axel Rasmussen <axelrasmussen@...gle.com>
Cc:     Matthew Wilcox <willy@...radead.org>,
        Mike Rapoport <rppt@...nel.org>, Linux MM <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>, stable@...r.kernel.org
Subject: Re: [PATCH] mm/secretmem: fix panic when growing a memfd_secret

On Thu, 31 Mar 2022 10:42:12 -0700 Axel Rasmussen <axelrasmussen@...gle.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;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ