All of lore.kernel.org
 help / color / mirror / Atom feed
* ISA: BPF_MSH and deprecated packet access instructions
@ 2024-01-27 18:50 ` dthaler1968=40googlemail.com
  0 siblings, 0 replies; 32+ messages in thread
From: dthaler1968 @ 2024-01-27 18:50 UTC (permalink / raw)
  To: 'Yonghong Song'; +Cc: bpf, bpf

Under "Load and store instructions", various mode modifiers are documented.
I notice that BPF_MSH (0xa0) is not documented, but appears to be in use in 
various projects, including Linux, BSD, seccomp, etc. and is even documented
in various books such as
https://www.google.com/books/edition/Programming_Linux_Hacker_Tools_Uncovere
d/yqHVAwAAQBAJ?hl=en&gbpv=1&dq=%22BPF_MSH%22&pg=PA129&printsec=frontcover

Should we document it as deprecated and add it to the set of deprecated
instructions (the legacy conformance group) like BPF_ABS and BPF_IND
already are?

Also, for purposes of the IANA registry of instructions where we list which
opcodes are "(deprecated, implementation-specific)", I currently list all
possible BPF_ABS and BPF_IND opcodes regardless of whether they were
ever used (I didn't check which were used and which might not have been),
so I could just list all possible BPF_MSH opcodes similarly.  But if we know
that some were never used then I don't need to do so, so I guess I should
ask:
do we have a list of which combinations were actually used or should we
continue to just deprecate all combinations?

As an example,
https://github.com/seccomp/libseccomp/blob/main/tools/scmp_bpf_disasm.c#L68
lists 6 variants of BPF_MSH: LD and LDX, for B, H, and W (but not DW).
Other sources like the book page referenced above, and the BSD man page,
list only BPF_LDX | BPF_B | BPF_MSH, which is in Linux sources such as
https://elixir.bootlin.com/linux/v6.8-rc1/source/lib/test_bpf.c#L368

So, should we list the DW variants as deprecated, or never assigned?
Should we list the H, W, and LD variants as deprecated, or never assigned?

What about DW and LDX variants of BPF_IND and BPF_ABS?

Dave



^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2024-01-30 19:40 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-27 18:50 ISA: BPF_MSH and deprecated packet access instructions dthaler1968
2024-01-27 18:50 ` [Bpf] " dthaler1968=40googlemail.com
2024-01-27 18:59 ` Jose E. Marchesi
2024-01-27 18:59   ` Jose E. Marchesi
2024-01-27 19:06   ` Jose E. Marchesi
2024-01-27 19:06     ` Jose E. Marchesi
2024-01-28  6:59     ` dthaler1968
2024-01-28  6:59       ` dthaler1968=40googlemail.com
2024-01-28 23:59       ` Alexei Starovoitov
2024-01-28 23:59         ` Alexei Starovoitov
2024-01-29 12:07         ` Jose E. Marchesi
2024-01-29 12:07           ` Jose E. Marchesi
2024-01-30 12:13           ` Jose E. Marchesi
2024-01-30 12:13             ` Jose E. Marchesi
2024-01-30 15:51         ` dthaler1968
2024-01-30 15:51           ` dthaler1968=40googlemail.com
2024-01-30 16:22           ` Alexei Starovoitov
2024-01-30 16:22             ` Alexei Starovoitov
2024-01-30 16:42             ` dthaler1968
2024-01-30 16:42               ` dthaler1968=40googlemail.com
2024-01-30 16:39           ` dthaler1968
2024-01-30 16:39             ` dthaler1968=40googlemail.com
2024-01-30 18:39             ` Yonghong Song
2024-01-30 18:39               ` Yonghong Song
2024-01-30 19:40             ` Alexei Starovoitov
2024-01-30 19:40               ` Alexei Starovoitov
2024-01-28  0:26 ` Yonghong Song
2024-01-28  0:26   ` [Bpf] " Yonghong Song
2024-01-28  0:53   ` dthaler1968
2024-01-28  0:53     ` [Bpf] " dthaler1968=40googlemail.com
2024-01-28  1:24     ` Yonghong Song
2024-01-28  1:24       ` [Bpf] " Yonghong Song

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.