1. 30 8月, 2018 3 次提交
    • Y
      bpf: add bpffs pretty print for percpu arraymap/hash/lru_hash · c7b27c37
      Yonghong Song 提交于
      Added bpffs pretty print for percpu arraymap, percpu hashmap
      and percpu lru hashmap.
      
      For each map <key, value> pair, the format is:
         <key_value>: {
      	cpu0: <value_on_cpu0>
      	cpu1: <value_on_cpu1>
      	...
      	cpun: <value_on_cpun>
         }
      
      For example, on my VM, there are 4 cpus, and
      for test_btf test in the next patch:
         cat /sys/fs/bpf/pprint_test_percpu_hash
      
      You may get:
         ...
         43602: {
      	cpu0: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
      	cpu1: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
      	cpu2: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
      	cpu3: {43602,0,-43602,0x3,0xaa52,0x3,{43602|[82,170,0,0,0,0,0,0]},ENUM_TWO}
         }
         72847: {
      	cpu0: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE}
      	cpu1: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE}
      	cpu2: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE}
      	cpu3: {72847,0,-72847,0x3,0x11c8f,0x3,{72847|[143,28,1,0,0,0,0,0]},ENUM_THREE}
         }
         ...
      Signed-off-by: NYonghong Song <yhs@fb.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      c7b27c37
    • E
      bpf/verifier: display non-spill stack slot types in print_verifier_state · 8efea21d
      Edward Cree 提交于
      If a stack slot does not hold a spilled register (STACK_SPILL), then each
       of its eight bytes could potentially have a different slot_type.  This
       information can be important for debugging, and previously we either did
       not print anything for the stack slot, or just printed fp-X=0 in the case
       where its first byte was STACK_ZERO.
      Instead, print eight characters with either 0 (STACK_ZERO), m (STACK_MISC)
       or ? (STACK_INVALID) for any stack slot which is neither STACK_SPILL nor
       entirely STACK_INVALID.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      8efea21d
    • E
      bpf/verifier: per-register parent pointers · 679c782d
      Edward Cree 提交于
      By giving each register its own liveness chain, we elide the skip_callee()
       logic.  Instead, each register's parent is the state it inherits from;
       both check_func_call() and prepare_func_exit() automatically connect
       reg states to the correct chain since when they copy the reg state across
       (r1-r5 into the callee as args, and r0 out as the return value) they also
       copy the parent pointer.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      679c782d
  2. 29 8月, 2018 1 次提交
  3. 24 8月, 2018 4 次提交
  4. 23 8月, 2018 32 次提交