Documentation: Enhance readability in BPF docs
Subsystems (3)
PATCH 1/1 Documentation: Enhance readability in BPF docs
The phrase "dividing -1" is one I find confusing. E.g., "INT_MIN dividing -1" sounds like "-1 / INT_MIN" rather than the inverse. "divided by" instead of "dividing" assuming the inverse is meant.
--- Documentation/bpf/standardization/instruction-set.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/bpf/standardization/instruction-set.rst +2 -2
@@ -350,8 +350,8 @@ Underflow and overflow are allowed during arithmetic operations, meaning the 64-bit or 32-bit value will wrap. If BPF program execution would result in division by zero, the destination register is instead set to zero. Otherwise, for ``ALU64``, if execution would result in ``LLONG_MIN`` -dividing -1, the destination register is instead set to ``LLONG_MIN``. For -``ALU``, if execution would result in ``INT_MIN`` dividing -1, the +divided by -1, the destination register is instead set to ``LLONG_MIN``. For +``ALU``, if execution would result in ``INT_MIN`` divided by -1, the destination register is instead set to ``INT_MIN``. If execution would result in modulo by zero, for ``ALU64`` the value of
Signature · 1 line
2.43.0
Quoted 5 lines · Eslam Khafagy
The phrase "dividing -1" is one I find confusing. E.g., "
INT_MINdividing -1" sounds like "-1 /INT_MIN" rather than the inverse. "divided by" instead of "dividing" assuming the inverse is meant.Signed-off-by Eslam Khafagy <[email protected]>
Quoted 19 lines
--- Documentation/bpf/standardization/instruction-set.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Documentation/bpf/standardization/instruction-set.rst +2
-2@@ -350,8 +350,8 @@ Underflow and overflow are allowed during arithmetic operations, meaning the 64-bit or 32-bit value will wrap. If BPF program execution would result in division by zero, the destination register is instead set to zero. Otherwise, for ``ALU64``, if execution would result in ``LLONG_MIN`` -dividing -1, the destination register is instead set to ``LLONG_MIN``. For -``ALU``, if execution would result in ``INT_MIN`` dividing -1, the +divided by -1, the destination register is instead set to ``LLONG_MIN``. For +``ALU``, if execution would result in ``INT_MIN`` divided by -1, the destination register is instead set to ``INT_MIN``. If execution would result in modulo by zero, for ``ALU64`` the value of
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Quoted 8 lines · On Sun, 8 Jun 2025 01:24:25 +0300 you wrote:
The phrase "dividing -1" is one I find confusing. E.g., "
INT_MINdividing -1" sounds like "-1 /INT_MIN" rather than the inverse. "divided by" instead of "dividing" assuming the inverse is meant.Signed-off-by Eslam Khafagy <[email protected]>--- Documentation/bpf/standardization/instruction-set.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Here is the summary with links:
- [bpf-next] Documentation: Enhance readability in BPF docs
https://git.kernel.org/bpf/bpf-next/c/c9b03a11005f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html