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.
Cause:
valgrind didn't recognize the mount and umount system calls on aarch64
Consequence:
programs using those system calls would generate a warning message when ran under valgrind on aarch64
Fix:
valgrind now recognizes those system calls.
Result:
No more warning messages are generated
Description of problem:
[root@apm-mustang-ev3-04 ~]# cat t.c
/* must run as root */
#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <sys/mount.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int i;
/* keep valgrind happy about "points to unaddressable byte" situation */
char *source = "", *target = "", *fs = "";
/* in case of unhandled syscall valgrind sets errno to ENOSYS,
* but bad paramters to these syscalls should cause ENOENT
*/
i = mount(source, target, fs, 0, NULL);
if (i != -1 || errno != ENOENT)
perror("mount expected to fail with EFAULT errno");
i = umount(target);
if (i != -1 || errno != ENOENT)
perror("umount expected to fail with EFAULT errno");
return 0;
}
[root@apm-mustang-ev3-04 ~]# gcc -o t t.c
[root@apm-mustang-ev3-04 ~]# valgrind ./t
==4212== Memcheck, a memory error detector
==4212== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==4212== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==4212== Command: ./t
==4212==
--4212-- WARNING: unhandled syscall: 40
--4212-- You may be able to write your own handler.
--4212-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--4212-- Nevertheless we consider this a bug. Please report
--4212-- it at http://valgrind.org/support/bug_reports.html.
mount expected to fail with EFAULT errno: Function not implemented
--4212-- WARNING: unhandled syscall: 39
--4212-- You may be able to write your own handler.
--4212-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--4212-- Nevertheless we consider this a bug. Please report
--4212-- it at http://valgrind.org/support/bug_reports.html.
umount expected to fail with EFAULT errno: Function not implemented
==4212==
==4212== HEAP SUMMARY:
==4212== in use at exit: 0 bytes in 0 blocks
==4212== total heap usage: 2 allocs, 2 frees, 1,136 bytes allocated
==4212==
==4212== All heap blocks were freed -- no leaks are possible
==4212==
==4212== For counts of detected and suppressed errors, rerun with: -v
==4212== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
[root@apm-mustang-ev3-04 ~]#
Version-Release number of selected component (if applicable):
valgrind-3.10.0-7.aa7a.aarch64
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
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/RHBA-2015-2259.html
Description of problem: [root@apm-mustang-ev3-04 ~]# cat t.c /* must run as root */ #define _GNU_SOURCE #include <stdio.h> #include <errno.h> #include <sys/mount.h> #include <stdlib.h> int main(int argc, char **argv) { int i; /* keep valgrind happy about "points to unaddressable byte" situation */ char *source = "", *target = "", *fs = ""; /* in case of unhandled syscall valgrind sets errno to ENOSYS, * but bad paramters to these syscalls should cause ENOENT */ i = mount(source, target, fs, 0, NULL); if (i != -1 || errno != ENOENT) perror("mount expected to fail with EFAULT errno"); i = umount(target); if (i != -1 || errno != ENOENT) perror("umount expected to fail with EFAULT errno"); return 0; } [root@apm-mustang-ev3-04 ~]# gcc -o t t.c [root@apm-mustang-ev3-04 ~]# valgrind ./t ==4212== Memcheck, a memory error detector ==4212== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==4212== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info ==4212== Command: ./t ==4212== --4212-- WARNING: unhandled syscall: 40 --4212-- You may be able to write your own handler. --4212-- Read the file README_MISSING_SYSCALL_OR_IOCTL. --4212-- Nevertheless we consider this a bug. Please report --4212-- it at http://valgrind.org/support/bug_reports.html. mount expected to fail with EFAULT errno: Function not implemented --4212-- WARNING: unhandled syscall: 39 --4212-- You may be able to write your own handler. --4212-- Read the file README_MISSING_SYSCALL_OR_IOCTL. --4212-- Nevertheless we consider this a bug. Please report --4212-- it at http://valgrind.org/support/bug_reports.html. umount expected to fail with EFAULT errno: Function not implemented ==4212== ==4212== HEAP SUMMARY: ==4212== in use at exit: 0 bytes in 0 blocks ==4212== total heap usage: 2 allocs, 2 frees, 1,136 bytes allocated ==4212== ==4212== All heap blocks were freed -- no leaks are possible ==4212== ==4212== For counts of detected and suppressed errors, rerun with: -v ==4212== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) [root@apm-mustang-ev3-04 ~]# Version-Release number of selected component (if applicable): valgrind-3.10.0-7.aa7a.aarch64 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: