[Bug 234713] under linux emulation listxattr returns incorrect result

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 7 21:35:23 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234713

            Bug ID: 234713
           Summary: under linux emulation listxattr returns incorrect
                    result
           Product: Base System
           Version: 11.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: weiss at uni-mainz.de

after upgrade from 11.1 to 11.2 release tivoli storage manager client (TSM)
fails due to incorrect listxattr implementation.

listxattr should return error -EOPNOTSUPP if file system does not support
   extended attributes and no error and result 0 if file does not have
   extended attributes. With 11.2 listxattr returns -ENODATA in the
   second case.

On linux output of strace of listxattr of directory ./nano without
  extended attributes:

  listxattr(".nano/", NULL, 0)            = 0

On FreeBSD output of ktrace of listxattr of directory without
  extended attributes:

 54332 dsmc     RET   linux_llistxattr -1 errno -61 Attribute not found


Following change in code between 11.1 and 11.2 led to the emergence of the bug.
In 11.1 EOPNOTSUPP was returned instead of ENODATA. This change may seem
correct for other linux xattr calls, but not for listxattr.


*** linux32_sysvec.c    Mon Jan  7 18:30:21 2019
--- linux32_sysvec.c-11.2       Fri Jun 22 01:02:23 2018
***************
*** 146,152 ****
        -100,-101,-102,-103,-104,-105,-106,-107,-108,-109,
        -110,-111, -40, -36,-112,-113, -39, -11, -87,-122,
        -116, -66,  -6,  -6,  -6,  -6,  -6, -37, -38,  -9,
!         -6,  -6, -43, -42, -75,-125, -84, -95, -16, -74,
         -72, -67, -71
  };

--- 146,152 ----
        -100,-101,-102,-103,-104,-105,-106,-107,-108,-109,
        -110,-111, -40, -36,-112,-113, -39, -11, -87,-122,
        -116, -66,  -6,  -6,  -6,  -6,  -6, -37, -38,  -9,
!         -6,  -6, -43, -42, -75,-125, -84, -61, -16, -74,
         -72, -67, -71
  };

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


More information about the freebsd-bugs mailing list