* LTP: syscalls: TWARN ioctl(/dev/loop0, LOOP_SET_STATUS, test_dev.img) failed EOPNOTSUPP (95) @ 2025-07-08 12:58 Naresh Kamboju 2025-07-09 13:48 ` Naresh Kamboju 0 siblings, 1 reply; 3+ messages in thread From: Naresh Kamboju @ 2025-07-08 12:58 UTC (permalink / raw) To: LTP List, open list, lkft-triage, linux-fsdevel, linux-block Cc: Anders Roxell, Dan Carpenter, Arnd Bergmann, Ben Copeland, Petr Vorel, chrubis, rbm, Jens Axboe, willy Regressions were observed while testing LTP syscalls cachestat01 and other related tests on the next-20250702 Linux kernel across several devices. The issue appears to be related to the inability to configure /dev/loop0 via the LOOP_SET_STATUS ioctl, which returned EOPNOTSUPP (Operation not supported). This results in a TBROK condition, causing the test to fail. Test environments: - arm64 - qemu-x86_64 - qemu-riscv Regression Analysis: - New regression? Yes - Reproducibility? Yes Regressions started from next-20250702 ( next-20250708) Good: next-20250701 Bad: next-20250702 Test regression: Linux next-20250702 TWARN ioctl(/dev/loop0, LOOP_SET_STATUS, test_dev.img) failed EOPNOTSUPP (95) TBROK Failed to acquire device Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> ## Test log tst_buffers.c:57: TINFO: Test is using guarded buffers tst_tmpdir.c:316: TINFO: Using /tmp/LTP_cacQ9AfS0 as tmpdir (tmpfs filesystem) tst_device.c:98: TINFO: Found free device 0 '/dev/loop0' tst_device.c:190: TWARN: ioctl(/dev/loop0, LOOP_SET_STATUS, test_dev.img) failed: EOPNOTSUPP (95) tst_device.c:362: TBROK: Failed to acquire device ## Source * Kernel version: 6.16.0-rc4-next-20250702 * Git tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git * Git sha: 50c8770a42faf8b1c7abe93e7c114337f580a97d * Git describe: next-20250702 * Project: https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20250704/testrun/29017637 * Architectures: arm64, x86_64, riscv64. * Toolchains: gcc-13 and clang-20 * Kconfigs: defconfig+ltp ## Build * Test log: https://qa-reports.linaro.org/api/testruns/28986655/log_file/ * Test details: https://regressions.linaro.org/lkft/linux-next-master/next-20250702/ltp-syscalls/cachestat01/ * Test history: https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20250704/testrun/29017637/suite/ltp-syscalls/test/cachestat01/history/ * Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/2zJjY2EmRMul6P0UgjdOm4Ssiqh/ * Kernel config: https://storage.tuxsuite.com/public/linaro/lkft/builds/2zJjY2EmRMul6P0UgjdOm4Ssiqh/config ## List of tests - cachestat01 - cachestat04 - chdir01 - chmod09 - close_range01 - copy_file_range01 - copy_file_range02 - creat09 - fallocate04 - fallocate05 - fallocate06 - fanotify01 - fanotify05 - fanotify06 - fanotify10 - fanotify13 - fanotify14 - fanotify15 - fanotify16 - fanotify17 - fanotify18 - fanotify19 - fanotify20 - fanotify21 - fanotify22 - fanotify23 - fchmodat2_01 - fdatasync03 - fgetxattr01 - fremovexattr01 - fremovexattr02 - fsetxattr01 - fsmount01 - fsmount02 - fsopen01 - fsopen02 - fspick01 - fspick02 - fsskipig01 - fsskipig02 - fsskipig03 - fstatfs01 - fstatfs01_64 - fsync01 - fsync04 - getdents01 - getdents02 - getxattr02 - getxattr03 - inotify03 - ioctl04 - ioctl05 - ioctl06 - ioctl_ficlone02 - ioctl_fiemap01 - ioctl_loop01 - lchown03 - linkat02 - listmount01 - listmount02 - lremovexattr01 - lstat03 - lstat03_64 - mkdir09 - mknodat02 - mmap16 - mount01 - mount02 - mount03 - mount04 - mount05 - mount06 - mount07 - mount_setattr01 - move_mount01 - move_mount02 - msync04 - open_tree01 - open_tree02 - prctl06 - preadv03 - preadv03_64 - preadv203 - preadv203_64 - pwritev03 - pwritev03_64 - quotactl01 - quotactl04 - quotactl06 - quotactl08 - quotactl09 - readahead02 - readdir01 - rename01 - rename03 - rename04 - rename05 - rename06 - rename07 - rename08 - rename10 - rename11 - rename12 - rename13 - rename15 - renameat01 - setxattr01 - stat04 - stat04_64 - statfs01 - statfs01_64 - statmount01 - statmount02 - statmount04 - statmount05 - statmount06 - statmount07 - statvfs01 - statx06 - statx08 - statx10 - statx11 - statx12 - sync01 - syncfs01 - umount01 - umount02 - umount03 - umount2_01 - umount2_02 - unlink09 - utime01 - utime02 - utime03 - utime04 - utime05 - utimensat01 - writev03 -- Linaro LKFT https://lkft.linaro.org ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: LTP: syscalls: TWARN ioctl(/dev/loop0, LOOP_SET_STATUS, test_dev.img) failed EOPNOTSUPP (95) 2025-07-08 12:58 LTP: syscalls: TWARN ioctl(/dev/loop0, LOOP_SET_STATUS, test_dev.img) failed EOPNOTSUPP (95) Naresh Kamboju @ 2025-07-09 13:48 ` Naresh Kamboju 2025-07-09 14:09 ` Arnd Bergmann 0 siblings, 1 reply; 3+ messages in thread From: Naresh Kamboju @ 2025-07-09 13:48 UTC (permalink / raw) To: LTP List, open list, lkft-triage, linux-fsdevel, linux-block Cc: Anders Roxell, Dan Carpenter, Arnd Bergmann, Ben Copeland, Petr Vorel, chrubis, rbm, Jens Axboe, willy, Martin K. Petersen, Anuj Gupta, Kanchan Joshi, Christoph Hellwig, Christian Brauner On Tue, 8 Jul 2025 at 18:28, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: > > Regressions were observed while testing LTP syscalls cachestat01 and > other related tests on the next-20250702 Linux kernel across several devices. > > The issue appears to be related to the inability to configure /dev/loop0 > via the LOOP_SET_STATUS ioctl, which returned EOPNOTSUPP > (Operation not supported). This results in a TBROK condition, > causing the test to fail. Anders, bisected this down to this commit id, # first bad commit: [9eb22f7fedfc9eb1b7f431a5359abd4d15b0b0cd] fs: add ioctl to query metadata and protection info capabilities > Test environments: > - arm64 > - qemu-x86_64 > - qemu-riscv > > Regression Analysis: > - New regression? Yes > - Reproducibility? Yes > > Regressions started from next-20250702 ( next-20250708) > Good: next-20250701 > Bad: next-20250702 > > Test regression: Linux next-20250702 TWARN ioctl(/dev/loop0, > LOOP_SET_STATUS, test_dev.img) failed EOPNOTSUPP (95) TBROK Failed to > acquire device > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> > > ## Test log > tst_buffers.c:57: TINFO: Test is using guarded buffers > tst_tmpdir.c:316: TINFO: Using /tmp/LTP_cacQ9AfS0 as tmpdir (tmpfs filesystem) > tst_device.c:98: TINFO: Found free device 0 '/dev/loop0' > tst_device.c:190: TWARN: ioctl(/dev/loop0, LOOP_SET_STATUS, > test_dev.img) failed: EOPNOTSUPP (95) > tst_device.c:362: TBROK: Failed to acquire device Lore link, * https://lore.kernel.org/all/CA+G9fYvk9HHE5UJ7cdJHTcY6P5JKnp+_e+sdC5U-ZQFTP9_hqQ@mail.gmail.com/ > > ## Source > * Kernel version: 6.16.0-rc4-next-20250702 > * Git tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git > * Git sha: 50c8770a42faf8b1c7abe93e7c114337f580a97d > * Git describe: next-20250702 > * Project: https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20250704/testrun/29017637 > * Architectures: arm64, x86_64, riscv64. > * Toolchains: gcc-13 and clang-20 > * Kconfigs: defconfig+ltp > > ## Build > * Test log: https://qa-reports.linaro.org/api/testruns/28986655/log_file/ > * Test details: > https://regressions.linaro.org/lkft/linux-next-master/next-20250702/ltp-syscalls/cachestat01/ > * Test history: > https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20250704/testrun/29017637/suite/ltp-syscalls/test/cachestat01/history/ > * Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/2zJjY2EmRMul6P0UgjdOm4Ssiqh/ > * Kernel config: > https://storage.tuxsuite.com/public/linaro/lkft/builds/2zJjY2EmRMul6P0UgjdOm4Ssiqh/config > > ## List of tests > - cachestat01 > - cachestat04 > - chdir01 > - chmod09 > - close_range01 > - copy_file_range01 > - copy_file_range02 > - creat09 > - fallocate04 > - fallocate05 > - fallocate06 > - fanotify01 > - fanotify05 > - fanotify06 > - fanotify10 > - fanotify13 > - fanotify14 > - fanotify15 > - fanotify16 > - fanotify17 > - fanotify18 > - fanotify19 > - fanotify20 > - fanotify21 > - fanotify22 > - fanotify23 > - fchmodat2_01 > - fdatasync03 > - fgetxattr01 > - fremovexattr01 > - fremovexattr02 > - fsetxattr01 > - fsmount01 > - fsmount02 > - fsopen01 > - fsopen02 > - fspick01 > - fspick02 > - fsskipig01 > - fsskipig02 > - fsskipig03 > - fstatfs01 > - fstatfs01_64 > - fsync01 > - fsync04 > - getdents01 > - getdents02 > - getxattr02 > - getxattr03 > - inotify03 > - ioctl04 > - ioctl05 > - ioctl06 > - ioctl_ficlone02 > - ioctl_fiemap01 > - ioctl_loop01 > - lchown03 > - linkat02 > - listmount01 > - listmount02 > - lremovexattr01 > - lstat03 > - lstat03_64 > - mkdir09 > - mknodat02 > - mmap16 > - mount01 > - mount02 > - mount03 > - mount04 > - mount05 > - mount06 > - mount07 > - mount_setattr01 > - move_mount01 > - move_mount02 > - msync04 > - open_tree01 > - open_tree02 > - prctl06 > - preadv03 > - preadv03_64 > - preadv203 > - preadv203_64 > - pwritev03 > - pwritev03_64 > - quotactl01 > - quotactl04 > - quotactl06 > - quotactl08 > - quotactl09 > - readahead02 > - readdir01 > - rename01 > - rename03 > - rename04 > - rename05 > - rename06 > - rename07 > - rename08 > - rename10 > - rename11 > - rename12 > - rename13 > - rename15 > - renameat01 > - setxattr01 > - stat04 > - stat04_64 > - statfs01 > - statfs01_64 > - statmount01 > - statmount02 > - statmount04 > - statmount05 > - statmount06 > - statmount07 > - statvfs01 > - statx06 > - statx08 > - statx10 > - statx11 > - statx12 > - sync01 > - syncfs01 > - umount01 > - umount02 > - umount03 > - umount2_01 > - umount2_02 > - unlink09 > - utime01 > - utime02 > - utime03 > - utime04 > - utime05 > - utimensat01 > - writev03 > -- Linaro LKFT https://lkft.linaro.org ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: LTP: syscalls: TWARN ioctl(/dev/loop0, LOOP_SET_STATUS, test_dev.img) failed EOPNOTSUPP (95) 2025-07-09 13:48 ` Naresh Kamboju @ 2025-07-09 14:09 ` Arnd Bergmann 0 siblings, 0 replies; 3+ messages in thread From: Arnd Bergmann @ 2025-07-09 14:09 UTC (permalink / raw) To: Naresh Kamboju, LTP List, open list, lkft-triage, linux-fsdevel, linux-block Cc: Anders Roxell, Dan Carpenter, Benjamin Copeland, Petr Vorel, chrubis, rbm, Jens Axboe, Matthew Wilcox, Martin K. Petersen, Anuj Gupta, Kanchan Joshi, Christoph Hellwig, Christian Brauner On Wed, Jul 9, 2025, at 15:48, Naresh Kamboju wrote: > On Tue, 8 Jul 2025 at 18:28, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: >> >> Regressions were observed while testing LTP syscalls cachestat01 and >> other related tests on the next-20250702 Linux kernel across several devices. >> >> The issue appears to be related to the inability to configure /dev/loop0 >> via the LOOP_SET_STATUS ioctl, which returned EOPNOTSUPP >> (Operation not supported). This results in a TBROK condition, >> causing the test to fail. > > Anders, bisected this down to this commit id, > # first bad commit: > [9eb22f7fedfc9eb1b7f431a5359abd4d15b0b0cd] > fs: add ioctl to query metadata and protection info capabilities I see the problem now in + if (_IOC_NR(cmd) == _IOC_NR(FS_IOC_GETLBMD_CAP)) + return blk_get_meta_cap(bdev, cmd, argp); + This only compares _IOC_NR() but not _IOC_TYPE, so LOOP_SET_STATUS is treated the same as FS_IOC_GETLBMD_CAP, since both use '2' in the lower 8 bit. include/uapi/linux/fs.h:#define FS_IOC_GETLBMD_CAP _IOWR(0x15, 2, struct logical_block_metadata_cap) include/uapi/linux/loop.h:#define LOOP_SET_STATUS 0x4C02 I checked a couple of other drivers using _IOC_NR(), and it seems that they many of them have the same bug, e.g.: drivers/accel/habanalabs/common/habanalabs_ioctl.c drivers/block/ublk_drv.c drivers/dma-buf/dma-heap.c Arnd ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-09 14:10 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-07-08 12:58 LTP: syscalls: TWARN ioctl(/dev/loop0, LOOP_SET_STATUS, test_dev.img) failed EOPNOTSUPP (95) Naresh Kamboju 2025-07-09 13:48 ` Naresh Kamboju 2025-07-09 14:09 ` Arnd Bergmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).