You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
BPF_MAP_TYPE_PROG_ARRAY and the helper bpf_tail_call, as kernel/bpf/arraymap.c and JMP_TAIL_CALL of Linux. A system call writes the descriptor of a program to a slot and reads the ID of the program. All programs of an array and all programs that use it have one type. A tail call to an empty slot or to an index out of the array continues after the call, and a run does at most 33 tail calls. The last close of the array removes its programs. The verifier refuses a program array with another helper, a tail call with another map, and a tail call in a program with functions, with the messages of Linux. The ltp boot test also runs bpf_prog05, bpf_prog06 and bpf_prog07. They do not apply, as on Linux, because they drop CAP_BPF and kernel.unprivileged_bpf_disabled is 2 (#537).
/dev/tpm0 (10:224) for the TPM, as tpm-dev.c of Linux: one open file at a time, a write sends one command and a read gives its response. /sys/class/tpm/tpm0 has dev, uevent, tpm_version_major and the directory pcr-sha256 with the digest of each PCR, from a new hook for the attributes of a class in sysfs. tools/tpm/build.sh installs tpm2-tools from Alpine, and with it the tpm boot test runs tpm2_getrandom 8 and tpm2_pcrread sha256:0,7 on /dev/tpm0 and compares the PCRs with pcr-sha256 (#541).
Fixed
A write of memory.peak starts a new peak for the open file only, as peak_write of Linux. A read of that open file shows the largest use after the write, and the other readers of memory.peak still see the largest use since the cgroup was made. Each other open file with a write gets the use now if it is larger than its value. Before, a write reset the peak of the cgroup for all readers, and test_memcg_current_peak of the cgroup kselftests failed. memory.swap.peak stays 0, because rukernel has no swap (#536).
A populate of many pages in one system call, as mlock, MAP_POPULATE and MAP_LOCKED do, waits for memory.high after each batch of 64 pages, as try_charge_memcg of Linux calls mem_cgroup_handle_over_high. A kill stops the populate. Before, the wait came only at the return to user mode, so one mlock of 200 MB in a cgroup with memory.high 30M went up to memory.max at once, and test_memcg_high_sync of the cgroup kselftests failed (#536).
tools/kselftest/build.sh builds the cgroup selftests without optimization, as their Makefile in Linux does. At -O2, gcc removed the memory use of alloc_anon of test_memcontrol, so test_memcg_max, test_memcg_oom_events and the memory.oom.group tests found no OOM kill (#536).