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: <CAEf4BzbQRNo5-=VK1odKSaKp9avumpz06xr4zBNzhkE+KPpd2w@mail.gmail.com>
Date:   Fri, 12 Jul 2019 12:55:56 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Ilya Leoshkevich <iii@...ux.ibm.com>
Cc:     bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
        gor@...ux.ibm.com, heiko.carstens@...ibm.com,
        Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>, Yonghong Song <yhs@...com>
Subject: Re: [PATCH bpf] selftests/bpf: fix attach_probe on s390

On Fri, Jul 12, 2019 at 6:42 AM Ilya Leoshkevich <iii@...ux.ibm.com> wrote:
>
> attach_probe test fails, because it cannot install a kprobe on a
> non-existent sys_nanosleep symbol.
>
> Use the correct symbol name for the nanosleep syscall on 64-bit s390.
> Don't bother adding one for 31-bit mode, since tests are compiled only
> in 64-bit mode.
>
> Fixes: 1e8611bbdfc9 ("selftests/bpf: add kprobe/uprobe selftests")
> Signed-off-by: Ilya Leoshkevich <iii@...ux.ibm.com>
> Acked-by: Vasily Gorbik <gor@...ux.ibm.com>
> ---

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

This arch-specific naming is very unfortunate. I'm thinking of doing
this automatically in libbpf to help usability.


>  tools/testing/selftests/bpf/prog_tests/attach_probe.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/attach_probe.c b/tools/testing/selftests/bpf/prog_tests/attach_probe.c
> index a4686395522c..47af4afc5013 100644
> --- a/tools/testing/selftests/bpf/prog_tests/attach_probe.c
> +++ b/tools/testing/selftests/bpf/prog_tests/attach_probe.c
> @@ -23,6 +23,8 @@ ssize_t get_base_addr() {
>
>  #ifdef __x86_64__
>  #define SYS_KPROBE_NAME "__x64_sys_nanosleep"
> +#elif defined(__s390x__)
> +#define SYS_KPROBE_NAME "__s390x_sys_nanosleep"
>  #else
>  #define SYS_KPROBE_NAME "sys_nanosleep"
>  #endif
> --
> 2.21.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ