lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4Bzamp+H7ea28JhaCV2O+c=0nA8Dv1Cs4-4XiX1jOKuSztg@mail.gmail.com>
Date:   Fri, 26 Jun 2020 13:31:14 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     "Daniel T. Lee" <danieltimlee@...il.com>
Cc:     Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Yonghong Song <yhs@...com>, Martin KaFai Lau <kafai@...com>,
        Andrii Nakryiko <andriin@...com>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH 1/3] samples: bpf: fix bpf programs with
 kprobe/sys_connect event

On Fri, Jun 26, 2020 at 1:18 AM Daniel T. Lee <danieltimlee@...il.com> wrote:
>
> Currently, BPF programs with kprobe/sys_connect does not work properly.
>
> Commit 34745aed515c ("samples/bpf: fix kprobe attachment issue on x64")
> This commit modifies the bpf_load behavior of kprobe events in the x64
> architecture. If the current kprobe event target starts with "sys_*",
> add the prefix "__x64_" to the front of the event.
>
> Appending "__x64_" prefix with kprobe/sys_* event was appropriate as a
> solution to most of the problems caused by the commit below.
>
>     commit d5a00528b58c ("syscalls/core, syscalls/x86: Rename struct
>     pt_regs-based sys_*() to __x64_sys_*()")
>
> However, there is a problem with the sys_connect kprobe event that does
> not work properly. For __sys_connect event, parameters can be fetched
> normally, but for __x64_sys_connect, parameters cannot be fetched.
>
> Because of this problem, this commit fixes the sys_connect event by
> specifying the __sys_connect directly and this will bypass the
> "__x64_" appending rule of bpf_load.
>
> Fixes: 34745aed515c ("samples/bpf: fix kprobe attachment issue on x64")
> Signed-off-by: Daniel T. Lee <danieltimlee@...il.com>
> ---

Acked-by: Andrii Nakryiko <andriin@...com>

>  samples/bpf/map_perf_test_kern.c         | 2 +-
>  samples/bpf/test_map_in_map_kern.c       | 2 +-
>  samples/bpf/test_probe_write_user_kern.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ