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

Jose E. Marchesi jose.marchesi@oracle.com
Fri Jan 6 14:16:57 GMT 2023


> Hi Guillermo.
>
>> 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.

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