Summary: | under linux emulation listxattr returns incorrect result | ||
---|---|---|---|
Product: | Base System | Reporter: | weiss |
Component: | kern | Assignee: | freebsd-emulation (Nobody) <emulation> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | emaste, fsu, markj |
Priority: | --- | Keywords: | patch |
Version: | 11.2-RELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
weiss
2019-01-07 21:35:21 UTC
Seems to be a regression from r326282. Shouldn't the change have also modified the xattr stubs to return EOPNOTSUPP instead of ENOATTR? The listxattr and other extattr related linux emulator calls are implemented as dummy calls. See DUMMY_XATTR macro in the linux_dummy.c. The dummy calls return values are ENOATTR in all cases. After the bsd_to_linux_errno mapping the linux ENODATA (-61) will be returned. Before the r326282 it was linux EOPNOTSUPP (-95). It is possible to change dummy calls return values from ENOATTR to EOPNOTSUPP. I am not clearly understand, why it was not done from beginning? Is it possible to affect someone if the error code will be changed? (In reply to Fedor Uporov from comment #2) Indeed, I think the stubs should be modified to return EOPNOTSUPP. I'm not sure why it wasn't that way before... with the previous translation of ENOATTR it just "worked" so I guess it was a bug that nobody noticed. Since you were in that area, would you like to fix it? (In reply to Mark Johnston from comment #3) Ok, I will prepare the phabricator review soon. MFC`ed to stable/11. Revision: r342999 |