Re: [Bpf] [PATCH bpf-next v2] bpf, docs: Add callx instructions in new conformance group

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2/12/24 5:18 PM, dthaler1968@xxxxxxxxxxxxxx wrote:
-----Original Message-----
From: Yonghong Song <yonghong.song@xxxxxxxxx>
Sent: Monday, February 12, 2024 2:49 PM
To: dthaler1968@xxxxxxxxxxxxxx; 'Jose E. Marchesi'
<jose.marchesi@xxxxxxxxxx>; 'Dave Thaler'
<dthaler1968=40googlemail.com@xxxxxxxxxxxxxx>
Cc: bpf@xxxxxxxxxxxxxxx; bpf@xxxxxxxx
Subject: Re: [Bpf] [PATCH bpf-next v2] bpf, docs: Add callx instructions in new
conformance group


On 2/12/24 1:52 PM, dthaler1968@xxxxxxxxxxxxxx wrote:
-----Original Message-----
From: Yonghong Song <yonghong.song@xxxxxxxxx>
Sent: Monday, February 12, 2024 1:49 PM
To: Jose E. Marchesi <jose.marchesi@xxxxxxxxxx>; Dave Thaler
<dthaler1968=40googlemail.com@xxxxxxxxxxxxxx>
Cc: bpf@xxxxxxxxxxxxxxx; bpf@xxxxxxxx; Dave Thaler
<dthaler1968@xxxxxxxxx>
Subject: Re: [Bpf] [PATCH bpf-next v2] bpf, docs: Add callx
instructions in new conformance group


On 2/12/24 1:28 PM, Jose E. Marchesi wrote:
+BPF_CALL  0x8    0x1  call PC += reg_val(imm)          BPF_JMP | BPF_X
only, see `Program-local functions`_
If the instruction requires a register operand, why not using one of
the register fields?  Is there any reason for not doing that?
Talked to Alexei and we think using dst_reg for the register for
callx insn is better. I will craft a llvm patch for this today. Thanks!
Why dst_reg instead of src_reg?
BPF_X is supposed to mean use src_reg.
Let us use dst_reg. Currently, for BPF_K, we have src_reg for a bunch of flags
(pseudo call, kfunc call, etc.). So for BPF_X, let us preserve this property as
well in case in the future we will introduce variants for callx.
Ah yes, that makes sense.

The following is the llvm diff:

https://github.com/llvm/llvm-project/pull/81546
Which llvm release is it targeted for?
18.1.0-rc3? 18.1.1?  later?

llvm19


But this thread is about reserving/documenting the existing practice,
since anyone trying to use it would run into interop issues because
of existing clang.   Should we document both and list one as deprecated?
I think just documenting the new encoding is good enough. But other
people can chime in just in case that I missed something.
Ok.

Dave





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux