Bug 416387 - finit_module and bpf syscalls are unhandled on arm64
Summary: finit_module and bpf syscalls are unhandled on arm64
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-17 18:34 UTC by Alexandra Hajkova
Modified: 2020-01-18 01:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
patch (1.75 KB, patch)
2020-01-17 18:34 UTC, Alexandra Hajkova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandra Hajkova 2020-01-17 18:34:58 UTC
Created attachment 125201 [details]
patch

STEPS TO REPRODUCE
1. clone, compile and install linux test project (https://github.com/linux-test-project/ltp.git)
2. valgrind  -q --trace-children=yes ~/ltp/testcases/kernel/syscalls/delete_module/delete_module01 

Actual Results:
tst_test.c:1217: INFO: Timeout per run is 0h 05m 00s
--21002-- WARNING: unhandled arm64-linux syscall: 273
--21002-- You may be able to write your own handler.
--21002-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--21002-- Nevertheless we consider this a bug.  Please report
--21002-- it at http://valgrind.org/support/bug_reports.html.
delete_module01.c:40: PASS: delete_module() successful

Expected Results:
tst_test.c:1217: INFO: Timeout per run is 0h 05m 00s
delete_module01.c:40: PASS: delete_module() successful

valgrind  -q --trace-children=yes ~/ltp/testcases/kernel/syscalls/bpf/bpf_prog01

Actual Results:
tst_buffers.c:55: INFO: Test is using guarded buffers
tst_test.c:1217: INFO: Timeout per run is 0h 05m 00s
bpf_common.h:18: INFO: Raising RLIMIT_MEMLOCK to 17039360
--22567-- WARNING: unhandled arm64-linux syscall: 280
--22567-- You may be able to write your own handler.
--22567-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--22567-- Nevertheless we consider this a bug.  Please report
--22567-- it at http://valgrind.org/support/bug_reports.html.
../../../../include/lapi/bpf.h:563: CONF: syscall(280) __NR_bpf not supported

Expected results:
tst_buffers.c:55: INFO: Test is using guarded buffers
tst_test.c:1217: INFO: Timeout per run is 0h 05m 00s
bpf_common.h:18: INFO: Raising RLIMIT_MEMLOCK to 17039360
bpf_prog01.c:90: PASS: Loaded program
bpf_prog01.c:149: PASS: val = 1

Proposed patch hookes up these syscalls for arm64.
Comment 1 Mark Wielaard 2020-01-18 01:16:38 UTC
Thanks, looks correct. Applied to git master:

commit 7d4071fe8530fa1c217bb775b0e19fd97d871502
Author: Alexandra Hajkova <ahajkova@redhat.com>
Date:   Fri Jan 17 06:59:11 2020 -0500

    arm64: hook up finit_module and bpf syscalls
    
    This fixes "WARNING: unhandled arm64-linux syscall" in
    delete_module01 and bpf_prog01 tests in the LTP test suite.