Skip to content
  1. Aug 27, 2016
  2. Aug 26, 2016
  3. Aug 25, 2016
    • Lorenzo Colitti's avatar
      net: diag: allow socket bytecode filters to match socket marks · a52e95ab
      Lorenzo Colitti authored
      This allows a privileged process to filter by socket mark when
      dumping sockets via INET_DIAG_BY_FAMILY. This is useful on
      systems that use mark-based routing such as Android.
      
      The ability to filter socket marks requires CAP_NET_ADMIN, which
      is consistent with other privileged operations allowed by the
      SOCK_DIAG interface such as the ability to destroy sockets and
      the ability to inspect BPF filters attached to packet sockets.
      
      Tested: https://android-review.googlesource.com/261350
      
      
      Signed-off-by: default avatarLorenzo Colitti <lorenzo@google.com>
      Acked-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a52e95ab
    • Lorenzo Colitti's avatar
      net: diag: slightly refactor the inet_diag_bc_audit error checks. · 627cc4ad
      Lorenzo Colitti authored
      
      
      This simplifies the code a bit and also allows inet_diag_bc_audit
      to send to userspace an error that isn't EINVAL.
      
      Signed-off-by: default avatarLorenzo Colitti <lorenzo@google.com>
      Acked-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      627cc4ad
    • Vivien Didelot's avatar
      net: dsa: rename switch operations structure · 9d490b4e
      Vivien Didelot authored
      
      
      Now that the dsa_switch_driver structure contains only function pointers
      as it is supposed to, rename it to the more appropriate dsa_switch_ops,
      uniformly to any other operations structure in the kernel.
      
      No functional changes here, basically just the result of something like:
      s/dsa_switch_driver *drv/dsa_switch_ops *ops/g
      
      However keep the {un,}register_switch_driver functions and their
      dsa_switch_drivers list as is, since they represent the -- likely to be
      deprecated soon -- legacy DSA registration framework.
      
      In the meantime, also fix the following checks from checkpatch.pl to
      make it happy with this patch:
      
          CHECK: Comparison to NULL could be written "!ops"
          #403: FILE: net/dsa/dsa.c:470:
          +	if (ops == NULL) {
      
          CHECK: Comparison to NULL could be written "ds->ops->get_strings"
          #773: FILE: net/dsa/slave.c:697:
          +		if (ds->ops->get_strings != NULL)
      
          CHECK: Comparison to NULL could be written "ds->ops->get_ethtool_stats"
          #824: FILE: net/dsa/slave.c:785:
          +	if (ds->ops->get_ethtool_stats != NULL)
      
          CHECK: Comparison to NULL could be written "ds->ops->get_sset_count"
          #835: FILE: net/dsa/slave.c:798:
          +		if (ds->ops->get_sset_count != NULL)
      
          total: 0 errors, 0 warnings, 4 checks, 784 lines checked
      
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9d490b4e
    • Yuval Mintz's avatar
      bnx2x: Don't flush multicast MACs · c7b7b483
      Yuval Mintz authored
      
      
      When ndo_set_rx_mode() is called for bnx2x, as part of process of
      configuring the new MAC address filters [both unicast & multicast]
      driver begins by flushing the existing configuration and then iterating
      over the network device's list of addresses and configures those instead.
      
      This has the side-effect of creating a short gap where traffic wouldn't
      be properly classified, as no filters are configured in HW.
      While for unicasts this is rather insignificant [as unicast MACs don't
      frequently change while interface is actually running],
      for multicast traffic it does pose an issue as there are multicast-based
      networks where new multicast groups would constantly be removed and
      added.
      
      This patch tries to remedy this [at least for the newer adapters] -
      Instead of flushing & reconfiguring all existing multicast filters,
      the driver would instead create the approximate hash match that would
      result from the required filters. It would then compare it against the
      currently configured approximate hash match, and only add and remove the
      delta between those.
      
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c7b7b483
    • David S. Miller's avatar
      Merge tag 'rxrpc-rewrite-20160824-2' of... · 6546c78e
      David S. Miller authored
      Merge tag 'rxrpc-rewrite-20160824-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
      
      
      
      David Howells says:
      
      ====================
      rxrpc: Add better client conn management strategy
      
      These two patches add a better client connection management strategy.  They
      need to be applied on top of the just-posted fixes.
      
       (1) Duplicate the connection list and separate out procfs iteration from
           garbage collection.  This is necessary for the next patch as with that
           client connections no longer appear on a single list and may not
           appear on a list at all - and really don't want to be exposed to the
           old garbage collector.
      
           (Note that client conns aren't left dangling, they're also in a tree
           rooted in the local endpoint so that they can be found by a user
           wanting to make a new client call.  Service conns do not appear in
           this tree.)
      
       (2) Implement a better lifetime management and garbage collection strategy
           for client connections.
      
           In this, a client connection can be in one of five cache states
           (inactive, waiting, active, culled and idle).  Limits are set on the
           number of client conns that may be active at any one time and makes
           users wait if they want to start a new call when there isn't capacity
           available.
      
           To make capacity available, active and idle connections can be culled,
           after a short delay (to allow for retransmission).  The delay is
           reduced if the capacity exceeds a tunable threshold.
      
           If there is spare capacity, client conns are permitted to hang around
           a fair bit longer (tunable) so as to allow reuse of negotiated
           security contexts.
      
           After this patch, the client conn strategy is separate from that of
           service conns (which continues to use the old code for the moment).
      
           This difference in strategy is because the client side retains control
           over when it allows a connection to become active, whereas the service
           side has no control over when it sees a new connection or a new call
           on an old connection.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6546c78e