linux/Documentation
Dave Thaler 0e133a1337 bpf, docs: Define signed modulo as using truncated division
There's different mathematical definitions (truncated, floored, rounded,
etc.) and different languages have chosen different definitions [0][1].
E.g., languages/libraries that follow Knuth use a different mathematical
definition than C uses. This patch specifies which definition BPF uses,
as verified by Eduard [2] and others.

  [0] https://en.wikipedia.org/wiki/Modulo#Variants_of_the_definition
  [1] https://torstencurdt.com/tech/posts/modulo-of-negative-numbers/
  [2] https://lore.kernel.org/bpf/57e6fefadaf3b2995bb259fa8e711c7220ce5290.camel@gmail.com/

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: David Vernet <void@manifault.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/bpf/20231017203020.1500-1-dthaler1968@googlemail.com
2023-10-19 01:36:12 +02:00
..
ABI - Core Frameworks 2023-09-04 13:52:58 -07:00
accel
accounting docs: psi: use correct config name 2023-07-31 09:54:17 -06:00
admin-guide bpf-next-for-netdev 2023-10-16 21:05:33 -07:00
arch arm64 fixes for -rc5 2023-10-06 07:46:25 -07:00
block Documentation work keeps chugging along; stuff for 6.6 includes: 2023-08-30 20:05:42 -07:00
bpf bpf, docs: Define signed modulo as using truncated division 2023-10-19 01:36:12 +02:00
cdrom
core-api printk changes for 6.6 2023-09-04 13:20:19 -07:00
cpu-freq
crypto
dev-tools LoongArch changes for v6.6 2023-09-08 12:16:52 -07:00
devicetree Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-10-12 17:07:34 -07:00
doc-guide
driver-api dpll: docs: add support for pin signal phase offset/adjust 2023-10-15 16:08:24 +01:00
fault-injection Documentation: Fix typos 2023-08-18 11:29:03 -06:00
fb Documentation: Fix typos 2023-08-18 11:29:03 -06:00
features LoongArch changes for v6.6 2023-09-08 12:16:52 -07:00
filesystems Changes since last update: 2023-10-05 20:47:47 -07:00
firmware_class
firmware-guide Documentation work keeps chugging along; stuff for 6.6 includes: 2023-08-30 20:05:42 -07:00
fpga
gpu drm ci for 6.6-rc1 2023-09-10 11:55:26 -07:00
hid HID: Add introduction about HID for non-kernel programmers 2023-08-07 13:24:36 +02:00
hwmon Documentation work keeps chugging along; stuff for 6.6 includes: 2023-08-30 20:05:42 -07:00
i2c media updates for v6.6-rc1 2023-09-01 12:21:32 -07:00
iio
images
infiniband
input input: docs: pxrc: remove reference to phoenix-sim 2023-08-28 12:43:32 -06:00
isdn
kbuild Documentation: kbuild: explain handling optional dependencies 2023-09-25 16:01:05 +09:00
kernel-hacking
leds
litmus-tests
livepatch Documentation: Fix typos 2023-08-18 11:29:03 -06:00
locking Documentation: Fix typos 2023-08-18 11:29:03 -06:00
maintainer Documentation work keeps chugging along; stuff for 6.6 includes: 2023-08-30 20:05:42 -07:00
mhi
misc-devices
mm Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
netlabel
netlink dpll: spec: add support for pin-dpll signal phase offset/adjust 2023-10-15 16:08:24 +01:00
networking bpf-next-for-netdev 2023-10-16 21:05:33 -07:00
nvdimm
nvme
PCI Merge branch 'pci/misc' 2023-08-29 11:03:57 -05:00
pcmcia
peci
power Documentation: Fix typos 2023-08-18 11:29:03 -06:00
powerpc powerpc updates for 6.6 2023-08-31 12:43:10 -07:00
process docs: try to encourage (netdev?) reviewers 2023-10-15 14:26:51 +01:00
RCU
riscv Merge patch series "RISC-V: Probe for misaligned access speed" 2023-09-08 11:24:12 -07:00
rust Documentation work keeps chugging along; stuff for 6.6 includes: 2023-08-30 20:05:42 -07:00
scheduler Documentation work keeps chugging along; stuff for 6.6 includes: 2023-08-30 20:05:42 -07:00
scsi SCSI misc on 20230902 2023-09-02 12:02:41 -07:00
security Documentation: Fix typos 2023-08-18 11:29:03 -06:00
sound ALSA: docs: Fix a typo of midi2_ump_probe option for snd-usb-audio 2023-09-12 10:00:46 +02:00
sphinx Documentation: Fix typos 2023-08-18 11:29:03 -06:00
sphinx-static
spi Documentation: Fix typos 2023-08-18 11:29:03 -06:00
staging
target
timers
tools rtla: fix a example in rtla-timerlat-hist.rst 2023-09-22 14:44:04 +02:00
trace Probes updates for v6.6: 2023-09-02 11:10:50 -07:00
translations docs/zh_CN/LoongArch: Update the links of ABI 2023-09-20 14:26:38 +08:00
usb USB / Thunderbolt / PHY driver update for 6.6-rc1 2023-09-01 09:23:34 -07:00
userspace-api Including fixes from netfilter and bpf. 2023-09-07 18:33:07 -07:00
virt ARM: 2023-09-07 13:52:20 -07:00
w1 Documentation: Fix typos 2023-08-18 11:29:03 -06:00
watchdog Documentation: Fix typos 2023-08-18 11:29:03 -06:00
wmi Documentation work keeps chugging along; stuff for 6.6 includes: 2023-08-30 20:05:42 -07:00
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
dontdiff
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst