android_kernel_sony_sdm845/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Borkmann dee4927b46 UPSTREAM: bpf: add BPF_J{LT,LE,SLT,SLE} instructions
Currently, eBPF only understands BPF_JGT (>), BPF_JGE (>=),
BPF_JSGT (s>), BPF_JSGE (s>=) instructions, this means that
particularly *JLT/*JLE counterparts involving immediates need
to be rewritten from e.g. X < [IMM] by swapping arguments into
[IMM] > X, meaning the immediate first is required to be loaded
into a register Y := [IMM], such that then we can compare with
Y > X. Note that the destination operand is always required to
be a register.

This has the downside of having unnecessarily increased register
pressure, meaning complex program would need to spill other
registers temporarily to stack in order to obtain an unused
register for the [IMM]. Loading to registers will thus also
affect state pruning since we need to account for that register
use and potentially those registers that had to be spilled/filled
again. As a consequence slightly more stack space might have
been used due to spilling, and BPF programs are a bit longer
due to extra code involving the register load and potentially
required spill/fills.

Thus, add BPF_JLT (<), BPF_JLE (<=), BPF_JSLT (s<), BPF_JSLE (s<=)
counterparts to the eBPF instruction set. Modifying LLVM to
remove the NegateCC() workaround in a PoC patch at [1] and
allowing it to also emit the new instructions resulted in
cilium's BPF programs that are injected into the fast-path to
have a reduced program length in the range of 2-3% (e.g.
accumulated main and tail call sections from one of the object
file reduced from 4864 to 4729 insns), reduced complexity in
the range of 10-30% (e.g. accumulated sections reduced in one
of the cases from 116432 to 88428 insns), and reduced stack
usage in the range of 1-5% (e.g. accumulated sections from one
of the object files reduced from 824 to 784b).

The modification for LLVM will be incorporated in a backwards
compatible way. Plan is for LLVM to have i) a target specific
option to offer a possibility to explicitly enable the extension
by the user (as we have with -m target specific extensions today
for various CPU insns), and ii) have the kernel checked for
presence of the extensions and enable them transparently when
the user is selecting more aggressive options such as -march=native
in a bpf target context. (Other frontends generating BPF byte
code, e.g. ply can probe the kernel directly for its code
generation.)

  [1] https://github.com/borkmann/llvm/tree/bpf-insns

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
2026-05-15 17:55:05 +07:00
..
842
crypto lib/crypto: blake2s: move hmac construction into wireguard 2022-06-25 11:45:02 +02:00
fonts Fonts: Replace discarded const qualifier 2020-11-10 10:24:02 +01:00
lz4 lz4: fix bogus gcc warning 2017-09-02 07:07:54 +02:00
lzo
mpi Merge branch 'android-4.9-q' of https://android.googlesource.com/kernel/common into HEAD 2020-06-30 02:33:58 +03:00
raid6 lib/raid6/test: fix multiple definition linking error 2022-04-20 09:06:30 +02:00
reed_solomon rslib: Fix handling of of caller provided syndrome 2019-08-04 09:33:23 +02:00
vdso ANDROID: clock_gettime(CLOCK_BOOTTIME,) slows down >20x 2020-06-30 02:50:11 +03:00
xz lib/xz: Validate the value before assigning it to an enum variable 2021-11-26 11:48:30 +01:00
zlib_deflate
zlib_inflate lib/zlib: remove outdated and incorrect pre-increment optimization 2020-06-30 15:38:29 -04:00
zstd UPSTREAM: lib: Add zstd modules 2018-08-23 12:05:06 -07:00
.gitignore
argv_split.c
asn1_decoder.c ASN.1: check for error from ASN1_OP_END__ACT actions 2017-12-14 09:28:12 +01:00
assoc_array.c assoc_array: Fix BUG_ON during garbage collect 2022-06-06 08:19:46 +02:00
atomic64.c locking/atomic: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}() 2016-06-16 10:48:32 +02:00
atomic64_test.c atomic64: no need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE 2016-10-07 18:46:30 -07:00
audit.c
bcd.c
bch.c
bitmap.c bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free() 2020-01-29 10:24:41 +01:00
bitrev.c
bsearch.c kprobes: Prohibit probing on bsearch() 2019-04-05 22:29:11 +02:00
btree.c
bug.c UPSTREAM: bug: use %pB in BUG and stack protector failure 2019-03-28 21:13:06 -07:00
build_OID_registry
bust_spinlocks.c
chacha.c BACKPORT, FROMGIT: crypto: chacha - add XChaCha12 support 2018-12-13 09:34:58 -08:00
check_signature.c
checksum.c
clz_ctz.c
clz_tab.c
cmdline.c lib/cmdline.c: fix get_options() overflow while parsing ranges 2017-06-29 13:00:28 +02:00
compat_audit.c
cordic.c
cpu-notifier-error-inject.c fault-injection/cpu: Convert to hotplug state machine 2016-09-19 21:44:31 +02:00
cpu_rmap.c
cpumask.c sched/fair, cpumask: Export for_each_cpu_wrap() 2017-07-21 07:42:23 +02:00
crc-ccitt.c
crc-itu-t.c
crc-t10dif.c
crc7.c
crc8.c
crc16.c
crc32.c lib/crc32.c: fix trivial typo in preprocessor condition 2020-10-29 09:05:39 +01:00
crc32defs.h
ctype.c
debug_info.c
debug_locks.c locking/lockdep: Fix debug_locks off performance problem 2018-11-13 11:16:48 -08:00
debugobjects.c debugobjects: avoid recursive calls with kmemleak 2018-12-17 09:38:35 +01:00
dec_and_lock.c
decompress.c
decompress_bunzip2.c
decompress_inflate.c
decompress_unlz4.c lib/decompress_unlz4.c: correctly handle zero-padding around initrds. 2021-07-20 16:21:12 +02:00
decompress_unlzma.c
decompress_unlzo.c
decompress_unxz.c lib/xz: Avoid overlapping memcpy() with invalid input with in-place decompression 2021-11-26 11:48:30 +01:00
devres.c devres: allow const resource arguments 2020-01-29 10:24:28 +01:00
digsig.c This is the 4.9.59 stable release 2017-10-30 09:27:09 +01:00
div64.c lib/div64.c: off by one in shift 2019-04-20 09:07:54 +02:00
dma-debug.c dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC 2022-06-14 16:52:29 +02:00
dma-noop.c dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
dump_stack.c dump_stack: avoid the livelock of the dump_lock 2019-11-12 19:15:43 +01:00
dynamic_debug.c dyndbg: let query-modname override actual module name 2022-10-26 13:15:43 +02:00
dynamic_queue_limits.c
earlycpio.c lib/cpio: Make find_cpio_data()'s offset arg optional 2016-06-08 11:04:19 +02:00
extable.c
fault-inject.c
fdt.c
fdt_empty_tree.c
fdt_ro.c
fdt_rw.c
fdt_strerror.c
fdt_sw.c
fdt_wip.c
find_bit.c uapi: rename ext2_swab() to swab() and share globally in swab.h 2022-06-25 11:45:14 +02:00
flex_array.c
flex_proportions.c
gcd.c lib/GCD.c: use binary GCD algorithm instead of Euclidean 2016-05-20 17:58:30 -07:00
gen_crc32table.c
genalloc.c lib/genalloc: fix the overflow when size is too big 2021-01-12 19:49:01 +01:00
glob.c
halfmd4.c
hexdump.c hex2bin: fix access beyond string end 2022-05-12 12:14:54 +02:00
hweight.c x86/hweight: Get rid of the special calling convention 2016-06-08 15:01:02 +02:00
idr.c ida: don't use BUG_ON() for debugging 2022-07-12 16:26:25 +02:00
inflate.c
int_sqrt.c lib/int_sqrt: optimize initial value compute 2019-04-05 22:29:04 +02:00
interval_tree.c
interval_tree_test.c lib/interval_tree_test.c: allow users to limit scope of endpoint 2018-12-21 14:11:30 +01:00
iomap.c lib: iomap: Add MSM RTB support 2016-09-26 15:03:43 -07:00
iomap_copy.c
iommu-common.c
iommu-helper.c lib/iommu-helper: skip to next segment 2016-08-02 19:35:07 -04:00
ioremap.c ioremap: Update pgtable free interfaces with addr 2018-08-17 20:59:29 +02:00
iov_iter.c lib/iov_iter: initialize "flags" in new pipe_buffer 2022-02-23 11:56:41 +01:00
irq_poll.c This adds a new gcc plugin named "latent_entropy". It is designed to 2016-10-15 10:03:15 -07:00
irq_regs.c
is_single_threaded.c
jedec_ddr_data.c
kasprintf.c
Kconfig Merge remote-tracking branch 'common/android-4.9-q' into android12-4.9-sdm845 2022-03-31 22:52:51 +03:00
Kconfig.debug BACKPORT: locking/refcount: Create unchecked atomic_t implementation 2026-05-15 17:54:59 +07:00
Kconfig.kasan mm, kasan: switch SLUB to stackdepot, enable memory quarantine for SLUB 2016-07-28 16:07:41 -07:00
Kconfig.kgdb kgdb: depends on VT 2016-05-23 17:04:14 -07:00
Kconfig.kmemcheck
Kconfig.ubsan ubsan: allow to disable the null sanitizer 2016-09-20 14:26:08 +02:00
kfifo.c Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()" 2020-01-29 10:24:30 +01:00
klist.c scsi: klist: Make it safe to use klists in atomic context 2018-10-03 17:01:45 -07:00
kobject.c kobject: Export kobject_get_unless_zero() 2020-01-14 20:04:25 +01:00
kobject_uevent.c kobject_uevent: remove warning in init_uevent_argv() 2021-05-22 10:40:33 +02:00
kstrtox.c lib/kstrtox.c: smaller _parse_integer() 2016-10-11 15:06:30 -07:00
kstrtox.h
lcm.c
libcrc32c.c crypto: Work around deallocated stack frame reference gcc bug on sparc. 2017-06-24 07:11:17 +02:00
list_debug.c Merge android-4.9.129 (b727d1c) into msm-4.9 2018-11-07 13:12:49 +08:00
list_sort.c
llist.c
locking-selftest-hardirq.h
locking-selftest-mutex.h
locking-selftest-rlock-hardirq.h
locking-selftest-rlock-softirq.h
locking-selftest-rlock.h
locking-selftest-rsem.h
locking-selftest-softirq.h
locking-selftest-spin-hardirq.h
locking-selftest-spin-softirq.h
locking-selftest-spin.h
locking-selftest-wlock-hardirq.h
locking-selftest-wlock-softirq.h
locking-selftest-wlock.h
locking-selftest-wsem.h
locking-selftest.c locking/selftest: Fix output since KERN_CONT changes 2016-11-25 07:12:19 +01:00
lockref.c
lru_cache.c
Makefile BACKPORT: locking/refcount: Create unchecked atomic_t implementation 2026-05-15 17:54:59 +07:00
md5.c
memory-notifier-error-inject.c
memweight.c
net_utils.c
netdev-notifier-error-inject.c
nlattr.c net: fix nla_strcmp to handle more then one trailing null character 2022-06-14 16:52:38 +02:00
nmi_backtrace.c nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
nodemask.c nodemask: Fix return values to be unsigned 2022-06-14 16:52:40 +02:00
notifier-error-inject.c lib/notifier-error-inject: fix error when writing -errno to debugfs file 2023-01-07 12:07:14 +01:00
notifier-error-inject.h
of-reconfig-notifier-error-inject.c
oid_registry.c 509: fix printing uninitialized stack memory when OID is empty 2018-02-25 11:05:48 +01:00
once.c
parser.c
pci_iomap.c
percpu-refcount.c percpu-refcount: init ->confirm_switch member properly 2016-08-11 13:52:23 -04:00
percpu_counter.c percpu_counter: update debugobjects fixup callbacks return type 2016-05-19 19:12:14 -07:00
percpu_ida.c
percpu_test.c
plist.c
pm-notifier-error-inject.c
qmi_encdec.c soc: qcom: qmi_encdec: Restrict string length in decode 2019-03-05 16:21:06 +05:30
qmi_encdec_priv.h soc: qcom: Add snapshot of QMI 2016-11-11 17:31:37 -08:00
radix-tree.c Revert "radix tree test suite: fix compilation" 2016-12-09 10:41:42 -08:00
random32.c random: replace custom notifier chain with standard one 2022-06-25 11:45:11 +02:00
ratelimit.c ratelimit: Fix data-races in ___ratelimit(). 2022-09-05 10:23:55 +02:00
rational.c
rbtree.c rbtree: cache leftmost node internally 2022-01-27 08:47:42 +01:00
rbtree_test.c lib/rbtree-test: lower default params 2018-12-21 14:11:30 +01:00
reciprocal_div.c
refcount.c BACKPORT: locking/refcount: Create unchecked atomic_t implementation 2026-05-15 17:54:59 +07:00
rhashtable.c rhashtable: add schedule points 2018-10-18 09:13:24 +02:00
sbitmap.c sbitmap: initialize weight to zero 2016-09-19 08:19:40 -06:00
scatterlist.c lib/scatterlist.c: adjust indentation in __sg_alloc_table 2020-02-28 15:42:41 +01:00
seq_buf.c seq_buf: Fix overflow in seq_buf_putmem_hex() 2021-07-20 16:21:09 +02:00
sg_pool.c lib: scatterlist: move SG pool code from SCSI driver to lib/sg_pool.c 2016-04-15 16:53:14 -04:00
sg_split.c
sha1.c lib/crypto: sha1: re-roll loops to reduce code size 2022-06-25 11:45:02 +02:00
show_mem.c
siphash.c siphash: use one source of truth for siphash permutations 2022-06-25 11:45:14 +02:00
smp_processor_id.c
sort.c
stackdepot.c lib: stackdepot: turn depot_lock spinlock to raw_spinlock 2021-05-22 10:40:34 +02:00
stmp_device.c
string.c Merge remote-tracking branch 'common/android-4.9-q' into lineage-18.1-caf-sdm845 2021-09-16 19:05:49 +03:00
string_helpers.c string_helpers: add kstrdup_quotable_file 2016-04-21 10:47:26 +10:00
strncpy_from_user.c BACKPORT: make 'user_access_begin()' do 'access_ok()' 2026-02-04 00:23:05 +02:00
strnlen_user.c BACKPORT: make 'user_access_begin()' do 'access_ok()' 2026-02-04 00:23:05 +02:00
swiotlb.c swiotlb: skip swiotlb_bounce when orig_addr is zero 2022-07-02 16:17:16 +02:00
syscall.c lib/syscall: Clear return values when no stack 2017-04-08 09:30:35 +02:00
test-kstrtox.c
test-string_helpers.c
test_bitmap.c
test_bpf.c UPSTREAM: bpf: add BPF_J{LT,LE,SLT,SLE} instructions 2026-05-15 17:55:05 +07:00
test_firmware.c
test_hash.c lib/test_hash.c: fix warning in preprocessor symbol evaluation 2016-09-01 17:52:01 -07:00
test_hexdump.c test_hexdump: use memcpy instead of strncpy 2018-12-08 13:05:04 +01:00
test_kasan.c This is the 4.9.214 stable release 2020-02-17 10:05:12 +01:00
test_module.c
test_printf.c UPSTREAM: lib/test_printf.c: accept "ptrval" as valid result for plain 'p' tests 2022-02-21 16:30:33 +01:00
test_rhashtable.c rhashtable-test: Fix max_size parameter description 2016-08-08 12:52:42 -07:00
test_siphash.c siphash: implement HalfSipHash1-3 for hash tables 2019-08-25 10:51:42 +02:00
test_static_key_base.c
test_static_keys.c
test_user_copy.c usercopy: Adjust tests to deal with SMAP/PAN 2017-06-14 15:06:05 +02:00
test_uuid.c lib/uuid: add a test module 2016-05-30 15:26:57 -07:00
textsearch.c
timerqueue.c lib/timerqueue: Rely on rbtree semantics for next timer 2022-01-27 08:47:42 +01:00
ts_bm.c
ts_fsm.c
ts_kmp.c
ubsan.c ubsan: Fix nasty -Wbuiltin-declaration-mismatch GCC-9 warnings 2019-05-10 17:52:07 +02:00
ubsan.h lib/ubsan: add type mismatch handler for new GCC/Clang 2018-02-17 13:21:20 +01:00
ucs2_string.c lib/ucs2_string: Speed up ucs2_utf8size() 2016-09-09 16:08:46 +01:00
uuid.c lib/uuid.c: use correct offset in uuid parser 2016-05-30 15:26:57 -07:00
vsprintf.c This is the 4.9.320 stable release 2022-06-28 16:46:38 +00:00
win_minmax.c lib/win_minmax: windowed min or max estimator 2016-09-21 00:22:59 -04:00
xxhash.c UPSTREAM: lib: Add xxhash module 2018-08-23 12:05:06 -07:00