Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1265557

Summary: setxattr, lsetxattr and fsetxattr not implemented on aarch64
Product: Red Hat Enterprise Linux 7 Reporter: Miloš Prchlík <mprchlik>
Component: valgrindAssignee: Mark Wielaard <mjw>
Status: CLOSED ERRATA QA Contact: Miloš Prchlík <mprchlik>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: jakub, jcm, jfeeney, mbenitez, mcermak, ohudlick
Target Milestone: rc   
Target Release: 7.3   
Hardware: aarch64   
OS: Unspecified   
Whiteboard:
Fixed In Version: valgrind-3.11.0-20.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 02:55:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1277314    

Description Miloš Prchlík 2015-09-23 08:36:33 UTC
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 11:53:24 UTC
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 20:28:39 UTC
Upstream patch mentioned in comment #1 can be backported.

Comment 5 Miloš Prchlík 2016-06-08 12:38:49 UTC
Verified for build valgrind-3.11.0-22.

Comment 7 errata-xmlrpc 2016-11-04 02:55:02 UTC
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