TencentOS-kernel/kernel/bpf
jianmingfan c421e6e7b3 copy part code from commid id 85d33df357b634649ddbe0a20fd2d0fc5732c3cb to linux 5.4 to fix sockhash map creation fail problem.
logic:

  	sockhash map is defined in old way. like

	struct bpf_map_def __section("maps") sock_ops_map = {
        .type           = BPF_MAP_TYPE_SOCKHASH,
        .key_size       = sizeof(struct sock_key),
        .value_size     = sizeof(int),
        .max_entries    = 65535,
        .map_flags      = 0,
	};

	in this definition, value_size is provided without BTF type info.
	so that kernel map_create() shall not check its btf.

  Test case:
  	The opensource code create sockhash map
  	https://github.com/cyralinc/os-eBPF.git

	with this patch, load.sh will return ok.
	without this patch, load.sh will report create map fail.
2021-04-15 07:49:14 +00:00
..
Makefile bpf: Don't rely on GCC __attribute__((optimize)) to disable GCSE 2021-03-16 16:40:48 +08:00
arraymap.c bpf: Fix bug in mmap() implementation for BPF array map 2021-03-16 16:43:59 +08:00
bpf_lru_list.c bpf_lru_list: Read double-checked variable once without lock 2021-04-12 12:52:15 +08:00
bpf_lru_list.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
btf.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
cgroup.c bpf, cgroup: Fix problematic bounds check 2021-04-12 12:51:52 +08:00
core.c merge bpf_jiffies64 api from 5576b991e9c1a11d2cc21c4b94fc75ec27603896 2021-03-16 16:43:59 +08:00
cpumap.c cpumap: Avoid warning when CONFIG_DEBUG_PER_CPU_MAPS is enabled 2021-03-16 16:27:10 +08:00
devmap.c devmap: Use bpf_map_area_alloc() for allocating hash buckets 2021-03-16 16:30:57 +08:00
disasm.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
disasm.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hashtab.c bpf: Zero-fill re-used per-cpu map element 2021-03-16 16:40:49 +08:00
helpers.c bpf: Fix helper bpf_map_peek_elem_proto pointing to wrong callback 2021-03-16 16:44:00 +08:00
inode.c bpf: Convert bpf_prog refcnt to atomic64_t 2021-03-16 16:43:58 +08:00
local_storage.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
lpm_trie.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
map_in_map.c bpf: Switch bpf_map ref counter to atomic64_t so bpf_map_inc() never fails 2021-03-16 16:43:58 +08:00
map_in_map.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
offload.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
percpu_freelist.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
percpu_freelist.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
queue_stack_maps.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
reuseport_array.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
stackmap.c bpf: Check for integer overflow when using roundup_pow_of_two() 2021-04-12 12:52:03 +08:00
syscall.c copy part code from commid id 85d33df357b634649ddbe0a20fd2d0fc5732c3cb to linux 5.4 to fix sockhash map creation fail problem. 2021-04-15 07:49:14 +00:00
sysfs_btf.c bpf: Fix sysfs export of empty BTF section 2021-03-16 16:37:55 +08:00
tnum.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
verifier.c bpf: Add sanity check for upper ptr_limit 2021-04-12 12:53:13 +08:00
xskmap.c bpf: Switch bpf_map ref counter to atomic64_t so bpf_map_inc() never fails 2021-03-16 16:43:58 +08:00