tmpfs: Disallow CONFIG_TMPFS_INODE64 on s390
Subsystems (3)
PATCH 1/1 tmpfs: Disallow CONFIG_TMPFS_INODE64 on s390
This feature requires ino_t be 64-bits, which is true for every 64-bit architecture but s390, so prevent this option from being selected there.
--- fs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/Kconfig +1 -1
@@ -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
Signature · 1 line
2.29.2
Andrew Morton
maintainerQuoted 4 lines · On Fri, 5 Feb 2021 17:06:20 -0600 Seth Forshee <[email protected]>…
This feature requires
ino_tbe 64-bits, which is true for every 64-bit architecture but s390, so prevent this option from being selected there.
The previous patch nicely described the end-user impact of the bug. This is especially important when requesting a -stable backport.
Here's what I ended up with:
From: Seth Forshee <[email protected]>
Subject: tmpfs: disallow CONFIG_TMPFS_INODE64 on s390
Currently there is an assumption in tmpfs that 64-bit architectures also have a 64-bit ino_t. This is not true on s390 which 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.
So prevent CONFIG_TMPFS_INODE64 from being selected on s390.
---
fs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/Kconfig renamed from fs/Kconfig~tmpfs-disallow-config_tmpfs_inode64-on-s390 +1 -1
@@ -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
_
Chris Down
Acked-byQuoted 17 lines · Andrew Morton
Currently there is an assumption in tmpfs that 64-bit architectures also have a 64-bit
ino_t. This is not true on s390 which has a 32-bitino_t. WithCONFIG_TMPFS_INODE64=ytmpfs 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.
So prevent
CONFIG_TMPFS_INODE64from being selected on s390.
Quoted 11 lines
Fixes ea3271f7196c ("tmpfs: support 64-bit inums per-sb")Signed-off-by Seth Forshee <[email protected]>Cc Chris Down <[email protected]>Cc Hugh Dickins <[email protected]>Cc Amir Goldstein <[email protected]>Cc Heiko Carstens <[email protected]>Cc Vasily Gorbik <[email protected]>Cc Christian Borntraeger <[email protected]>Cc <[email protected]> [5.9+]Signed-off-by Andrew Morton <[email protected]>
Either of the two ways presented looks fine to me, no real preference. Thanks!
Quoted 18 lines
---
fs/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)fs/Kconfig renamed from fs/Kconfig~tmpfs-disallow-config_tmpfs_inode64-on-s390 +0
-0@@ -203,7 +203,7 @@ config TMPFS_XATTRconfig
TMPFS_INODE64
bool "Use 64-bitino_tby default in tmpfs"fs/Kconfig renamed from fs/Kconfig~tmpfs-disallow-config_tmpfs_inode64-on-s390 +1
-1- depends on TMPFS && 64BIT + depends on TMPFS && 64BIT && !S390default n
help
tmpfs has historically used only inode numbers as wide as an unsigned
_
Quoted 52 lines · Andrew Morton
Quoted 4 lines · On Fri, 5 Feb 2021 17:06:20 -0600 Seth Forshee <[email protected]>…
This feature requires
ino_tbe 64-bits, which is true for every 64-bit architecture but s390, so prevent this option from being selected there.The previous patch nicely described the end-user impact of the bug. This is especially important when requesting a -stable backport.
Here's what I ended up with:
From: Seth Forshee <[email protected]>
Subject: tmpfs: disallowCONFIG_TMPFS_INODE64on s390Currently there is an assumption in tmpfs that 64-bit architectures also have a 64-bit
ino_t. This is not true on s390 which has a 32-bitino_t. WithCONFIG_TMPFS_INODE64=ytmpfs 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.
So prevent
CONFIG_TMPFS_INODE64from being selected on s390.Fixes ea3271f7196c ("tmpfs: support 64-bit inums per-sb")Signed-off-by Seth Forshee <[email protected]>Cc Chris Down <[email protected]>Cc Hugh Dickins <[email protected]>Cc Amir Goldstein <[email protected]>Cc Heiko Carstens <[email protected]>Cc Vasily Gorbik <[email protected]>Cc Christian Borntraeger <[email protected]>Cc <[email protected]> [5.9+]Signed-off-by Andrew Morton <[email protected]>---
fs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/Kconfig config TMPFS_XATTR · line 206
Quoted 5 lines
fs/Kconfig renamed from fs/Kconfig~tmpfs-disallow-config_tmpfs_inode64-on-s390 +1
-1@@ -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
Heh, it's sort of funny that we have a similar patch, which unfortunately was/is not yet on our external features branch, which does exactly the same.
In any case:
Hugh Dickins
Acked-byQuoted 31 lines · Andrew Morton
Quoted 4 lines · On Fri, 5 Feb 2021 17:06:20 -0600 Seth Forshee <[email protected]>…
This feature requires
ino_tbe 64-bits, which is true for every 64-bit architecture but s390, so prevent this option from being selected there.The previous patch nicely described the end-user impact of the bug. This is especially important when requesting a -stable backport.
Here's what I ended up with:
From: Seth Forshee <[email protected]>
Subject: tmpfs: disallowCONFIG_TMPFS_INODE64on s390Currently there is an assumption in tmpfs that 64-bit architectures also have a 64-bit
ino_t. This is not true on s390 which has a 32-bitino_t. WithCONFIG_TMPFS_INODE64=ytmpfs 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.
Quoted 7 lines
So prevent
CONFIG_TMPFS_INODE64from being selected on s390.Fixes ea3271f7196c ("tmpfs: support 64-bit inums per-sb")Signed-off-by Seth Forshee <[email protected]>Cc Chris Down <[email protected]>Cc Hugh Dickins <[email protected]>
Thank you Seth: now that you've fixed Kirill's alpha observation too,
Quoted 25 lines
Cc Amir Goldstein <[email protected]>Cc Heiko Carstens <[email protected]>Cc Vasily Gorbik <[email protected]>Cc Christian Borntraeger <[email protected]>Cc <[email protected]> [5.9+]Signed-off-by Andrew Morton <[email protected]>---
fs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/Kconfig renamed from fs/Kconfig~tmpfs-disallow-config_tmpfs_inode64-on-s390 +1
-1@@ -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_
Quoted 3 lines · Seth Forshee
This feature requires
ino_tbe 64-bits, which is true for every 64-bit architecture but s390, so prevent this option from being selected there.
Quick grep suggests the same for alpha. Am I wrong?
Signature · 1 line
Kirill A. Shutemov
Quoted 6 lines · Kirill A. Shutemov
Quoted 3 lines · Seth Forshee
This feature requires
ino_tbe 64-bits, which is true for every 64-bit architecture but s390, so prevent this option from being selected there.Quick grep suggests the same for alpha. Am I wrong?
No, it appears you are right. Looks like my grep missed alpha somehow.
Andrew, do you prefer an additional patch or an updated version of the previous patch?
Andrew Morton
maintainerQuoted 6 lines · On Mon, 8 Feb 2021 07:06:58 -0600 Seth Forshee <[email protected]>…
Quoted 5 lines · Kirill A. Shutemov
Quoted 3 lines · Seth Forshee
This feature requires
ino_tbe 64-bits, which is true for every 64-bit architecture but s390, so prevent this option from being selected there.
Quoted 6 lines
Quoted 1 line
Quick grep suggests the same for alpha. Am I wrong?
No, it appears you are right. Looks like my grep missed alpha somehow.
Andrew, do you prefer an additional patch or an updated version of the previous patch?
Doesn't matter much. A second patch for Alpha would be best, I guess. Thanks.