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] [day] [month] [year] [list]
Message-ID: <CAEf4BzYiFwFj5tLoi7j0wg1-KtyHTCsNOVtbXaR1JTzoH1LHyA@mail.gmail.com>
Date:   Thu, 29 Dec 2022 14:25:59 -0800
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 <martin.lau@...ux.dev>,
        Song Liu <song@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
        bpf@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [bpf-next v3 6/6] libbpf: fix invalid return address register in s390

On Fri, Dec 23, 2022 at 11:15 PM Daniel T. Lee <danieltimlee@...il.com> wrote:
>
> There is currently an invalid register mapping in the s390 return
> address register. As the manual[1] states, the return address can be
> found at r14. In bpf_tracing.h, the s390 registers were named
> gprs(general purpose registers). This commit fixes the problem by
> correcting the mistyped mapping.
>
> [1]: https://uclibc.org/docs/psABI-s390x.pdf#page=14
>
> Fixes: 3cc31d794097 ("libbpf: Normalize PT_REGS_xxx() macro definitions")
> Signed-off-by: Daniel T. Lee <danieltimlee@...il.com>
> ---
>  tools/lib/bpf/bpf_tracing.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
> index 2972dc25ff72..9c1b1689068d 100644
> --- a/tools/lib/bpf/bpf_tracing.h
> +++ b/tools/lib/bpf/bpf_tracing.h
> @@ -137,7 +137,7 @@ struct pt_regs___s390 {
>  #define __PT_PARM3_REG gprs[4]
>  #define __PT_PARM4_REG gprs[5]
>  #define __PT_PARM5_REG gprs[6]
> -#define __PT_RET_REG grps[14]
> +#define __PT_RET_REG gprs[14]

oh, wow, what a typo. Thanks for fixing this! Applied patch set to bpf-next.

>  #define __PT_FP_REG gprs[11]   /* Works only with CONFIG_FRAME_POINTER */
>  #define __PT_RC_REG gprs[2]
>  #define __PT_SP_REG gprs[15]
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ