All of lore.kernel.org
 help / color / mirror / Atom feed
From: dthaler1968@googlemail.com
To: bpf@vger.kernel.org
Cc: Dave Thaler <dthaler@microsoft.com>
Subject: [PATCH 9/9] bpf, docs: Add note about reserved instruction
Date: Tue,  4 Oct 2022 22:47:45 +0000	[thread overview]
Message-ID: <20221004224745.1430-9-dthaler1968@googlemail.com> (raw)
In-Reply-To: <20221004224745.1430-1-dthaler1968@googlemail.com>

From: Dave Thaler <dthaler@microsoft.com>

Add note about reserved instruction

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
---
 Documentation/bpf/clang-notes.rst     | 5 +++++
 Documentation/bpf/instruction-set.rst | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/Documentation/bpf/clang-notes.rst b/Documentation/bpf/clang-notes.rst
index 528feddf2..40c618551 100644
--- a/Documentation/bpf/clang-notes.rst
+++ b/Documentation/bpf/clang-notes.rst
@@ -20,6 +20,11 @@ Arithmetic instructions
 For CPU versions prior to 3, Clang v7.0 and later can enable ``BPF_ALU`` support with
 ``-Xclang -target-feature -Xclang +alu32``.  In CPU version 3, support is automatically included.
 
+Reserved instructions
+====================
+
+Clang will generate the reserved ``BPF_CALL | BPF_X | BPF_JMP`` (0x8d) instruction if ``-O0`` is used.
+
 Atomic operations
 =================
 
diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst
index d0685a06f..72d59b3c6 100644
--- a/Documentation/bpf/instruction-set.rst
+++ b/Documentation/bpf/instruction-set.rst
@@ -301,6 +301,9 @@ with the remaining registers being ignored.  The definition of a helper function
 is responsible for specifying the type (e.g., integer, pointer, etc.) of the value returned,
 the number of arguments, and the type of each argument.
 
+Note that ``BPF_CALL | BPF_X | BPF_JMP`` (0x8d), where the helper function integer
+would be read from a specified register, is reserved and currently not permitted.
+
 Runtime functions
 ~~~~~~~~~~~~~~~~~
 Runtime functions are like helper functions except that they are not specific
-- 
2.33.4


  parent reply	other threads:[~2022-10-04 22:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-04 22:47 [PATCH 1/9] bpf, docs: Add note about type convention dthaler1968
2022-10-04 22:47 ` [PATCH 2/9] bpf, docs: Fix modulo zero, division by zero, overflow, and underflow dthaler1968
2022-10-04 22:47 ` [PATCH 3/9] bpf, docs: Use consistent names for the same field dthaler1968
2022-10-04 22:47 ` [PATCH 4/9] bpf, docs: Explain helper functions dthaler1968
2022-10-04 22:47 ` [PATCH 5/9] bpf, docs: Add appendix of all opcodes in order dthaler1968
2022-10-04 22:47 ` [PATCH 6/9] bpf, docs: Improve English readability dthaler1968
2022-10-04 22:47 ` [PATCH 7/9] bpf, docs: Add extended 64-bit immediate instructions dthaler1968
2022-10-04 22:47 ` [PATCH 8/9] bpf, docs: Add extended call instructions dthaler1968
2022-10-04 22:47 ` dthaler1968 [this message]
2022-10-05  9:54   ` [PATCH 9/9] bpf, docs: Add note about reserved instruction kernel test robot
2022-10-17 20:42 ` [PATCH 1/9] bpf, docs: Add note about type convention Dave Thaler
2022-10-17 21:41   ` Alexei Starovoitov
2022-10-17 23:16     ` Dave Thaler
2022-10-17 23:43       ` Alexei Starovoitov
2022-10-19 18:40         ` Dave Thaler

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=20221004224745.1430-9-dthaler1968@googlemail.com \
    --to=dthaler1968@googlemail.com \
    --cc=bpf@vger.kernel.org \
    --cc=dthaler@microsoft.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 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.