• S
    selftests/bpf: add sockopt test · 9ec8a4c9
    Stanislav Fomichev 提交于
    Add sockopt selftests:
    * require proper expected_attach_type
    * enforce context field read/write access
    * test bpf_sockopt_handled handler
    * test EPERM
    * test limiting optlen from getsockopt
    * test out-of-bounds access
    
    v9:
    * add tests for setsockopt argument mangling
    
    v7:
    * remove return 2; test retval=0 and optlen=-1
    
    v3:
    * use DW for optval{,_end} loads
    
    v2:
    * use return code 2 for kernel bypass
    
    Cc: Andrii Nakryiko <andriin@fb.com>
    Cc: Martin Lau <kafai@fb.com>
    Signed-off-by: NStanislav Fomichev <sdf@google.com>
    Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
    9ec8a4c9
Makefile 8.8 KB