Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Mar 2020 01:52:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 244686] fusefs: fuse ops header's unique values aren't always unique
Message-ID:  <bug-244686-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244686

            Bug ID: 244686
           Summary: fusefs: fuse ops header's unique values aren't always
                    unique
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: asomers@FreeBSD.org

Every FUSE operation has a unique value in its header.  As the name implies,
these values are supposed to be unique among all outstanding operations.  A=
nd
sine FUSE_INTERRUPT is asynchronous and racy, it is desirable that the uniq=
ue
values be unique among all operations that are "close in time".  But in our
module, they aren't always unique.  We inadvertently reuse them during fsyn=
c,
readdir, LISTXATTR, and WRITE.  The problem can be easily demonstrated like
this:

cd /usr/tests/sys/fs/fusefs
> ./xattr --gtest_filter=3DListxattr.user -vv
Note: Google Test filter =3D Listxattr.user
[=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Listxattr
[ RUN      ] Listxattr.user
ACCESS      ino=3D 1 uid=3D 1000 gid=3D 1000 pid=3D  848 unique=3D2 len=3D4=
8 buflen=3D48
mask=3D0x1
LOOKUP      ino=3D 1 uid=3D 1000 gid=3D 1000 pid=3D  848 unique=3D3 len=3D5=
4 buflen=3D54
some_file.txt
LISTXATTR   ino=3D42 uid=3D 1000 gid=3D 1000 pid=3D  848 unique=3D4 len=3D4=
8 buflen=3D48
size=3D0
LISTXATTR   ino=3D42 uid=3D 1000 gid=3D 1000 pid=3D  848 unique=3D4 len=3D4=
8 buflen=3D48
size=3D28
[       OK ] Listxattr.user (3 ms)
[----------] 1 test from Listxattr (3 ms total)

[----------] Global test environment tear-down
[=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D] 1 test from 1 test case ran. (3 ms total)
[  PASSED  ] 1 test.


We should ensure that the value is regenerated during fdisp_refresh_vp().

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-244686-227>