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: <20210205132313.95ce9fd932ca96667fd5db83@linux-foundation.org>
Date:   Fri, 5 Feb 2021 13:23:13 -0800
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Seth Forshee <seth.forshee@...onical.com>
Cc:     Hugh Dickins <hughd@...gle.com>, Chris Down <chris@...isdown.name>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tmpfs: Don't use 64-bit inodes by defulat with 32-bit
 ino_t

On Fri, 5 Feb 2021 14:55:43 -0600 Seth Forshee <seth.forshee@...onical.com> wrote:

> On Fri, Feb 05, 2021 at 12:41:57PM -0800, Andrew Morton wrote:
> > On Fri,  5 Feb 2021 14:21:59 -0600 Seth Forshee <seth.forshee@...onical.com> wrote:
> > 
> > > Currently there seems to be an assumption in tmpfs that 64-bit
> > > architectures also have a 64-bit ino_t. This is not true; s390 at
> > > least has a 32-bit ino_t. With CONFIG_TMPFS_INODE64=y tmpfs
> > > mounts will get 64-bit inode numbers and display "inode64" in the
> > > mount options, but passing the "inode64" mount option will fail.
> > > This leads to the following behavior:
> > > 
> > >  # mkdir mnt
> > >  # mount -t tmpfs nodev mnt
> > >  # mount -o remount,rw mnt
> > >  mount: /home/ubuntu/mnt: mount point not mounted or bad option.
> > > 
> > > As mount sees "inode64" in the mount options and thus passes it
> > > in the options for the remount.
> > > 
> > > Ideally CONFIG_TMPFS_INODE64 would depend on sizeof(ino_t) < 8,
> > > but I don't think it's possible to test for this (potentially
> > > CONFIG_ARCH_HAS_64BIT_INO_T or similar could be added, but I'm
> > > not sure whether or not that is wanted). So fix this by simply
> > > refusing to honor the CONFIG_TMPFS_INODE64 setting when
> > > sizeof(ino_t) < 8.
> > 
> > How about changing s390 Kconfig so that CONFIG_TMPFS_INODE64 is not enabled?
> 
> I did do that for our config. I see the s390 defconfig has it enabled,
> so I will send a patch for that too. But the fact that it can be
> configured that way and that the code behaves badly still seems
> problematic.

I meant

--- a/fs/Kconfig~a
+++ a/fs/Kconfig
@@ -203,7 +203,7 @@ config TMPFS_XATTR
 
 config TMPFS_INODE64
 	bool "Use 64-bit ino_t by default in tmpfs"
-	depends on TMPFS && 64BIT
+	depends on TMPFS && 64BIT && !S390
 	default n
 	help
 	  tmpfs has historically used only inode numbers as wide as an unsigned
_


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ