[PATCH] bpf: fix error conversion from long unsigned int to unsigned int [-Werror=overflow]

Guillermo E. Martinez guillermo.e.martinez@oracle.com
Fri Jan 6 14:34:14 GMT 2023


On Fri, Jan 06, 2023 at 03:16:57PM +0100, Jose E. Marchesi wrote:
> 
> > Hi Guillermo.

Hi Jose,

> >
> >> cpu/
> >> 	* bpf.cpu (define-call-insn): Remove `src' field from
> >> 	instruction mask.
> >
> > I don't think this description accurately describes the real change?
> > You are basically adding an opcode for `src' to the instruction
> > format.
> 
> s/opcode/operand.

Correct!. I'll amend the change log. Thanks for pointing out it.

> 
> >
> >> diff --git a/cpu/bpf.cpu b/cpu/bpf.cpu
> >> index 13dde7094c8..2ae74fc4c18 100644
> >> --- a/cpu/bpf.cpu
> >> +++ b/cpu/bpf.cpu
> >> @@ -768,7 +768,7 @@
> >>         "call"
> >>         (endian-isas x-endian)
> >>         "call $disp32"
> >> -       (+ disp32 (f-offset16 0) (f-regs 0)
> >> +       (+ disp32 (f-offset16 0) (.sym src x-endian) ((.sym f-dst x-endian) 0)
> >>            OP_CLASS_JMP OP_SRC_K OP_CODE_CALL)
> >>         (c-call VOID
> >>                 "bpfbf_call" disp32 (ifield (.sym f-src x-endian)))
> >
> > The BPF side of the patch is OK.
> > Thanks!


More information about the Binutils mailing list