From: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
To: Jiong Wang <jiong.wang@netronome.com>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
Jiri Benc <jbenc@redhat.com>,
bpf@vger.kernel.org
Subject: Re: ebpf: BPF_ALU32 | BPF_ARSH on BE arches
Date: Tue, 25 Jun 2019 13:41:34 +0300 [thread overview]
Message-ID: <xuny7e9aoskh.fsf@redhat.com> (raw)
In-Reply-To: <87ef3i9dbc.fsf@netronome.com> (Jiong Wang's message of "Tue, 25 Jun 2019 11:20:07 +0100")
Hi, Jiong!
>>>>> On Tue, 25 Jun 2019 11:20:07 +0100, Jiong Wang wrote:
> Yauheni Kaliuta writes:
>> Hi!
>>
>> Looks like the code:
>>
>> ALU_ARSH_X:
>> DST = (u64) (u32) ((*(s32 *) &DST) >> SRC);
>> CONT;
>> ALU_ARSH_K:
>> DST = (u64) (u32) ((*(s32 *) &DST) >> IMM);
>> CONT;
>>
>> works incorrectly on BE arches since it must operate on lower
>> parts of 64bit registers.
>>
>> See failure of test_verifier test 'arsh32 on imm 2' (#23 on
>> 5.2-rc6).
> Ah, thanks for reporting this.
> Should not taken the address directly, does the following fix resolved the
> failure?
> ALU_ARSH_X:
> DST = (u64) (u32) ((s32) DST) >> SRC);
> CONT;
> ALU_ARSH_K:
> DST = (u64) (u32) ((s32) DST) >> IMM);
> CONT;
Yes, thanks (just add the missing braces).
--
WBR,
Yauheni Kaliuta
prev parent reply other threads:[~2019-06-25 10:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 9:00 ebpf: BPF_ALU32 | BPF_ARSH on BE arches Yauheni Kaliuta
2019-06-25 10:20 ` Jiong Wang
2019-06-25 10:41 ` Yauheni Kaliuta [this message]
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=xuny7e9aoskh.fsf@redhat.com \
--to=yauheni.kaliuta@redhat.com \
--cc=bpf@vger.kernel.org \
--cc=jbenc@redhat.com \
--cc=jiong.wang@netronome.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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