1. 12 2月, 2021 1 次提交
  2. 04 2月, 2021 1 次提交
  3. 20 1月, 2021 1 次提交
  4. 01 12月, 2020 3 次提交
  5. 21 11月, 2020 2 次提交
  6. 15 11月, 2020 1 次提交
  7. 03 11月, 2020 1 次提交
    • J
      net: Un-hide lockdep_sock_is_held() for !LOCKDEP · d97f3bdf
      Jakub Kicinski 提交于
      Currently, variables used only within lockdep expressions are flagged
      as unused, requiring that these variables' declarations be decorated
      with either #ifdef or __maybe_unused.  This results in ugly code.
      This commit therefore causes the lockdep_sock_is_held() function to be
      visible even when lockdep is not enabled, thus removing the need for
      these decorations.  This approach further relies on dead-code elimination
      to remove any references to functions or variables that are not available
      in non-lockdep kernels.
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      Signed-off-by: NPaul E. McKenney <paulmck@kernel.org>
      d97f3bdf
  8. 25 9月, 2020 1 次提交
  9. 15 9月, 2020 1 次提交
    • E
      tcp: remove SOCK_QUEUE_SHRUNK · 0cbe6a8f
      Eric Dumazet 提交于
      SOCK_QUEUE_SHRUNK is currently used by TCP as a temporary state
      that remembers if some room has been made in the rtx queue
      by an incoming ACK packet.
      
      This is later used from tcp_check_space() before
      considering to send EPOLLOUT.
      
      Problem is: If we receive SACK packets, and no packet
      is removed from RTX queue, we can send fresh packets, thus
      moving them from write queue to rtx queue and eventually
      empty the write queue.
      
      This stall can happen if TCP_NOTSENT_LOWAT is used.
      
      With this fix, we no longer risk stalling sends while holes
      are repaired, and we can fully use socket sndbuf.
      
      This also removes a cache line dirtying for typical RPC
      workloads.
      
      Fixes: c9bee3b7 ("tcp: TCP_NOTSENT_LOWAT socket option")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Soheil Hassas Yeganeh <soheil@google.com>
      Acked-by: NNeal Cardwell <ncardwell@google.com>
      Acked-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0cbe6a8f
  10. 01 9月, 2020 1 次提交
  11. 26 8月, 2020 1 次提交
    • K
      bpf: Renames in preparation for bpf_local_storage · 1f00d375
      KP Singh 提交于
      A purely mechanical change to split the renaming from the actual
      generalization.
      
      Flags/consts:
      
        SK_STORAGE_CREATE_FLAG_MASK	BPF_LOCAL_STORAGE_CREATE_FLAG_MASK
        BPF_SK_STORAGE_CACHE_SIZE	BPF_LOCAL_STORAGE_CACHE_SIZE
        MAX_VALUE_SIZE		BPF_LOCAL_STORAGE_MAX_VALUE_SIZE
      
      Structs:
      
        bucket			bpf_local_storage_map_bucket
        bpf_sk_storage_map		bpf_local_storage_map
        bpf_sk_storage_data		bpf_local_storage_data
        bpf_sk_storage_elem		bpf_local_storage_elem
        bpf_sk_storage		bpf_local_storage
      
      The "sk" member in bpf_local_storage is also updated to "owner"
      in preparation for changing the type to void * in a subsequent patch.
      
      Functions:
      
        selem_linked_to_sk			selem_linked_to_storage
        selem_alloc				bpf_selem_alloc
        __selem_unlink_sk			bpf_selem_unlink_storage_nolock
        __selem_link_sk			bpf_selem_link_storage_nolock
        selem_unlink_sk			__bpf_selem_unlink_storage
        sk_storage_update			bpf_local_storage_update
        __sk_storage_lookup			bpf_local_storage_lookup
        bpf_sk_storage_map_free		bpf_local_storage_map_free
        bpf_sk_storage_map_alloc		bpf_local_storage_map_alloc
        bpf_sk_storage_map_alloc_check	bpf_local_storage_map_alloc_check
        bpf_sk_storage_map_check_btf		bpf_local_storage_map_check_btf
      Signed-off-by: NKP Singh <kpsingh@google.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Acked-by: NMartin KaFai Lau <kafai@fb.com>
      Link: https://lore.kernel.org/bpf/20200825182919.1118197-2-kpsingh@chromium.org
      1f00d375
  12. 06 8月, 2020 1 次提交
  13. 25 7月, 2020 2 次提交
  14. 20 7月, 2020 3 次提交
  15. 14 7月, 2020 1 次提交
  16. 10 7月, 2020 1 次提交
  17. 25 6月, 2020 1 次提交
  18. 24 6月, 2020 1 次提交
  19. 02 6月, 2020 1 次提交
  20. 30 5月, 2020 1 次提交
  21. 29 5月, 2020 9 次提交
  22. 08 4月, 2020 1 次提交
  23. 31 3月, 2020 3 次提交
  24. 22 2月, 2020 1 次提交
    • J
      net, sk_msg: Clear sk_user_data pointer on clone if tagged · f1ff5ce2
      Jakub Sitnicki 提交于
      sk_user_data can hold a pointer to an object that is not intended to be
      shared between the parent socket and the child that gets a pointer copy on
      clone. This is the case when sk_user_data points at reference-counted
      object, like struct sk_psock.
      
      One way to resolve it is to tag the pointer with a no-copy flag by
      repurposing its lowest bit. Based on the bit-flag value we clear the child
      sk_user_data pointer after cloning the parent socket.
      
      The no-copy flag is stored in the pointer itself as opposed to externally,
      say in socket flags, to guarantee that the pointer and the flag are copied
      from parent to child socket in an atomic fashion. Parent socket state is
      subject to change while copying, we don't hold any locks at that time.
      
      This approach relies on an assumption that sk_user_data holds a pointer to
      an object aligned at least 2 bytes. A manual audit of existing users of
      rcu_dereference_sk_user_data helper confirms our assumption.
      
      Also, an RCU-protected sk_user_data is not likely to hold a pointer to a
      char value or a pathological case of "struct { char c; }". To be safe, warn
      when the flag-bit is set when setting sk_user_data to catch any future
      misuses.
      
      It is worth considering why clearing sk_user_data unconditionally is not an
      option. There exist users, DRBD, NVMe, and Xen drivers being among them,
      that rely on the pointer being copied when cloning the listening socket.
      
      Potentially we could distinguish these users by checking if the listening
      socket has been created in kernel-space via sock_create_kern, and hence has
      sk_kern_sock flag set. However, this is not the case for NVMe and Xen
      drivers, which create sockets without marking them as belonging to the
      kernel.
      Signed-off-by: NJakub Sitnicki <jakub@cloudflare.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NJohn Fastabend <john.fastabend@gmail.com>
      Acked-by: NMartin KaFai Lau <kafai@fb.com>
      Link: https://lore.kernel.org/bpf/20200218171023.844439-3-jakub@cloudflare.com
      f1ff5ce2