Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. May 27, 2015
  2. Apr 03, 2015
  3. Nov 06, 2014
    • Joe Perches's avatar
      net: esp: Convert NETDEBUG to pr_info · 45083497
      Joe Perches authored
      Commit 64ce2073 ("[NET]: Make NETDEBUG pure printk wrappers")
      originally had these NETDEBUG printks as always emitting.
      
      Commit a2a316fd
      
       ("[NET]: Replace CONFIG_NET_DEBUG with sysctl")
      added a net_msg_warn sysctl to these NETDEBUG uses.
      
      Convert these NETDEBUG uses to normal pr_info calls.
      
      This changes the output prefix from "ESP: " to include
      "IPSec: " for the ipv4 case and "IPv6: " for the ipv6 case.
      
      These output lines are now like the other messages in the files.
      
      Other miscellanea:
      
      Neaten the arithmetic spacing to be consistent with other
      arithmetic spacing in the files.
      
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45083497
  4. Nov 04, 2014
  5. Feb 25, 2014
  6. Oct 29, 2013
  7. Aug 05, 2013
    • Daniel Borkmann's avatar
      net: esp{4,6}: fix potential MTU calculation overflows · 7921895a
      Daniel Borkmann authored
      Commit 91657eaf
      
       ("xfrm: take net hdr len into account for esp payload
      size calculation") introduced a possible interger overflow in
      esp{4,6}_get_mtu() handlers in case of x->props.mode equals
      XFRM_MODE_TUNNEL. Thus, the following expression will overflow
      
        unsigned int net_adj;
        ...
        <case ipv{4,6} XFRM_MODE_TUNNEL>
               net_adj = 0;
        ...
        return ((mtu - x->props.header_len - crypto_aead_authsize(esp->aead) -
                 net_adj) & ~(align - 1)) + (net_adj - 2);
      
      where (net_adj - 2) would be evaluated as <foo> + (0 - 2) in an unsigned
      context. Fix it by simply removing brackets as those operations here
      do not need to have special precedence.
      
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Cc: Benjamin Poirier <bpoirier@suse.de>
      Cc: Steffen Klassert <steffen.klassert@secunet.com>
      Acked-by: default avatarBenjamin Poirier <bpoirier@suse.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7921895a
  8. Jun 03, 2013
  9. Apr 15, 2013
  10. Jan 21, 2013
  11. Jan 08, 2013
  12. Jul 12, 2012
  13. Jun 15, 2012
    • David S. Miller's avatar
      ipv4: Handle PMTU in all ICMP error handlers. · 36393395
      David S. Miller authored
      
      With ip_rt_frag_needed() removed, we have to explicitly update PMTU
      information in every ICMP error handler.
      
      Create two helper functions to facilitate this.
      
      1) ipv4_sk_update_pmtu()
      
         This updates the PMTU when we have a socket context to
         work with.
      
      2) ipv4_update_pmtu()
      
         Raw version, used when no socket context is available.  For this
         interface, we essentially just pass in explicit arguments for
         the flow identity information we would have extracted from the
         socket.
      
         And you'll notice that ipv4_sk_update_pmtu() is simply implemented
         in terms of ipv4_update_pmtu()
      
      Note that __ip_route_output_key() is used, rather than something like
      ip_route_output_flow() or ip_route_output_key().  This is because we
      absolutely do not want to end up with a route that does IPSEC
      encapsulation and the like.  Instead, we only want the route that
      would get us to the node described by the outermost IP header.
      
      Reported-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36393395
  14. May 27, 2012
  15. Mar 12, 2012
    • Joe Perches's avatar
      net: ipv4: Standardize prefixes for message logging · afd46503
      Joe Perches authored
      
      Add #define pr_fmt(fmt) as appropriate.
      
      Add "IPv4: ", "TCP: ", and "IPsec: " to appropriate files.
      Standardize on "UDPLite: " for appropriate uses.
      Some prefixes were previously "UDPLITE: " and "UDP-Lite: ".
      
      Add KBUILD_MODNAME ": " to icmp and gre.
      Remove embedded prefixes as appropriate.
      
      Add missing "\n" to pr_info in gre.c.
      
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      afd46503
    • Joe Perches's avatar
      net: Convert printks to pr_<level> · 058bd4d2
      Joe Perches authored
      
      Use a more current kernel messaging style.
      
      Convert a printk block to print_hex_dump.
      Coalesce formats, align arguments.
      Use %s, __func__ instead of embedding function names.
      
      Some messages that were prefixed with <foo>_close are
      now prefixed with <foo>_fini.  Some ah4 and esp messages
      are now not prefixed with "ip ".
      
      The intent of this patch is to later add something like
        #define pr_fmt(fmt) "IPv4: " fmt.
      to standardize the output messages.
      
      Text size is trivially reduced. (x86-32 allyesconfig)
      
      $ size net/ipv4/built-in.o*
         text	   data	    bss	    dec	    hex	filename
       887888	  31558	 249696	1169142	 11d6f6	net/ipv4/built-in.o.new
       887934	  31558	 249800	1169292	 11d78c	net/ipv4/built-in.o.old
      
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      058bd4d2
  16. Apr 22, 2011
  17. Mar 13, 2011
  18. Dec 10, 2010
  19. Feb 22, 2010
  20. Nov 25, 2009
  21. Sep 14, 2009
  22. Nov 25, 2008
  23. Nov 03, 2008
  24. Aug 06, 2008
  25. Mar 27, 2008
  26. Mar 18, 2008
  27. Feb 13, 2008
  28. Jan 31, 2008
  29. Jan 28, 2008
  30. Dec 11, 2007
  31. Oct 31, 2007
    • David S. Miller's avatar
      [NET]: Fix incorrect sg_mark_end() calls. · 51c739d1
      David S. Miller authored
      This fixes scatterlist corruptions added by
      
      	commit 68e3f5dd
      
      
      	[CRYPTO] users: Fix up scatterlist conversion errors
      
      The issue is that the code calls sg_mark_end() which clobbers the
      sg_page() pointer of the final scatterlist entry.
      
      The first part fo the fix makes skb_to_sgvec() do __sg_mark_end().
      
      After considering all skb_to_sgvec() call sites the most correct
      solution is to call __sg_mark_end() in skb_to_sgvec() since that is
      what all of the callers would end up doing anyways.
      
      I suspect this might have fixed some problems in virtio_net which is
      the sole non-crypto user of skb_to_sgvec().
      
      Other similar sg_mark_end() cases were converted over to
      __sg_mark_end() as well.
      
      Arguably sg_mark_end() is a poorly named function because it doesn't
      just "mark", it clears out the page pointer as a side effect, which is
      what led to these bugs in the first place.
      
      The one remaining plain sg_mark_end() call is in scsi_alloc_sgtable()
      and arguably it could be converted to __sg_mark_end() if only so that
      we can delete this confusing interface from linux/scatterlist.h
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51c739d1