Bug 444224

Summary: Missing io_uring syscall
Product: [Developer tools] valgrind Reporter: Hannes Reinecke <hare>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal CC: mark, pjfloyd, roger, sam
Priority: NOR    
Version First Reported In: 3.15 SVN   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Hannes Reinecke 2021-10-22 07:30:11 UTC
SUMMARY

valgrind is missing a syscall definition for io_uring:

==18101== Memcheck, a memory error detector
==18101== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==18101== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==18101== Command: ./nofuse -d -S -s 4420 -f /tmp/ns1
==18101== 
iface 1: listening on ipv4 address 127.0.0.1 port 8009
iface 2: listening on ipv6 address ::1 port 8009
iface 3: listening on ipv4 address 127.0.0.1 port 4420
iface 4: listening on ipv6 address ::1 port 4420
--18101-- WARNING: unhandled amd64-linux syscall: 425
--18101-- You may be able to write your own handler.
--18101-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--18101-- Nevertheless we consider this a bug.  Please report
--18101-- it at http://valgrind.org/support/bug_reports.html.

STEPS TO REPRODUCE
1. Compile nofuse (https://github.com/hreinecke/nofuse)
2. Run valgrind ./nofuse -d -S
3. Observe above error

EXPECTED RESULT
valgrind should be able to handle the io_uring syscall.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Leap 15.2
Comment 1 Roger Light 2021-10-25 23:00:41 UTC
io_uring support was added in 3.17.0: https://valgrind.org/docs/manual/dist.news.html
Comment 2 Mark Wielaard 2023-11-08 10:50:32 UTC
This was added in 3.17.0. So lets close this.

There are some followup bugs for more functionality.
e.g. Bug #439226 Multiple io_urings per thread not supported
and Bug #428364 Signals inside io_uring_enter not handled

If there are other issues please open a new bug.

commit 97fa86915e717dc68123f05b668b73adfe8885a9
Author: Bart Van Assche <bvanassche@acm.org>
Date:   Mon Jul 1 15:09:04 2019 -0700

    Add support for the Linux io_uring system calls
    
    Man pages and test code are available in the following git repository:
    
    http://git.kernel.dk/cgit/liburing/

commit b918f710208889d579026627830a80b24be1513d
Author: Mark Wielaard <mark@klomp.org>
Date:   Thu Feb 4 17:21:56 2021 +0100

    PR423361  Adds io_uring support on arm64/aarch64 (and all other arches)
    
    io_uring syscalls only work on x86/amd64, but they can be enabled on
    all arches. Based on a patch by Nathan Ringo <nathan@remexre.xyz>.
    
    https://bugs.kde.org/show_bug.cgi?id=423361

commit c90561e20f7df2e9c5ae30f1cdafd330b0172345
Author: Mark Wielaard <mark@klomp.org>
Date:   Wed Feb 9 23:37:53 2022 +0100

    Do not try to record fd name for io_uring_setup
    
    In POST(sys_io_uring_setup) we tried to use record_fd_open_with_given_name
    with ARG1 as name. But ARG1 isn't a char pointer. So this might crash with
    --track-fds=yes. Since no (file) name is associated with the fd returned by
    io_uring_setup use record_fd_open_nameless instead.
    
    https://bugs.kde.org/show_bug.cgi?id=449838