Bug 1265557 - setxattr, lsetxattr and fsetxattr not implemented on aarch64
setxattr, lsetxattr and fsetxattr not implemented on aarch64
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: valgrind (Show other bugs)
7.2
aarch64 Unspecified
medium Severity medium
: rc
: 7.3
Assigned To: Mark Wielaard
Miloš Prchlík
:
Depends On:
Blocks: 1277314
  Show dependency treegraph
 
Reported: 2015-09-23 04:36 EDT by Miloš Prchlík
Modified: 2016-11-03 22:55 EDT (History)
6 users (show)

See Also:
Fixed In Version: valgrind-3.11.0-20.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 22:55:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
KDE Software Compilation 353083 None None None Never

  None (edit)
Description Miloš Prchlík 2015-09-23 04:36:33 EDT
Description of problem:

$ cat reproducer.c 
#include <stdio.h>
#include <sys/types.h>
#include <sys/xattr.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>

int main(int argc, char **argv) {
    char *foo = "bar";

    if (setxattr(argv[1], "user.x", foo, strlen(foo), 0) == -1)
        perror("setxattr");

    if (lsetxattr(argv[1], "user.y", foo, strlen(foo), 0) == -1)
        perror("lsetxattr");

    int fd = open (argv[1], O_RDWR);
    if (fsetxattr(fd, "user.y", foo, strlen(foo), 0) == -1)
        perror("fsetxattr");

    return 0;
}

$ valgrind ./reproducer test
==12484== Memcheck, a memory error detector
==12484== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==12484== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==12484== Command: ./a.out test
==12484== 
--12484-- WARNING: unhandled syscall: 5
--12484-- You may be able to write your own handler.
--12484-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--12484-- Nevertheless we consider this a bug.  Please report
--12484-- it at http://valgrind.org/support/bug_reports.html.
setxattr: Function not implemented
--12484-- WARNING: unhandled syscall: 6
--12484-- You may be able to write your own handler.
--12484-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--12484-- Nevertheless we consider this a bug.  Please report
--12484-- it at http://valgrind.org/support/bug_reports.html.
lsetxattr: Function not implemented
--12484-- WARNING: unhandled syscall: 7
--12484-- You may be able to write your own handler.
--12484-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--12484-- Nevertheless we consider this a bug.  Please report
--12484-- it at http://valgrind.org/support/bug_reports.html.
fsetxattr: Function not implemented
==12484== 
==12484== HEAP SUMMARY:
==12484==     in use at exit: 0 bytes in 0 blocks
==12484==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==12484== 
==12484== All heap blocks were freed -- no leaks are possible
==12484== 
==12484== For counts of detected and suppressed errors, rerun with: -v
==12484== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

According to coregrind/m_syswrap/syswrap-arm64-linux.c, these are indeed unimplemented, as well as other syscalls from this family (removexattr, flistxattr, ...), though I did not run into others anywhere yet. Reproducer above was created for testing a bug previously reported for ppc64.


Version-Release number of selected component (if applicable):

valgrind-3.10.0-16.el7.aarch64


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Mark Wielaard 2015-09-23 07:53:24 EDT
This is fixed upstream by valgrind svn r15675. This enables setxattr, lsetxattr, fsetxattr, fgetxattr, removexattr, lremovexattr, fremovexattr, listxattr, llistxattr and flistxattr on arm64-linux.
Comment 3 Mark Wielaard 2016-01-05 15:28:39 EST
Upstream patch mentioned in comment #1 can be backported.
Comment 5 Miloš Prchlík 2016-06-08 08:38:49 EDT
Verified for build valgrind-3.11.0-22.
Comment 7 errata-xmlrpc 2016-11-03 22:55:02 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2297.html

Note You need to log in before you can comment on or make changes to this bug.