Project

General

Profile

Actions

Bug #61501

open

Bug #58945: qa: xfstests-dev's generic test suite has 20 failures with fuse client

Bug #61243: qa: tasks.cephfs.tests_from_xfstests_dev.TestXFSTestsDev - 17 tests failed

ceph-fuse: generic/126 failed due to file couldn't be executed without the 'r' mode

Added by Xiubo Li 11 months ago. Updated 11 months ago.

Status:
Fix Under Review
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

2023-05-11T07:03:32.876 DEBUG:teuthology.orchestra.run.smithi072:> (cd /tmp/tmp.iKz0yRskC2xfstests-dev && exec sudo env DIFF_LENGTH=0 ./check generic/126)
2023-05-11T07:03:33.436 INFO:teuthology.orchestra.run.smithi072.stdout:FSTYP         -- ceph-fuse
2023-05-11T07:03:33.440 INFO:teuthology.orchestra.run.smithi072.stdout:PLATFORM      -- Linux/x86_64 smithi072 4.18.0-372.9.1.el8.x86_64 #1 SMP Fri Apr 15 22:12:19 EDT 2022
2023-05-11T07:03:33.440 INFO:teuthology.orchestra.run.smithi072.stdout:
2023-05-11T07:03:37.748 INFO:teuthology.orchestra.run.smithi072.stdout:generic/126       - output mismatch (see /tmp/tmp.iKz0yRskC2xfstests-dev/results//generic/126.out.bad)
2023-05-11T07:03:37.750 INFO:teuthology.orchestra.run.smithi072.stdout:    --- tests/generic/126.out    2023-05-11 05:54:48.318748670 +0000
2023-05-11T07:03:37.750 INFO:teuthology.orchestra.run.smithi072.stdout:    +++ /tmp/tmp.iKz0yRskC2xfstests-dev/results//generic/126.out.bad     2023-05-11 07:03:37.032383192 +0000
2023-05-11T07:03:37.750 INFO:teuthology.orchestra.run.smithi072.stdout:    @@ -1,7 +1,7 @@
2023-05-11T07:03:37.750 INFO:teuthology.orchestra.run.smithi072.stdout:     QA output created by 126
2023-05-11T07:03:37.750 INFO:teuthology.orchestra.run.smithi072.stdout:    -x a 001 file owned by (99/99) as user/group(12/100)  PASS
2023-05-11T07:03:37.751 INFO:teuthology.orchestra.run.smithi072.stdout:    -x a 010 file owned by (99/99) as user/group(200/99)  PASS
2023-05-11T07:03:37.751 INFO:teuthology.orchestra.run.smithi072.stdout:    -x a 100 file owned by (99/99) as user/group(99/500)  PASS
2023-05-11T07:03:37.751 INFO:teuthology.orchestra.run.smithi072.stdout:    +x a 001 file owned by (99/99) as user/group(12/100)  FAIL
2023-05-11T07:03:37.751 INFO:teuthology.orchestra.run.smithi072.stdout:    +x a 010 file owned by (99/99) as user/group(200/99)  FAIL
2023-05-11T07:03:37.751 INFO:teuthology.orchestra.run.smithi072.stdout:    +x a 100 file owned by (99/99) as user/group(99/500)  FAIL
2023-05-11T07:03:37.751 INFO:teuthology.orchestra.run.smithi072.stdout:     w a 002 file owned by (99/99) as user/group(12/100)  PASS
2023-05-11T07:03:37.751 INFO:teuthology.orchestra.run.smithi072.stdout:     w a 020 file owned by (99/99) as user/group(200/99)  PASS
2023-05-11T07:03:37.751 INFO:teuthology.orchestra.run.smithi072.stdout:     w a 200 file owned by (99/99) as user/group(99/500)  PASS
2023-05-11T07:03:37.752 INFO:teuthology.orchestra.run.smithi072.stdout:Ran: generic/126
2023-05-11T07:03:37.752 INFO:teuthology.orchestra.run.smithi072.stdout:Failures: generic/126

Actions #1

Updated by Xiubo Li 11 months ago

For kclient the VFS will do the permission check and in case a file without the 'r' permission and if there is 'x' permission we still can executed it. But for libcephfs we couldn't. The logic between kclient and libcephfs are different.

Need to go through the kernel fuse code to find one way to fix it.

Actions #2

Updated by Xiubo Li 11 months ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 51849
Actions #3

Updated by Xiubo Li 11 months ago

With this fixes it worked as expected:

[xiubli@ceph build]$ cd /mnt/libcephfs/
[xiubli@ceph libcephfs]$ ls
pwd
[xiubli@ceph libcephfs]$ ll
ls: pwd: Permission denied
total 36
--wx--x--x 1 xiubli xiubli 36368 May 31 18:22 pwd
[xiubli@ceph libcephfs]$ ./pwd
/mnt/libcephfs
[xiubli@ceph libcephfs]$ cat ./pwd 
cat: ./pwd: Permission denied
[xiubli@ceph libcephfs]$ 
Actions #4

Updated by Xiubo Li 11 months ago

The execlp(),etc system call will ignore the 'r' permission in VFS,
and allowed a file without 'r' permission still could be excuted if
'x' is set.

The kernel VFS and FUSE will pass the 'O_READONLY | _FMODE_EXEC' to
libcephfs in the open_flags when opening the file and if the
'fuse_default_permissions' option is disabled we can check the
'
_FMODE_EXEC' flags. If '__FMODE_EXEC' is set then we should ignore
the 'r' permissio check.

Actions

Also available in: Atom PDF