1. 22 7月, 2007 1 次提交
  2. 20 7月, 2007 2 次提交
  3. 19 7月, 2007 1 次提交
  4. 11 7月, 2007 2 次提交
  5. 04 6月, 2007 1 次提交
    • H
      [NET] gso: Fix GSO feature mask in sk_setup_caps · 4fcd6b99
      Herbert Xu 提交于
      This isn't a bug just yet as only TCP uses sk_setup_caps for GSO.
      However, if and when UDP or something else starts using it this is
      likely to cause a problem if we forget to add software emulation
      for it at the same time.
      
      The problem is that right now we translate GSO emulation to the
      bitmask NETIF_F_GSO_MASK, which includes every protocol, even
      ones that we cannot emulate.
      
      This patch makes it provide only the ones that we can emulate.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4fcd6b99
  6. 25 5月, 2007 1 次提交
    • V
      [NET]: "wrong timeout value" in sk_wait_data() v2 · ba78073e
      Vasily Averin 提交于
      sys_setsockopt() do not check properly timeout values for
      SO_RCVTIMEO/SO_SNDTIMEO, for example it's possible to set negative timeout
      values. POSIX do not defines behaviour for sys_setsockopt in case negative
      timeouts, but requires that setsockopt() shall fail with -EDOM if the send and
      receive timeout values are too big to fit into the timeout fields in the socket
      structure.
      In current implementation negative timeout can lead to error messages like
      "schedule_timeout: wrong timeout value".
      
      Proposed patch:
      - checks tv_usec and returns -EDOM if it is wrong
      - do not allows to set negative timeout values (sets 0 instead) and outputs
      ratelimited information message about such attempts.
      Signed-off-By: NVasily Averin <vvs@sw.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba78073e
  7. 27 4月, 2007 1 次提交
  8. 26 4月, 2007 7 次提交
  9. 23 3月, 2007 1 次提交
  10. 07 3月, 2007 1 次提交
  11. 13 2月, 2007 1 次提交
  12. 11 2月, 2007 1 次提交
  13. 08 12月, 2006 2 次提交
  14. 04 12月, 2006 1 次提交
  15. 03 12月, 2006 2 次提交
  16. 06 11月, 2006 1 次提交
  17. 11 10月, 2006 1 次提交
  18. 23 9月, 2006 3 次提交
  19. 04 7月, 2006 2 次提交
  20. 01 7月, 2006 1 次提交
  21. 30 6月, 2006 1 次提交
    • C
      [AF_UNIX]: Datagram getpeersec · 877ce7c1
      Catherine Zhang 提交于
      This patch implements an API whereby an application can determine the
      label of its peer's Unix datagram sockets via the auxiliary data mechanism of
      recvmsg.
      
      Patch purpose:
      
      This patch enables a security-aware application to retrieve the
      security context of the peer of a Unix datagram socket.  The application
      can then use this security context to determine the security context for
      processing on behalf of the peer who sent the packet.
      
      Patch design and implementation:
      
      The design and implementation is very similar to the UDP case for INET
      sockets.  Basically we build upon the existing Unix domain socket API for
      retrieving user credentials.  Linux offers the API for obtaining user
      credentials via ancillary messages (i.e., out of band/control messages
      that are bundled together with a normal message).  To retrieve the security
      context, the application first indicates to the kernel such desire by
      setting the SO_PASSSEC option via getsockopt.  Then the application
      retrieves the security context using the auxiliary data mechanism.
      
      An example server application for Unix datagram socket should look like this:
      
      toggle = 1;
      toggle_len = sizeof(toggle);
      
      setsockopt(sockfd, SOL_SOCKET, SO_PASSSEC, &toggle, &toggle_len);
      recvmsg(sockfd, &msg_hdr, 0);
      if (msg_hdr.msg_controllen > sizeof(struct cmsghdr)) {
          cmsg_hdr = CMSG_FIRSTHDR(&msg_hdr);
          if (cmsg_hdr->cmsg_len <= CMSG_LEN(sizeof(scontext)) &&
              cmsg_hdr->cmsg_level == SOL_SOCKET &&
              cmsg_hdr->cmsg_type == SCM_SECURITY) {
              memcpy(&scontext, CMSG_DATA(cmsg_hdr), sizeof(scontext));
          }
      }
      
      sock_setsockopt is enhanced with a new socket option SOCK_PASSSEC to allow
      a server socket to receive security context of the peer.
      
      Testing:
      
      We have tested the patch by setting up Unix datagram client and server
      applications.  We verified that the server can retrieve the security context
      using the auxiliary data mechanism of recvmsg.
      Signed-off-by: NCatherine Zhang <cxzhang@watson.ibm.com>
      Acked-by: NAcked-by: James Morris <jmorris@namei.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      877ce7c1
  22. 18 6月, 2006 1 次提交
  23. 31 3月, 2006 1 次提交
  24. 29 3月, 2006 1 次提交
    • D
      [NET]: deinline 200+ byte inlines in sock.h · f0088a50
      Denis Vlasenko 提交于
      Sizes in bytes (allyesconfig, i386) and files where those inlines
      are used:
      
      238 sock_queue_rcv_skb 2.6.16/net/x25/x25_in.o
      238 sock_queue_rcv_skb 2.6.16/net/rose/rose_in.o
      238 sock_queue_rcv_skb 2.6.16/net/packet/af_packet.o
      238 sock_queue_rcv_skb 2.6.16/net/netrom/nr_in.o
      238 sock_queue_rcv_skb 2.6.16/net/llc/llc_sap.o
      238 sock_queue_rcv_skb 2.6.16/net/llc/llc_conn.o
      238 sock_queue_rcv_skb 2.6.16/net/irda/af_irda.o
      238 sock_queue_rcv_skb 2.6.16/net/ipx/af_ipx.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv6/udp.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv6/raw.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv4/udp.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv4/raw.o
      238 sock_queue_rcv_skb 2.6.16/net/ipv4/ipmr.o
      238 sock_queue_rcv_skb 2.6.16/net/econet/econet.o
      238 sock_queue_rcv_skb 2.6.16/net/econet/af_econet.o
      238 sock_queue_rcv_skb 2.6.16/net/bluetooth/sco.o
      238 sock_queue_rcv_skb 2.6.16/net/bluetooth/l2cap.o
      238 sock_queue_rcv_skb 2.6.16/net/bluetooth/hci_sock.o
      238 sock_queue_rcv_skb 2.6.16/net/ax25/ax25_in.o
      238 sock_queue_rcv_skb 2.6.16/net/ax25/af_ax25.o
      238 sock_queue_rcv_skb 2.6.16/net/appletalk/ddp.o
      238 sock_queue_rcv_skb 2.6.16/drivers/net/pppoe.o
      
      276 sk_receive_skb 2.6.16/net/decnet/dn_nsp_in.o
      276 sk_receive_skb 2.6.16/net/dccp/ipv6.o
      276 sk_receive_skb 2.6.16/net/dccp/ipv4.o
      276 sk_receive_skb 2.6.16/net/dccp/dccp_ipv6.o
      276 sk_receive_skb 2.6.16/drivers/net/pppoe.o
      
      209 sk_dst_check 2.6.16/net/ipv6/ip6_output.o
      209 sk_dst_check 2.6.16/net/ipv4/udp.o
      209 sk_dst_check 2.6.16/net/decnet/dn_nsp_out.o
      
      Large inlines with multiple callers:
      Size  Uses Wasted Name and definition
      ===== ==== ====== ================================================
        238   21   4360 sock_queue_rcv_skb    include/net/sock.h
        109   10    801 sock_recv_timestamp   include/net/sock.h
        276    4    768 sk_receive_skb        include/net/sock.h
         94    8    518 __sk_dst_check        include/net/sock.h
        209    3    378 sk_dst_check  include/net/sock.h
        131    4    333 sk_setup_caps include/net/sock.h
        152    2    132 sk_stream_alloc_pskb  include/net/sock.h
        125    2    105 sk_stream_writequeue_purge    include/net/sock.h
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f0088a50
  25. 25 3月, 2006 1 次提交
  26. 21 3月, 2006 2 次提交