1. 23 8月, 2018 3 次提交
  2. 22 8月, 2018 4 次提交
  3. 18 8月, 2018 1 次提交
  4. 15 8月, 2018 1 次提交
  5. 13 8月, 2018 2 次提交
    • A
      selftests/bpf: Selftest for bpf_skb_ancestor_cgroup_id · 5ecd8c22
      Andrey Ignatov 提交于
      Add selftests for bpf_skb_ancestor_cgroup_id helper.
      
      test_skb_cgroup_id.sh prepares testing interface and adds tc qdisc and
      filter for it using BPF object compiled from test_skb_cgroup_id_kern.c
      program.
      
      BPF program in test_skb_cgroup_id_kern.c gets ancestor cgroup id using
      the new helper at different levels of cgroup hierarchy that skb belongs
      to, including root level and non-existing level, and saves it to the map
      where the key is the level of corresponding cgroup and the value is its
      id.
      
      To trigger BPF program, user space program test_skb_cgroup_id_user is
      run. It adds itself into testing cgroup and sends UDP datagram to
      link-local multicast address of testing interface. Then it reads cgroup
      ids saved in kernel for different levels from the BPF map and compares
      them with those in user space. They must be equal for every level of
      ancestry.
      
      Example of run:
        # ./test_skb_cgroup_id.sh
        Wait for testing link-local IP to become available ... OK
        Note: 8 bytes struct bpf_elf_map fixup performed due to size mismatch!
        [PASS]
      Signed-off-by: NAndrey Ignatov <rdna@fb.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      5ecd8c22
    • A
      selftests/bpf: Add cgroup id helpers to bpf_helpers.h · 02f6ac74
      Andrey Ignatov 提交于
      Add bpf_skb_cgroup_id and bpf_skb_ancestor_cgroup_id helpers to
      bpf_helpers.h to use them in tests and samples.
      Signed-off-by: NAndrey Ignatov <rdna@fb.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      02f6ac74
  6. 12 8月, 2018 1 次提交
  7. 11 8月, 2018 4 次提交
  8. 10 8月, 2018 4 次提交
  9. 09 8月, 2018 3 次提交
    • C
      Add cgroup core selftests · d863cb03
      Claudio 提交于
      This commit adds tests for some of the core functionalities
      of cgroups v2.
      
      The commit adds tests for some core principles of croup V2 API:
      
      - test_cgcore_internal_process_constraint
      
        Tests internal process constraint.
        You can't add a pid to a domain parent if a controller is enabled.
      
      - test_cgcore_top_down_constraint_enable
      
         Tests that you can't enable a controller on a child if it's not enabled
         on the parent.
      
      - test_cgcore_top_down_constraint_disable
      
        Tests that you can't disable a controller on a parent if it's
        enabled in a child.
      
      - test_cgcore_no_internal_process_constraint_on_threads
      
        Tests that there's no internal process constrain on threaded cgroups.
        You can add threads/processes on a parent with a controller enabled.
      
      - test_cgcore_parent_becomes_threaded
      
        Tests that when a child becomes threaded the parent type becomes
        domain threaded.
      
      - test_cgcore_invalid_domain
      
        In a situation like:
      
        A (domain threaded) - B (threaded) - C (domain)
      
        it tests that C can't be used until it is turned into a threaded cgroup.
        The "cgroup.type" file will report "domain (invalid)" in these cases.
        Operations which fail due to invalid topology use EOPNOTSUPP as the errno.
      
      - test_cgcore_populated
      
        In a situation like:
      
        A(0) - B(0) - C(1)
               \ D(0)
      
        It tests that A, B and C's "populated" fields would be 1 while D's 0.
        It tests that after the one process in C is moved to root, A,B and C's
        "populated" fields would flip to "0" and file modified events will
        be generated on the "cgroup.events" files of both cgroups.
      Signed-off-by: NClaudio Zumbo <claudioz@fb.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Roman Gushchin <guro@fb.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: kernel-team@fb.com
      Acked-by: NTejun Heo <tj@kernel.org>
      Reviewed-by: NRoman Gushchin <guro@fb.com>
      Signed-off-by: NShuah Khan (Samsung OSG) <shuah@kernel.org>
      d863cb03
    • V
      rseq/selftests: add s390 support · 4c14d1ce
      Vasily Gorbik 提交于
      Implement support for s390 in the rseq selftests, in order to sanity
      check the recently enabled rseq syscall. The Implementation covers both
      64-bit and 31-bit mode.
      Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      4c14d1ce
    • D
      bpf, sockmap: fix cork timeout for select due to epipe · 3c6ed988
      Daniel Borkmann 提交于
      I ran into the same issue as a009f1f3 ("selftests/bpf:
      test_sockmap, timing improvements") where I had a broken
      pipe error on the socket due to remote end timing out on
      select and then shutting down it's sockets while the other
      side was still sending. We may need to do a bigger rework
      in general on the test_sockmap.c, but for now increase it
      to a more suitable timeout.
      
      Fixes: a18fda1a ("bpf: reduce runtime of test_sockmap tests")
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NJohn Fastabend <john.fastabend@gmail.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      3c6ed988
  10. 08 8月, 2018 3 次提交
  11. 07 8月, 2018 10 次提交
  12. 06 8月, 2018 4 次提交