2019-07-08 12:59:11

by Chen, Rong A

[permalink] [raw]
Subject: [ptrace] cd5bbb3047: kernel_selftests.seccomp.seccomp_bpf.fail

FYI, we noticed the following commit (built with gcc-7):

commit: cd5bbb3047bf73353767d70a03db986600ca372a ("ptrace: add PTRACE_GET_SYSCALL_INFO request")
https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git master

in testcase: kernel_selftests
with following parameters:

group: kselftests-02

test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt


on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 8G

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>



# selftests: seccomp: seccomp_bpf
# [==========] Running 74 tests from 1 test cases.
# [ RUN ] global.mode_strict_support
# [ OK ] global.mode_strict_support
# [ RUN ] global.mode_strict_cannot_call_prctl
# [ OK ] global.mode_strict_cannot_call_prctl
# [ RUN ] global.no_new_privs_support
# [ OK ] global.no_new_privs_support
# [ RUN ] global.mode_filter_support
# [ OK ] global.mode_filter_support
# [ RUN ] global.mode_filter_without_nnp
# [ OK ] global.mode_filter_without_nnp
# [ RUN ] global.filter_size_limits
# [ OK ] global.filter_size_limits
# [ RUN ] global.filter_chain_limits
# [ OK ] global.filter_chain_limits
# [ RUN ] global.mode_filter_cannot_move_to_strict
# [ OK ] global.mode_filter_cannot_move_to_strict
# [ RUN ] global.mode_filter_get_seccomp
# [ OK ] global.mode_filter_get_seccomp
# [ RUN ] global.ALLOW_all
# [ OK ] global.ALLOW_all
# [ RUN ] global.empty_prog
# [ OK ] global.empty_prog
# [ RUN ] global.log_all
# [ OK ] global.log_all
# [ RUN ] global.unknown_ret_is_kill_inside
# [ OK ] global.unknown_ret_is_kill_inside
# [ RUN ] global.unknown_ret_is_kill_above_allow
# [ OK ] global.unknown_ret_is_kill_above_allow
# [ RUN ] global.KILL_all
# [ OK ] global.KILL_all
# [ RUN ] global.KILL_one
# [ OK ] global.KILL_one
# [ RUN ] global.KILL_one_arg_one
# [ OK ] global.KILL_one_arg_one
# [ RUN ] global.KILL_one_arg_six
# [ OK ] global.KILL_one_arg_six
# [ RUN ] global.KILL_thread
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_redirected:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_redirected:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_redirected:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_redirected:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_redirected:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_redirected:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_redirected:Expected 0 (0) == msg (1)
# TRACE_syscall.ptrace_syscall_redirected: Test failed at step #15
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_errno:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_errno:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_errno:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_errno:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_errno:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_errno:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_errno:Expected 0 (0) == msg (1)
# TRACE_syscall.ptrace_syscall_errno: Test failed at step #15
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_faked:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_faked:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_faked:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_faked:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_faked:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_faked:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.ptrace_syscall_faked:Expected 0 (0) == msg (1)
# TRACE_syscall.ptrace_syscall_faked: Test failed at step #15
# [==========] Running 74 tests from 1 test cases.
# [ RUN ] global.mode_strict_support
# [ OK ] global.mode_strict_support
# [ RUN ] global.mode_strict_cannot_call_prctl
# [ OK ] global.mode_strict_cannot_call_prctl
# [ RUN ] global.no_new_privs_support
# [ OK ] global.no_new_privs_support
# [ RUN ] global.mode_filter_support
# [ OK ] global.mode_filter_support
# [ RUN ] global.mode_filter_without_nnp
# [ OK ] global.mode_filter_without_nnp
# [ RUN ] global.filter_size_limits
# [ OK ] global.filter_size_limits
# [ RUN ] global.filter_chain_limits
# [ OK ] global.filter_chain_limits
# [ RUN ] global.mode_filter_cannot_move_to_strict
# [ OK ] global.mode_filter_cannot_move_to_strict
# [ RUN ] global.mode_filter_get_seccomp
# [ OK ] global.mode_filter_get_seccomp
# [ RUN ] global.ALLOW_all
# [ OK ] global.ALLOW_all
# [ RUN ] global.empty_prog
# [ OK ] global.empty_prog
# [ RUN ] global.log_all
# [ OK ] global.log_all
# [ RUN ] global.unknown_ret_is_kill_inside
# [ OK ] global.unknown_ret_is_kill_inside
# [ RUN ] global.unknown_ret_is_kill_above_allow
# [ OK ] global.unknown_ret_is_kill_above_allow
# [ RUN ] global.KILL_all
# [ OK ] global.KILL_all
# [ RUN ] global.KILL_one
# [ OK ] global.KILL_one
# [ RUN ] global.KILL_one_arg_one
# [ OK ] global.KILL_one_arg_one
# [ RUN ] global.KILL_one_arg_six
# [ OK ] global.KILL_one_arg_six
# [ RUN ] global.KILL_thread
# [ OK ] global.KILL_thread
# [ RUN ] global.KILL_process
# [ OK ] global.KILL_process
# [ RUN ] global.arg_out_of_range
# [ OK ] global.arg_out_of_range
# [ RUN ] global.ERRNO_valid
# [ OK ] global.ERRNO_valid
# [ RUN ] global.ERRNO_zero
# [ OK ] global.ERRNO_zero
# [ RUN ] global.ERRNO_capped
# [ OK ] global.ERRNO_capped
# [ RUN ] global.ERRNO_order
# [ OK ] global.ERRNO_order
# [ RUN ] TRAP.dfl
# [ OK ] TRAP.dfl
# [ RUN ] TRAP.ign
# [ OK ] TRAP.ign
# [ RUN ] TRAP.handler
# [ OK ] TRAP.handler
# [ RUN ] precedence.allow_ok
# [ OK ] precedence.allow_ok
# [ RUN ] precedence.kill_is_highest
# [ OK ] precedence.kill_is_highest
# [ RUN ] precedence.kill_is_highest_in_any_order
# [ OK ] precedence.kill_is_highest_in_any_order
# [ RUN ] precedence.trap_is_second
# [ OK ] precedence.trap_is_second
# [ RUN ] precedence.trap_is_second_in_any_order
# [ OK ] precedence.trap_is_second_in_any_order
# [ RUN ] precedence.errno_is_third
# [ OK ] precedence.errno_is_third
# [ RUN ] precedence.errno_is_third_in_any_order
# [ OK ] precedence.errno_is_third_in_any_order
# [ RUN ] precedence.trace_is_fourth
# [ OK ] precedence.trace_is_fourth
# [ RUN ] precedence.trace_is_fourth_in_any_order
# [ OK ] precedence.trace_is_fourth_in_any_order
# [ RUN ] precedence.log_is_fifth
# [ OK ] precedence.log_is_fifth
# [ RUN ] precedence.log_is_fifth_in_any_order
# [ OK ] precedence.log_is_fifth_in_any_order
# [ RUN ] TRACE_poke.read_has_side_effects
# [ OK ] TRACE_poke.read_has_side_effects
# [ RUN ] TRACE_poke.getpid_runs_normally
# [ OK ] TRACE_poke.getpid_runs_normally
# [ RUN ] TRACE_syscall.ptrace_syscall_redirected
# [ FAIL ] TRACE_syscall.ptrace_syscall_redirected
# [ RUN ] TRACE_syscall.ptrace_syscall_errno
# [ FAIL ] TRACE_syscall.ptrace_syscall_errno
# [ RUN ] TRACE_syscall.ptrace_syscall_faked
# [ FAIL ] TRACE_syscall.ptrace_syscall_faked
# [ RUN ] TRACE_syscall.syscall_allowed
# [ OK ] TRACE_syscall.syscall_allowed
# [ RUN ] TRACE_syscall.syscall_redirected
# [ OK ] TRACE_syscall.syscall_redirected
# [ RUN ] TRACE_syscall.syscall_errno
# [ OK ] TRACE_syscall.syscall_errno
# [ RUN ] TRACE_syscall.syscall_faked
# [ OK ] TRACE_syscall.syscall_faked
# [ RUN ] TRACE_syscall.skip_after_RET_TRACE
# [ OK ] TRACE_syscall.skip_after_RET_TRACE
# [ RUN ] TRACE_syscall.kill_after_RET_TRACE
# [ OK ] TRACE_syscall.kill_after_RET_TRACE
# [ RUN ] TRACE_syscall.skip_aseccomp_bpf.c:1781:TRACE_syscall.skip_after_ptrace:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.skip_after_ptrace:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.skip_after_ptrace:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.skip_after_ptrace:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.skip_after_ptrace:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.skip_after_ptrace:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.skip_after_ptrace:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.skip_after_ptrace:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.skip_after_ptrace:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.skip_after_ptrace:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.skip_after_ptrace:Expected 0 (0) == msg (1)
# TRACE_syscall.skip_after_ptrace: Test failed at step #17
# seccomp_bpf.c:1781:TRACE_syscall.kill_after_ptrace:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.kill_after_ptrace:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.kill_after_ptrace:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.kill_after_ptrace:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.kill_after_ptrace:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.kill_after_ptrace:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.kill_after_ptrace:Expected 0 (0) == msg (1)
# seccomp_bpf.c:1781:TRACE_syscall.kill_after_ptrace:Expected 0 (0) == msg (2)
# seccomp_bpf.c:1781:TRACE_syscall.kill_after_ptrace:Expected 0 (0) == msg (1)
# fter_ptrace
# [ FAIL ] TRACE_syscall.skip_after_ptrace
# [ RUN ] TRACE_syscall.kill_after_ptrace
# [ OK ] TRACE_syscall.kill_after_ptrace
# [ RUN ] global.seccomp_syscall
# [ OK ] global.seccomp_syscall
# [ RUN ] global.seccomp_syscall_mode_lock
# [ OK ] global.seccomp_syscall_mode_lock
# [ RUN ] global.detect_seccomp_filter_flags
# [ OK ] global.detect_seccomp_filter_flags
# [ RUN ] global.TSYNC_first
# [ OK ] global.TSYNC_first
# [ RUN ] TSYNC.siblings_fail_prctl
# [ OK ] TSYNC.siblings_fail_prctl
# [ RUN ] TSYNC.two_siblings_with_ancestor
# [ OK ] TSYNC.two_siblings_with_ancestor
# [ RUN ] TSYNC.two_sibling_want_nnp
# [ OK ] TSYNC.two_sibling_want_nnp
# [ RUN ] TSYNC.two_siblings_with_no_filter
# [ OK ] TSYNC.two_siblings_with_no_filter
# [ RUN ] TSYNC.two_siblings_with_one_divergence
# [ OK ] TSYNC.two_siblings_with_one_divergence
# [ RUN ] TSYNC.two_siblings_not_under_filter
# [ OK ] TSYNC.two_siblings_not_under_filter
# [ RUN ] global.syscall_restart
# [ OK ] global.syscall_restart
# [ RUN ] global.filter_flag_log
# [ OK ] global.filter_flag_log
# [ RUN ] global.get_action_avail
# [ OK ] global.get_action_avail
# [ RUN ] global.get_metadata
# [ OK ] global.get_metadata
# [ RUN ] global.user_notification_basic
# fter_ptrace
# [ FAIL ] TRACE_syscall.skip_after_ptrace
# [ RUN ] TRACE_syscall.kill_after_ptrace
# [ OK ] TRACE_syscall.kill_after_ptrace
# [ RUN ] global.seccomp_syscall
# [ OK ] global.seccomp_syscall
# [ RUN ] global.seccomp_syscall_mode_lock
# [ OK ] global.seccomp_syscall_mode_lock
# [ RUN ] global.detect_seccomp_filter_flags
# [ OK ] global.detect_seccomp_filter_flags
# [ RUN ] global.TSYNC_first
# [ OK ] global.TSYNC_first
# [ RUN ] TSYNC.siblings_fail_prctl
# [ OK ] TSYNC.siblings_fail_prctl
# [ RUN ] TSYNC.two_siblings_with_ancestor
# [ OK ] TSYNC.two_siblings_with_ancestor
# [ RUN ] TSYNC.two_sibling_want_nnp
# [ OK ] TSYNC.two_sibling_want_nnp
# [ RUN ] TSYNC.two_siblings_with_no_filter
# [ OK ] TSYNC.two_siblings_with_no_filter
# [ RUN ] TSYNC.two_siblings_with_one_divergence
# [ OK ] TSYNC.two_siblings_with_one_divergence
# [ RUN ] TSYNC.two_siblings_not_under_filter
# [ OK ] TSYNC.two_siblings_not_under_filter
# [ RUN ] global.syscall_restart
# [ OK ] global.syscall_restart
# [ RUN ] global.filter_flag_log
# [ OK ] global.filter_flag_log
# [ RUN ] global.get_action_avail
# [ OK ] global.get_action_avail
# [ RUN ] global.get_metadata
# [ OK ] global.get_metadata
# [ RUN ] global.user_notification_basic
# fter_ptrace
# [ FAIL ] TRACE_syscall.skip_after_ptrace
# [ RUN ] TRACE_syscall.kill_after_ptrace
# [ OK ] TRACE_syscall.kill_after_ptrace
# [ RUN ] global.seccomp_syscall
# [ OK ] global.seccomp_syscall
# [ RUN ] global.seccomp_syscall_mode_lock
# [ OK ] global.seccomp_syscall_mode_lock
# [ RUN ] global.detect_seccomp_filter_flags
# [ OK ] global.detect_seccomp_filter_flags
# [ RUN ] global.TSYNC_first
# [ OK ] global.TSYNC_first
# [ RUN ] TSYNC.siblings_fail_prctl
# [ OK ] TSYNC.siblings_fail_prctl
# [ RUN ] TSYNC.two_siblings_with_ancestor
# [ OK ] TSYNC.two_siblings_with_ancestor
# [ RUN ] TSYNC.two_sibling_want_nnp
# [ OK ] TSYNC.two_sibling_want_nnp
# [ RUN ] TSYNC.two_siblings_with_no_filter
# [ OK ] TSYNC.two_siblings_with_no_filter
# [ RUN ] TSYNC.two_siblings_with_one_divergence
# [ OK ] TSYNC.two_siblings_with_one_divergence
# [ RUN ] TSYNC.two_siblings_not_under_filter
# [ OK ] TSYNC.two_siblings_not_under_filter
# [ RUN ] global.syscall_restart
# [ OK ] global.syscall_restart
# [ RUN ] global.filter_flag_log
# [ OK ] global.filter_flag_log
# [ RUN ] global.get_action_avail
# [ OK ] global.get_action_avail
# [ RUN ] global.get_metadata
# [ OK ] global.get_metadata
# [ RUN ] global.user_notification_basic
# [ OK ] global.user_notification_basic
# [ RUN ] global.user_notification_kill_in_middle
# [ OK ] global.user_notification_kill_in_middle
# [ RUN ] global.user_notification_signal
# fter_ptrace
# [ FAIL ] TRACE_syscall.skip_after_ptrace
# [ RUN ] TRACE_syscall.kill_after_ptrace
# [ OK ] TRACE_syscall.kill_after_ptrace
# [ RUN ] global.seccomp_syscall
# [ OK ] global.seccomp_syscall
# [ RUN ] global.seccomp_syscall_mode_lock
# [ OK ] global.seccomp_syscall_mode_lock
# [ RUN ] global.detect_seccomp_filter_flags
# [ OK ] global.detect_seccomp_filter_flags
# [ RUN ] global.TSYNC_first
# [ OK ] global.TSYNC_first
# [ RUN ] TSYNC.siblings_fail_prctl
# [ OK ] TSYNC.siblings_fail_prctl
# [ RUN ] TSYNC.two_siblings_with_ancestor
# [ OK ] TSYNC.two_siblings_with_ancestor
# [ RUN ] TSYNC.two_sibling_want_nnp
# [ OK ] TSYNC.two_sibling_want_nnp
# [ RUN ] TSYNC.two_siblings_with_no_filter
# [ OK ] TSYNC.two_siblings_with_no_filter
# [ RUN ] TSYNC.two_siblings_with_one_divergence
# [ OK ] TSYNC.two_siblings_with_one_divergence
# [ RUN ] TSYNC.two_siblings_not_under_filter
# [ OK ] TSYNC.two_siblings_not_under_filter
# [ RUN ] global.syscall_restart
# [ OK ] global.syscall_restart
# [ RUN ] global.filter_flag_log
# [ OK ] global.filter_flag_log
# [ RUN ] global.get_action_avail
# [ OK ] global.get_action_avail
# [ RUN ] global.get_metadata
# [ OK ] global.get_metadata
# [ RUN ] global.user_notification_basic
# [ OK ] global.user_notification_basic
# [ RUN ] global.user_notification_kill_in_middle
# [ OK ] global.user_notification_kill_in_middle
# [ RUN ] global.user_notification_signal
# [ OK ] global.user_notification_signal
# [ RUN ] global.user_notification_closed_listener
# fter_ptrace
# [ FAIL ] TRACE_syscall.skip_after_ptrace
# [ RUN ] TRACE_syscall.kill_after_ptrace
# [ OK ] TRACE_syscall.kill_after_ptrace
# [ RUN ] global.seccomp_syscall
# [ OK ] global.seccomp_syscall
# [ RUN ] global.seccomp_syscall_mode_lock
# [ OK ] global.seccomp_syscall_mode_lock
# [ RUN ] global.detect_seccomp_filter_flags
# [ OK ] global.detect_seccomp_filter_flags
# [ RUN ] global.TSYNC_first
# [ OK ] global.TSYNC_first
# [ RUN ] TSYNC.siblings_fail_prctl
# [ OK ] TSYNC.siblings_fail_prctl
# [ RUN ] TSYNC.two_siblings_with_ancestor
# [ OK ] TSYNC.two_siblings_with_ancestor
# [ RUN ] TSYNC.two_sibling_want_nnp
# [ OK ] TSYNC.two_sibling_want_nnp
# [ RUN ] TSYNC.two_siblings_with_no_filter
# [ OK ] TSYNC.two_siblings_with_no_filter
# [ RUN ] TSYNC.two_siblings_with_one_divergence
# [ OK ] TSYNC.two_siblings_with_one_divergence
# [ RUN ] TSYNC.two_siblings_not_under_filter
# [ OK ] TSYNC.two_siblings_not_under_filter
# [ RUN ] global.syscall_restart
# [ OK ] global.syscall_restart
# [ RUN ] global.filter_flag_log
# [ OK ] global.filter_flag_log
# [ RUN ] global.get_action_avail
# [ OK ] global.get_action_avail
# [ RUN ] global.get_metadata
# [ OK ] global.get_metadata
# [ RUN ] global.user_notification_basic
# [ OK ] global.user_notification_basic
# [ RUN ] global.user_notification_kill_in_middle
# [ OK ] global.user_notification_kill_in_middle
# [ RUN ] global.user_notification_signal
# [ OK ] global.user_notification_signal
# [ RUN ] global.user_notification_closed_listener
# [ OK ] global.user_notification_closed_listener
# [ RUN ] global.user_notification_child_pid_ns
# fter_ptrace
# [ FAIL ] TRACE_syscall.skip_after_ptrace
# [ RUN ] TRACE_syscall.kill_after_ptrace
# [ OK ] TRACE_syscall.kill_after_ptrace
# [ RUN ] global.seccomp_syscall
# [ OK ] global.seccomp_syscall
# [ RUN ] global.seccomp_syscall_mode_lock
# [ OK ] global.seccomp_syscall_mode_lock
# [ RUN ] global.detect_seccomp_filter_flags
# [ OK ] global.detect_seccomp_filter_flags
# [ RUN ] global.TSYNC_first
# [ OK ] global.TSYNC_first
# [ RUN ] TSYNC.siblings_fail_prctl
# [ OK ] TSYNC.siblings_fail_prctl
# [ RUN ] TSYNC.two_siblings_with_ancestor
# [ OK ] TSYNC.two_siblings_with_ancestor
# [ RUN ] TSYNC.two_sibling_want_nnp
# [ OK ] TSYNC.two_sibling_want_nnp
# [ RUN ] TSYNC.two_siblings_with_no_filter
# [ OK ] TSYNC.two_siblings_with_no_filter
# [ RUN ] TSYNC.two_siblings_with_one_divergence
# [ OK ] TSYNC.two_siblings_with_one_divergence
# [ RUN ] TSYNC.two_siblings_not_under_filter
# [ OK ] TSYNC.two_siblings_not_under_filter
# [ RUN ] global.syscall_restart
# [ OK ] global.syscall_restart
# [ RUN ] global.filter_flag_log
# [ OK ] global.filter_flag_log
# [ RUN ] global.get_action_avail
# [ OK ] global.get_action_avail
# [ RUN ] global.get_metadata
# [ OK ] global.get_metadata
# [ RUN ] global.user_notification_basic
# [ OK ] global.user_notification_basic
# [ RUN ] global.user_notification_kill_in_middle
# [ OK ] global.user_notification_kill_in_middle
# [ RUN ] global.user_notification_signal
# [ OK ] global.user_notification_signal
# [ RUN ] global.user_notification_closed_listener
# [ OK ] global.user_notification_closed_listener
# [ RUN ] global.user_notification_child_pid_ns
# [ OK ] global.user_notification_child_pid_ns
# [ RUN ] global.user_notification_sibling_pid_ns
# fter_ptrace
# [ FAIL ] TRACE_syscall.skip_after_ptrace
# [ RUN ] TRACE_syscall.kill_after_ptrace
# [ OK ] TRACE_syscall.kill_after_ptrace
# [ RUN ] global.seccomp_syscall
# [ OK ] global.seccomp_syscall
# [ RUN ] global.seccomp_syscall_mode_lock
# [ OK ] global.seccomp_syscall_mode_lock
# [ RUN ] global.detect_seccomp_filter_flags
# [ OK ] global.detect_seccomp_filter_flags
# [ RUN ] global.TSYNC_first
# [ OK ] global.TSYNC_first
# [ RUN ] TSYNC.siblings_fail_prctl
# [ OK ] TSYNC.siblings_fail_prctl
# [ RUN ] TSYNC.two_siblings_with_ancestor
# [ OK ] TSYNC.two_siblings_with_ancestor
# [ RUN ] TSYNC.two_sibling_want_nnp
# [ OK ] TSYNC.two_sibling_want_nnp
# [ RUN ] TSYNC.two_siblings_with_no_filter
# [ OK ] TSYNC.two_siblings_with_no_filter
# [ RUN ] TSYNC.two_siblings_with_one_divergence
# [ OK ] TSYNC.two_siblings_with_one_divergence
# [ RUN ] TSYNC.two_siblings_not_under_filter
# [ OK ] TSYNC.two_siblings_not_under_filter
# [ RUN ] global.syscall_restart
# [ OK ] global.syscall_restart
# [ RUN ] global.filter_flag_log
# [ OK ] global.filter_flag_log
# [ RUN ] global.get_action_avail
# [ OK ] global.get_action_avail
# [ RUN ] global.get_metadata
# [ OK ] global.get_metadata
# [ RUN ] global.user_notification_basic
# [ OK ] global.user_notification_basic
# [ RUN ] global.user_notification_kill_in_middle
# [ OK ] global.user_notification_kill_in_middle
# [ RUN ] global.user_notification_signal
# [ OK ] global.user_notification_signal
# [ RUN ] global.user_notification_closed_listener
# [ OK ] global.user_notification_closed_listener
# [ RUN ] global.user_notification_child_pid_ns
# [ OK ] global.user_notification_child_pid_ns
# [ RUN ] global.user_notification_sibling_pid_ns
# fter_ptrace
# [ FAIL ] TRACE_syscall.skip_after_ptrace
# [ RUN ] TRACE_syscall.kill_after_ptrace
# [ OK ] TRACE_syscall.kill_after_ptrace
# [ RUN ] global.seccomp_syscall
# [ OK ] global.seccomp_syscall
# [ RUN ] global.seccomp_syscall_mode_lock
# [ OK ] global.seccomp_syscall_mode_lock
# [ RUN ] global.detect_seccomp_filter_flags
# [ OK ] global.detect_seccomp_filter_flags
# [ RUN ] global.TSYNC_first
# [ OK ] global.TSYNC_first
# [ RUN ] TSYNC.siblings_fail_prctl
# [ OK ] TSYNC.siblings_fail_prctl
# [ RUN ] TSYNC.two_siblings_with_ancestor
# [ OK ] TSYNC.two_siblings_with_ancestor
# [ RUN ] TSYNC.two_sibling_want_nnp
# [ OK ] TSYNC.two_sibling_want_nnp
# [ RUN ] TSYNC.two_siblings_with_no_filter
# [ OK ] TSYNC.two_siblings_with_no_filter
# [ RUN ] TSYNC.two_siblings_with_one_divergence
# [ OK ] TSYNC.two_siblings_with_one_divergence
# [ RUN ] TSYNC.two_siblings_not_under_filter
# [ OK ] TSYNC.two_siblings_not_under_filter
# [ RUN ] global.syscall_restart
# [ OK ] global.syscall_restart
# [ RUN ] global.filter_flag_log
# [ OK ] global.filter_flag_log
# [ RUN ] global.get_action_avail
# [ OK ] global.get_action_avail
# [ RUN ] global.get_metadata
# [ OK ] global.get_metadata
# [ RUN ] global.user_notification_basic
# [ OK ] global.user_notification_basic
# [ RUN ] global.user_notification_kill_in_middle
# [ OK ] global.user_notification_kill_in_middle
# [ RUN ] global.user_notification_signal
# [ OK ] global.user_notification_signal
# [ RUN ] global.user_notification_closed_listener
# [ OK ] global.user_notification_closed_listener
# [ RUN ] global.user_notification_child_pid_ns
# [ OK ] global.user_notification_child_pid_ns
# [ RUN ] global.user_notification_sibling_pid_ns
# fter_ptrace
# [ FAIL ] TRACE_syscall.skip_after_ptrace
# [ RUN ] TRACE_syscall.kill_after_ptrace
# [ OK ] TRACE_syscall.kill_after_ptrace
# [ RUN ] global.seccomp_syscall
# [ OK ] global.seccomp_syscall
# [ RUN ] global.seccomp_syscall_mode_lock
# [ OK ] global.seccomp_syscall_mode_lock
# [ RUN ] global.detect_seccomp_filter_flags
# [ OK ] global.detect_seccomp_filter_flags
# [ RUN ] global.TSYNC_first
# [ OK ] global.TSYNC_first
# [ RUN ] TSYNC.siblings_fail_prctl
# [ OK ] TSYNC.siblings_fail_prctl
# [ RUN ] TSYNC.two_siblings_with_ancestor
# [ OK ] TSYNC.two_siblings_with_ancestor
# [ RUN ] TSYNC.two_sibling_want_nnp
# [ OK ] TSYNC.two_sibling_want_nnp
# [ RUN ] TSYNC.two_siblings_with_no_filter
# [ OK ] TSYNC.two_siblings_with_no_filter
# [ RUN ] TSYNC.two_siblings_with_one_divergence
# [ OK ] TSYNC.two_siblings_with_one_divergence
# [ RUN ] TSYNC.two_siblings_not_under_filter
# [ OK ] TSYNC.two_siblings_not_under_filter
# [ RUN ] global.syscall_restart
# [ OK ] global.syscall_restart
# [ RUN ] global.filter_flag_log
# [ OK ] global.filter_flag_log
# [ RUN ] global.get_action_avail
# [ OK ] global.get_action_avail
# [ RUN ] global.get_metadata
# [ OK ] global.get_metadata
# [ RUN ] global.user_notification_basic
# [ OK ] global.user_notification_basic
# [ RUN ] global.user_notification_kill_in_middle
# [ OK ] global.user_notification_kill_in_middle
# [ RUN ] global.user_notification_signal
# [ OK ] global.user_notification_signal
# [ RUN ] global.user_notification_closed_listener
# [ OK ] global.user_notification_closed_listener
# [ RUN ] global.user_notification_child_pid_ns
# [ OK ] global.user_notification_child_pid_ns
# [ RUN ] global.user_notification_sibling_pid_ns
# [ OK ] global.user_notification_sibling_pid_ns
# [ RUN ] global.user_notification_fault_recv
# fter_ptrace
# [ FAIL ] TRACE_syscall.skip_after_ptrace
# [ RUN ] TRACE_syscall.kill_after_ptrace
# [ OK ] TRACE_syscall.kill_after_ptrace
# [ RUN ] global.seccomp_syscall
# [ OK ] global.seccomp_syscall
# [ RUN ] global.seccomp_syscall_mode_lock
# [ OK ] global.seccomp_syscall_mode_lock
# [ RUN ] global.detect_seccomp_filter_flags
# [ OK ] global.detect_seccomp_filter_flags
# [ RUN ] global.TSYNC_first
# [ OK ] global.TSYNC_first
# [ RUN ] TSYNC.siblings_fail_prctl
# [ OK ] TSYNC.siblings_fail_prctl
# [ RUN ] TSYNC.two_siblings_with_ancestor
# [ OK ] TSYNC.two_siblings_with_ancestor
# [ RUN ] TSYNC.two_sibling_want_nnp
# [ OK ] TSYNC.two_sibling_want_nnp
# [ RUN ] TSYNC.two_siblings_with_no_filter
# [ OK ] TSYNC.two_siblings_with_no_filter
# [ RUN ] TSYNC.two_siblings_with_one_divergence
# [ OK ] TSYNC.two_siblings_with_one_divergence
# [ RUN ] TSYNC.two_siblings_not_under_filter
# [ OK ] TSYNC.two_siblings_not_under_filter
# [ RUN ] global.syscall_restart
# [ OK ] global.syscall_restart
# [ RUN ] global.filter_flag_log
# [ OK ] global.filter_flag_log
# [ RUN ] global.get_action_avail
# [ OK ] global.get_action_avail
# [ RUN ] global.get_metadata
# [ OK ] global.get_metadata
# [ RUN ] global.user_notification_basic
# [ OK ] global.user_notification_basic
# [ RUN ] global.user_notification_kill_in_middle
# [ OK ] global.user_notification_kill_in_middle
# [ RUN ] global.user_notification_signal
# [ OK ] global.user_notification_signal
# [ RUN ] global.user_notification_closed_listener
# [ OK ] global.user_notification_closed_listener
# [ RUN ] global.user_notification_child_pid_ns
# [ OK ] global.user_notification_child_pid_ns
# [ RUN ] global.user_notification_sibling_pid_ns
# [ OK ] global.user_notification_sibling_pid_ns
# [ RUN ] global.user_notification_fault_recv
# [ OK ] global.user_notification_fault_recv
# [ RUN ] global.seccomp_get_notif_sizes
# [ OK ] global.seccomp_get_notif_sizes
# [==========] 70 / 74 tests passed.
# [ FAILED ]
not ok 1 selftests: seccomp: seccomp_bpf




To reproduce:

# build kernel
cd linux
cp config-5.2.0-rc4-00289-gcd5bbb3047bf7 .config
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage

git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email



Thanks,
Rong Chen


Attachments:
(No filename) (28.77 kB)
config-5.2.0-rc4-00289-gcd5bbb3047bf7 (199.74 kB)
job-script (6.53 kB)
dmesg.xz (56.82 kB)
kernel_selftests (139.75 kB)
Download all attachments

2019-07-08 22:46:20

by Dmitry V. Levin

[permalink] [raw]
Subject: [PATCH] selftests/seccomp/seccomp_bpf: update for PTRACE_GET_SYSCALL_INFO

The syscall entry/exit is now exposed via PTRACE_GETEVENTMSG,
update the test accordingly.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Dmitry V. Levin <[email protected]>
---
tools/testing/selftests/seccomp/seccomp_bpf.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
index dc66fe852768..6ef7f16c4cf5 100644
--- a/tools/testing/selftests/seccomp/seccomp_bpf.c
+++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
@@ -1775,13 +1775,18 @@ void tracer_ptrace(struct __test_metadata *_metadata, pid_t tracee,
unsigned long msg;
static bool entry;

- /* Make sure we got an empty message. */
+ /*
+ * The traditional way to tell PTRACE_SYSCALL entry/exit
+ * is by counting.
+ */
+ entry = !entry;
+
+ /* Make sure we got an appropriate message. */
ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg);
EXPECT_EQ(0, ret);
- EXPECT_EQ(0, msg);
+ EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY
+ : PTRACE_EVENTMSG_SYSCALL_EXIT, msg);

- /* The only way to tell PTRACE_SYSCALL entry/exit is by counting. */
- entry = !entry;
if (!entry)
return;

--
ldv

2019-07-08 22:46:25

by Andy Lutomirski

[permalink] [raw]
Subject: Re: [PATCH] selftests/seccomp/seccomp_bpf: update for PTRACE_GET_SYSCALL_INFO

On Mon, Jul 8, 2019 at 11:29 AM Dmitry V. Levin <[email protected]> wrote:
>
> The syscall entry/exit is now exposed via PTRACE_GETEVENTMSG,
> update the test accordingly.

Reviewed-by: Andy Lutomirski <[email protected]>

2019-07-09 04:26:30

by Kees Cook

[permalink] [raw]
Subject: Re: [PATCH] selftests/seccomp/seccomp_bpf: update for PTRACE_GET_SYSCALL_INFO

On Mon, Jul 08, 2019 at 09:29:04PM +0300, Dmitry V. Levin wrote:
> The syscall entry/exit is now exposed via PTRACE_GETEVENTMSG,
> update the test accordingly.

Oh yes, thank you!

Acked-by: Kees Cook <[email protected]>

-Kees

>
> Reported-by: kernel test robot <[email protected]>
> Signed-off-by: Dmitry V. Levin <[email protected]>
> ---
> tools/testing/selftests/seccomp/seccomp_bpf.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c
> index dc66fe852768..6ef7f16c4cf5 100644
> --- a/tools/testing/selftests/seccomp/seccomp_bpf.c
> +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c
> @@ -1775,13 +1775,18 @@ void tracer_ptrace(struct __test_metadata *_metadata, pid_t tracee,
> unsigned long msg;
> static bool entry;
>
> - /* Make sure we got an empty message. */
> + /*
> + * The traditional way to tell PTRACE_SYSCALL entry/exit
> + * is by counting.
> + */
> + entry = !entry;
> +
> + /* Make sure we got an appropriate message. */
> ret = ptrace(PTRACE_GETEVENTMSG, tracee, NULL, &msg);
> EXPECT_EQ(0, ret);
> - EXPECT_EQ(0, msg);
> + EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY
> + : PTRACE_EVENTMSG_SYSCALL_EXIT, msg);
>
> - /* The only way to tell PTRACE_SYSCALL entry/exit is by counting. */
> - entry = !entry;
> if (!entry)
> return;
>
> --
> ldv

--
Kees Cook