Go to file
Yauheni Kaliuta 84f284d078 bpf: Add dummy BPF STRUCT_OPS for test purpose
Bugzilla: http://bugzilla.redhat.com/2069045

commit c196906d50e360d82ed9aa5596a9d0ce89b7ab78
Author: Hou Tao <houtao1@huawei.com>
Date:   Mon Oct 25 14:40:24 2021 +0800

    bpf: Add dummy BPF STRUCT_OPS for test purpose
    
    Currently the test of BPF STRUCT_OPS depends on the specific bpf
    implementation of tcp_congestion_ops, but it can not cover all
    basic functionalities (e.g, return value handling), so introduce
    a dummy BPF STRUCT_OPS for test purpose.
    
    Loading a bpf_dummy_ops implementation from userspace is prohibited,
    and its only purpose is to run BPF_PROG_TYPE_STRUCT_OPS program
    through bpf(BPF_PROG_TEST_RUN). Now programs for test_1() & test_2()
    are supported. The following three cases are exercised in
    bpf_dummy_struct_ops_test_run():
    
    (1) test and check the value returned from state arg in test_1(state)
    The content of state is copied from userspace pointer and copied back
    after calling test_1(state). The user pointer is saved in an u64 array
    and the array address is passed through ctx_in.
    
    (2) test and check the return value of test_1(NULL)
    Just simulate the case in which an invalid input argument is passed in.
    
    (3) test multiple arguments passing in test_2(state, ...)
    5 arguments are passed through ctx_in in form of u64 array. The first
    element of array is userspace pointer of state and others 4 arguments
    follow.
    
    Signed-off-by: Hou Tao <houtao1@huawei.com>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Acked-by: Martin KaFai Lau <kafai@fb.com>
    Link: https://lore.kernel.org/bpf/20211025064025.2567443-4-houtao1@huawei.com

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
2022-06-03 17:23:49 +03:00
Documentation
LICENSES
arch s390: introduce nospec_uses_trampoline() 2022-06-03 17:23:47 +03:00
block
certs
crypto
drivers
fs
include bpf: Add dummy BPF STRUCT_OPS for test purpose 2022-06-03 17:23:49 +03:00
init
ipc
kernel bpf: Add dummy BPF STRUCT_OPS for test purpose 2022-06-03 17:23:49 +03:00
lib bpf, tests: Add module parameter test_suite to test_bpf module 2022-06-03 17:23:47 +03:00
mm
net bpf: Add dummy BPF STRUCT_OPS for test purpose 2022-06-03 17:23:49 +03:00
redhat
samples
scripts
security
sound
tools selftests/bpf: Fix strobemeta selftest regression 2022-06-03 17:23:49 +03:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.conf
.get_maintainer.ignore
.gitattributes
.gitignore
.gitlab-ci.yml
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
Kconfig.redhat
MAINTAINERS
Makefile
Makefile.rhelver
README
makefile

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.