el Ellerman
> Signed-off-by: Naveen N. Rao
Thanks for the fix.
Reviewed-by: Jiong Wang
Just two other comments during review in case I am wrong on somewhere.
- Use verifier_zext instead of bpf_jit_needs_zext() seems better, even
though the latter could avoid extending function arg
Michael Ellerman writes:
> "Naveen N. Rao" writes:
>> Since BPF constant blinding is performed after the verifier pass, there
>> are certain ALU32 instructions inserted which don't have a corresponding
>> zext instruction inserted after. This is causing a kernel oops on
>> powerpc and can be
Naveen N. Rao writes:
> Naveen N. Rao wrote:
>> Since BPF constant blinding is performed after the verifier pass, there
>> are certain ALU32 instructions inserted which don't have a corresponding
>> zext instruction inserted after. This is causing a kernel oops on
>> powerpc and can be
f-next, the zext optimization can
> be enabled for the fixed operations.
LGTM, thanks.
Acked-by: Jiong Wang
>
> Cc: Song Liu
> Cc: Jiong Wang
> Cc: Xi Wang
> Signed-off-by: Luke Nelson
> ---
> arch/riscv/net/bpf_jit_comp.c | 16
> 1 file changed
Luke Nelson writes:
> +
> +static int emit_insn(const struct bpf_insn *insn,
> + struct rv_jit_context *ctx,
> + bool extra_pass)
> +{
> + int rvoff, i = insn - ctx->prog->insnsi;
> + u8 code = insn->code;
> + s16 off = insn->off;
> + s32 imm =
Yauheni Kaliuta writes:
> Hi!
>
> Looks like the code:
>
>ALU_ARSH_X:
>DST = (u64) (u32) ((*(s32 *) ) >> SRC);
>CONT;
>ALU_ARSH_K:
>DST = (u64) (u32) ((*(s32 *) ) >> IMM);
>CONT;
>
> works incorrectly on BE arches
Luke Nelson writes:
> From: Luke Nelson
>
> This is an eBPF JIT for RV32G, adapted from the JIT for RV64G.
> Any feedback would be greatly appreciated.
>
> It passes 359 out of 378 tests in test_bpf.ko. The failing tests are
> features that are not supported right now:
> - ALU64 DIV/MOD:
>
Song Liu writes:
> On Thu, May 30, 2019 at 3:34 PM Luke Nelson wrote:
>>
>> On Thu, May 30, 2019 at 1:53 PM Song Liu wrote:
>> >
>> > This is a little messy. How about we introduce some helper function
>> > like:
>> >
>> > /* please find a better name... */
>> > emit_32_or_64(bool is64, const
Luke Nelson writes:
> This commit introduces tests that validate the upper 32 bits
> of the result of 32-bit BPF ALU operations.
>
> The existing tests for 32-bit operations do not check the upper 32
> bits of results because the exit instruction truncates the result.
> These tests perform a
> > * Should the kernel remove PACs when unwinding user stacks?
> >
> > This is simple to do, but it's arguably placing a policy in the kernel as
> > to
> > what we expect user stacks to look like. Regardless, userspace will have
> > to
> > perform this when unwinding with DWARF.
>>
>> Not
> > * Should the kernel remove PACs when unwinding user stacks?
> >
> > This is simple to do, but it's arguably placing a policy in the kernel as
> > to
> > what we expect user stacks to look like. Regardless, userspace will have
> > to
> > perform this when unwinding with DWARF.
>>
>> Not
11 matches
Mail list logo