1. 29 8月, 2013 2 次提交
  2. 24 5月, 2013 1 次提交
  3. 18 5月, 2013 1 次提交
    • W
      xen-netback: enable user to unload netback module · b103f358
      Wei Liu 提交于
      This patch enables user to unload netback module, which is useful when user
      wants to upgrade to a newer netback module without rebooting the host.
      
      Netfront cannot handle netback removal event. As we cannot fix all possible
      frontends we add module get / put along with vif get / put to avoid
      mis-unloading of netback. To unload netback module, user needs to shutdown all
      VMs or migrate them to another host or unplug all vifs before hand.
      Signed-off-by: NWei Liu <wei.liu2@citrix.com>
      Acked-by: Ian Campbell <ian.campbell@citrix.com>¬
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b103f358
  4. 08 2月, 2013 1 次提交
    • I
      xen/netback: shutdown the ring if it contains garbage. · 48856286
      Ian Campbell 提交于
      A buggy or malicious frontend should not be able to confuse netback.
      If we spot anything which is not as it should be then shutdown the
      device and don't try to continue with the ring in a potentially
      hostile state. Well behaved and non-hostile frontends will not be
      penalised.
      
      As well as making the existing checks for such errors fatal also add a
      new check that ensures that there isn't an insane number of requests
      on the ring (i.e. more than would fit in the ring). If the ring
      contains garbage then previously is was possible to loop over this
      insane number, getting an error each time and therefore not generating
      any more pending requests and therefore not exiting the loop in
      xen_netbk_tx_build_gops for an externded period.
      
      Also turn various netdev_dbg calls which no precipitate a fatal error
      into netdev_err, they are rate limited because the device is shutdown
      afterwards.
      
      This fixes at least one known DoS/softlockup of the backend domain.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Acked-by: NJan Beulich <JBeulich@suse.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48856286
  5. 26 10月, 2011 1 次提交
  6. 18 5月, 2011 1 次提交
    • I
      xen: netback: use __CONST_RING_SIZE not __RING_SIZE · 11e73de7
      Ian Campbell 提交于
      The later causes warnings with gcc 4.5+. __CONST_RING_SIZE was introduced in
      667c78af to fix this but as netback wasn't upstream at the time it did not
      benefit, hence:
      
        CC      drivers/net/xen-netback/netback.o
      drivers/net/xen-netback/netback.c:110:37: warning: variably modified 'grant_copy_op' at file scope [enabled by default]
      drivers/net/xen-netback/netback.c:111:30: warning: variably modified 'meta' at file scope [enabled by default]
      drivers/net/xen-netback/netback.c: In function 'xen_netbk_rx_action':
      drivers/net/xen-netback/netback.c:584:6: warning: variable 'irq' set but not used [-Wunused-but-set-variable]
      
      Thanks to Witold Baryluk for pointing this out.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Cc: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11e73de7
  7. 20 4月, 2011 1 次提交
  8. 16 3月, 2011 1 次提交
    • I
      xen network backend driver · f942dc25
      Ian Campbell 提交于
      netback is the host side counterpart to the frontend driver in
      drivers/net/xen-netfront.c. The PV protocol is also implemented by
      frontend drivers in other OSes too, such as the BSDs and even Windows.
      
      The patch is based on the driver from the xen.git pvops kernel tree but
      has been put through the checkpatch.pl wringer plus several manual
      cleanup passes and review iterations. The driver has been moved from
      drivers/xen/netback to drivers/net/xen-netback.
      
      One major change from xen.git is that the guest transmit path (i.e. what
      looks like receive to netback) has been significantly reworked to remove
      the dependency on the out of tree PageForeign page flag (a core kernel
      patch which enables a per page destructor callback on the final
      put_page). This page flag was used in order to implement a grant map
      based transmit path (where guest pages are mapped directly into SKB
      frags). Instead this version of netback uses grant copy operations into
      regular memory belonging to the backend domain. Reinstating the grant
      map functionality is something which I would like to revisit in the
      future.
      
      Note that this driver depends on 2e820f58 "xen/irq: implement
      bind_interdomain_evtchn_to_irqhandler for backend drivers" which is in
      linux next via the "xen-two" tree and is intended for the 2.6.39 merge
      window:
              git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/backends
      this branch has only that single commit since 2.6.38-rc2 and is safe for
      cross merging into the net branch.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Reviewed-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f942dc25