[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E90007C4-0676-4FB5-B8CE-2A970B9096F9@fb.com>
Date: Tue, 16 Apr 2019 20:28:20 +0000
From: Song Liu <songliubraving@...com>
To: Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>
CC: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin Lau <kafai@...com>, Yonghong Song <yhs@...com>,
"prashantbhole.linux@...il.com" <prashantbhole.linux@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH bpf-next] bpf: use BPF_CAST_CALL for casting bpf call
> On Apr 16, 2019, at 2:13 AM, Prashant Bhole <bhole_prashant_q7@....ntt.co.jp> wrote:
>
> verifier.c uses BPF_CAST_CALL for casting bpf call except at one
> place in jit_subprogs(). Let's use the macro for consistency.
>
> Signed-off-by: Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>
Acked-by: Song Liu <songliubraving@...com>
> ---
> kernel/bpf/verifier.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index c7220153c5b1..db301e9b5295 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -7647,9 +7647,8 @@ static int jit_subprogs(struct bpf_verifier_env *env)
> insn->src_reg != BPF_PSEUDO_CALL)
> continue;
> subprog = insn->off;
> - insn->imm = (u64 (*)(u64, u64, u64, u64, u64))
> - func[subprog]->bpf_func -
> - __bpf_call_base;
> + insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
> + __bpf_call_base;
> }
>
> /* we use the aux data to keep a list of the start addresses
> --
> 2.17.2
>
>
Powered by blists - more mailing lists