lkml.org 
[lkml]   [2019]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectebpf: BPF_ALU32 | BPF_ARSH on BE arches
Date
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

\
 
 \ /
  Last update: 2019-06-25 11:01    [W:0.206 / U:13.772 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site