From: Yonghong Song <yonghong.song@linux.dev>
To: dthaler1968@googlemail.com
Cc: bpf@ietf.org, bpf@vger.kernel.org
Subject: Re: Jump instructions clarification
Date: Wed, 24 Jan 2024 11:33:12 -0800 [thread overview]
Message-ID: <9d077ed4-6a30-49db-8160-83d8c525ff3e@linux.dev> (raw)
In-Reply-To: <1fc001da4e6a$2848cad0$78da6070$@gmail.com>
On 1/23/24 6:07 PM, dthaler1968@googlemail.com wrote:
> Hi Yonghong,
>
> The MOVSX clarification is now merged, but I just found another similar question for you
> regarding jump instructions.
>
> For BPF_CALL (same question for src=0, src=1, and src=2),
> are both BPF_JMP and BPF_JMP32 legal? If so, is there a semantic difference?
> If not, then again I think the doc needs clarification.
BPF_CALL with BPF_JMP32 is illegal. This is true for src=0/1/2.
>
> BPF_JA's use of imm already has a note that it's BPF_JMP32 class only,
> but what about BPF_CALL's use of imm?
The imm field of BPF_CALL insn is used for call target.
>
> Similarly about comparisons like BPF_JEQ etc when BPF_K is set.
> E.g., is BPF_JEQ | BPF_K | BPF_JMP permitted? The document currently
> has no restriction against it, but if it's permitted, the meaning is not explained.
Yes, it is permetted. It represents a 64bit reg compared to an imm.
>
> Dave
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Yonghong Song <yonghong.song@linux.dev>
To: dthaler1968@googlemail.com
Cc: bpf@ietf.org, bpf@vger.kernel.org
Subject: Re: [Bpf] Jump instructions clarification
Date: Wed, 24 Jan 2024 11:33:12 -0800 [thread overview]
Message-ID: <9d077ed4-6a30-49db-8160-83d8c525ff3e@linux.dev> (raw)
Message-ID: <20240124193312.qo83_Mvi1PvUUCSglx-OH3hlrTz12AZVppKxAn81kSo@z> (raw)
In-Reply-To: <1fc001da4e6a$2848cad0$78da6070$@gmail.com>
On 1/23/24 6:07 PM, dthaler1968@googlemail.com wrote:
> Hi Yonghong,
>
> The MOVSX clarification is now merged, but I just found another similar question for you
> regarding jump instructions.
>
> For BPF_CALL (same question for src=0, src=1, and src=2),
> are both BPF_JMP and BPF_JMP32 legal? If so, is there a semantic difference?
> If not, then again I think the doc needs clarification.
BPF_CALL with BPF_JMP32 is illegal. This is true for src=0/1/2.
>
> BPF_JA's use of imm already has a note that it's BPF_JMP32 class only,
> but what about BPF_CALL's use of imm?
The imm field of BPF_CALL insn is used for call target.
>
> Similarly about comparisons like BPF_JEQ etc when BPF_K is set.
> E.g., is BPF_JEQ | BPF_K | BPF_JMP permitted? The document currently
> has no restriction against it, but if it's permitted, the meaning is not explained.
Yes, it is permetted. It represents a 64bit reg compared to an imm.
>
> Dave
>
>
--
Bpf mailing list
Bpf@ietf.org
https://www.ietf.org/mailman/listinfo/bpf
next prev parent reply other threads:[~2024-01-24 19:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 20:38 [Bpf] Sign extension ISA question dthaler1968=40googlemail.com
2024-01-16 20:55 ` dthaler1968
2024-01-16 20:55 ` [Bpf] " dthaler1968=40googlemail.com
2024-01-16 22:34 ` Yonghong Song
2024-01-16 22:34 ` [Bpf] " Yonghong Song
2024-01-17 1:56 ` dthaler1968
2024-01-17 1:56 ` [Bpf] " dthaler1968=40googlemail.com
2024-01-17 3:48 ` Yonghong Song
2024-01-17 3:48 ` [Bpf] " Yonghong Song
2024-01-24 2:07 ` Jump instructions clarification dthaler1968
2024-01-24 2:07 ` [Bpf] " dthaler1968=40googlemail.com
2024-01-24 19:33 ` Yonghong Song [this message]
2024-01-24 19:33 ` Yonghong Song
2024-01-26 1:12 ` 64-bit immediate " dthaler1968
2024-01-26 1:12 ` [Bpf] " dthaler1968=40googlemail.com
2024-01-26 5:34 ` Yonghong Song
2024-01-26 5:34 ` [Bpf] " Yonghong Song
2024-01-26 22:27 ` dthaler1968
2024-01-26 22:27 ` [Bpf] " dthaler1968=40googlemail.com
2024-01-27 3:41 ` Yonghong Song
2024-01-27 3:41 ` [Bpf] " Yonghong Song
2024-01-27 6:56 ` dthaler1968
2024-01-27 6:56 ` [Bpf] " dthaler1968=40googlemail.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9d077ed4-6a30-49db-8160-83d8c525ff3e@linux.dev \
--to=yonghong.song@linux.dev \
--cc=bpf@ietf.org \
--cc=bpf@vger.kernel.org \
--cc=dthaler1968@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).