mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 07:35:10 +00:00
![]() 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 |
||
---|---|---|
.. | ||
libbpf | ||
standardization | ||
bpf_design_QA.rst | ||
bpf_devel_QA.rst | ||
bpf_iterators.rst | ||
bpf_licensing.rst | ||
bpf_prog_run.rst | ||
btf.rst | ||
clang-notes.rst | ||
classic_vs_extended.rst | ||
cpumasks.rst | ||
drgn.rst | ||
faq.rst | ||
graph_ds_impl.rst | ||
helpers.rst | ||
index.rst | ||
kfuncs.rst | ||
linux-notes.rst | ||
llvm_reloc.rst | ||
map_array.rst | ||
map_bloom_filter.rst | ||
map_cgroup_storage.rst | ||
map_cgrp_storage.rst | ||
map_cpumap.rst | ||
map_devmap.rst | ||
map_hash.rst | ||
map_lpm_trie.rst | ||
map_lru_hash_update.dot | ||
map_of_maps.rst | ||
map_queue_stack.rst | ||
map_sk_storage.rst | ||
map_sockmap.rst | ||
map_xskmap.rst | ||
maps.rst | ||
other.rst | ||
prog_cgroup_sockopt.rst | ||
prog_cgroup_sysctl.rst | ||
prog_flow_dissector.rst | ||
prog_lsm.rst | ||
prog_sk_lookup.rst | ||
programs.rst | ||
redirect.rst | ||
ringbuf.rst | ||
s390.rst | ||
syscall_api.rst | ||
test_debug.rst | ||
verifier.rst |