public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ebpf: BPF_ALU32 | BPF_ARSH on BE arches
@ 2019-06-25  9:00 Yauheni Kaliuta
  2019-06-25 10:20 ` Jiong Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Yauheni Kaliuta @ 2019-06-25  9:00 UTC (permalink / raw)
  To: Jiong Wang; +Cc: linux-kernel, Jiri Olsa, Jiri Benc

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).


-- 
WBR,
Yauheni Kaliuta

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-25 10:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox