From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
Cc: bpf@vger.kernel.org, daniel@iogearbox.net, jolsa@redhat.com
Subject: Re: [PATCH v2] bpf: s390: add JIT support for multi-function programs
Date: Tue, 27 Aug 2019 18:39:57 +0200 [thread overview]
Message-ID: <D9450184-3B41-4893-8485-4A578FAA0566@linux.ibm.com> (raw)
In-Reply-To: <20190827145307.7984-1-yauheni.kaliuta@redhat.com>
> Am 27.08.2019 um 16:53 schrieb Yauheni Kaliuta <yauheni.kaliuta@redhat.com>:
>
> @@ -1316,7 +1327,9 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
> {
> struct bpf_prog *tmp, *orig_fp = fp;
> struct bpf_binary_header *header;
> + struct s390_jit_data *jit_data;
> bool tmp_blinded = false;
> + bool extra_pass = false;
> struct bpf_jit jit;
> int pass;
>
> @@ -1335,6 +1348,22 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
> fp = tmp;
> }
>
> + jit_data = fp->aux->jit_data;
> + if (!jit_data) {
> + jit_data = kzalloc(sizeof(*jit_data), GFP_KERNEL);
> + if (!jit_data) {
> + fp = orig_fp;
> + goto out;
> + }
> + fp->aux->jit_data = jit_data;
> + }
> + if (jit_data->ctx.addrs) {
> + jit = jit_data->ctx;
> + header = jit_data->header;
> + extra_pass = true;
> + goto skip_init_ctx;
> + }
> +
I've noticed that I'm getting the following warning, presumably because
of the added goto skip_init_ctx:
linux/arch/s390/net/bpf_jit_comp.c: In function 'bpf_int_jit_compile':
linux/arch/s390/net/bpf_jit_comp.c:1406:3: warning: 'pass' may be used uninitialized in this function [-Wmaybe-uninitialized]
bpf_jit_dump(fp->len, jit.size, pass, jit.prg_buf);
Maybe set the initial value of pass to 1?
next prev parent reply other threads:[~2019-08-27 16:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 18:20 [RFC PATCH] bpf: s390: add JIT support for multi-function programs Yauheni Kaliuta
2019-08-27 13:21 ` Ilya Leoshkevich
2019-08-27 13:46 ` Ilya Leoshkevich
2019-08-27 14:21 ` Yauheni Kaliuta
2019-08-27 14:37 ` Ilya Leoshkevich
2019-08-27 14:48 ` Yauheni Kaliuta
2019-08-27 14:25 ` Yauheni Kaliuta
2019-08-27 14:46 ` Ilya Leoshkevich
2019-08-27 15:05 ` Yauheni Kaliuta
2019-08-27 14:53 ` [PATCH v2] " Yauheni Kaliuta
2019-08-27 16:39 ` Ilya Leoshkevich [this message]
2019-08-28 9:11 ` Ilya Leoshkevich
2019-08-28 18:28 ` [PATCH v3] " Yauheni Kaliuta
2019-08-29 8:52 ` Ilya Leoshkevich
2019-08-30 23:22 ` Daniel Borkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D9450184-3B41-4893-8485-4A578FAA0566@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jolsa@redhat.com \
--cc=yauheni.kaliuta@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox