1. 22 3月, 2012 1 次提交
  2. 05 1月, 2012 1 次提交
    • J
      Xen: consolidate and simplify struct xenbus_driver instantiation · 73db144b
      Jan Beulich 提交于
      The 'name', 'owner', and 'mod_name' members are redundant with the
      identically named fields in the 'driver' sub-structure. Rather than
      switching each instance to specify these fields explicitly, introduce
      a macro to simplify this.
      
      Eliminate further redundancy by allowing the drvname argument to
      DEFINE_XENBUS_DRIVER() to be blank (in which case the first entry from
      the ID table will be used for .driver.name).
      
      Also eliminate the questionable xenbus_register_{back,front}end()
      wrappers - their sole remaining purpose was the checking of the
      'owner' field, proper setting of which shouldn't be an issue anymore
      when the macro gets used.
      
      v2: Restore DRV_NAME for the driver name in xen-pciback.
      Signed-off-by: NJan Beulich <jbeulich@suse.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      73db144b
  3. 13 12月, 2011 1 次提交
  4. 17 11月, 2011 2 次提交
  5. 19 10月, 2011 1 次提交
  6. 06 10月, 2011 1 次提交
  7. 22 6月, 2011 1 次提交
  8. 26 5月, 2011 1 次提交
    • I
      xen: netfront: hold RTNL when updating features. · 1ba37c51
      Ian Campbell 提交于
      Konrad reports:
      [    0.930811] RTNL: assertion failed at /home/konrad/ssd/linux/net/core/dev.c (5258)
      [    0.930821] Pid: 22, comm: xenwatch Not tainted 2.6.39-05193-gd762f438 #1
      [    0.930825] Call Trace:
      [    0.930834]  [<ffffffff8143bd0e>] __netdev_update_features+0xae/0xe0
      [    0.930840]  [<ffffffff8143dd41>] netdev_update_features+0x11/0x30
      [    0.930847]  [<ffffffffa0037105>] netback_changed+0x4e5/0x800 [xen_netfront]
      [    0.930854]  [<ffffffff8132a838>] xenbus_otherend_changed+0xa8/0xb0
      [    0.930860]  [<ffffffff8157ca99>] ? _raw_spin_unlock_irqrestore+0x19/0x20
      [    0.930866]  [<ffffffff8132adfe>] backend_changed+0xe/0x10
      [    0.930871]  [<ffffffff8132875a>] xenwatch_thread+0xba/0x180
      [    0.930876]  [<ffffffff810a8ba0>] ? wake_up_bit+0x40/0x40
      [    0.930881]  [<ffffffff813286a0>] ? split+0xf0/0xf0
      [    0.930886]  [<ffffffff810a8646>] kthread+0x96/0xa0
      [    0.930891]  [<ffffffff815855a4>] kernel_thread_helper+0x4/0x10
      [    0.930896]  [<ffffffff815846b3>] ? int_ret_from_sys_call+0x7/0x1b
      [    0.930901]  [<ffffffff8157cf61>] ? retint_restore_args+0x5/0x6
      [    0.930906]  [<ffffffff815855a0>] ? gs_change+0x13/0x13
      
      This update happens in xenbus watch callback context and hence does not already
      hold the rtnl. Take the lock as necessary.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Tested-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ba37c51
  9. 05 4月, 2011 1 次提交
  10. 04 4月, 2011 1 次提交
  11. 02 4月, 2011 1 次提交
  12. 31 3月, 2011 1 次提交
    • J
      drivers/net: Remove IRQF_SAMPLE_RANDOM flag from network drivers · ab392d2d
      Javier Martinez Canillas 提交于
      The IRQF_SAMPLE_RANDOM flag is marked as deprecated and will be removed.
      
      Every input point to the kernel's entropy pool have to better document the
      type of entropy source it is.
      
      drivers/char/random.c now implements a set of interfaces that can be used for
      devices to collect enviromental noise. IRQF_SAMPLE_RANDOM will be replaced
      with these add_*_randomness exported functions.
      
      Network drivers are not a good source of entropy. They use as a source of
      entropy essentially a remote host. Which means that the source of entropy can
      be potentially controlled by an attacker. Also, with heavy workloads the
      entropy decreases due to less hardware interrupts happening thanks to irq
      mitigation and NAPI.
      
      If a system relies in its network interface as a entropy source it has a false
      sense of security. Systems that don't have devices whose drivers are good
      sources of entropy, should either use a hardware random number generator or
      feed the kernel's entropy pool from userspace using other sources of entropy
      such as EGD, video_entropyd, timer_entropyd and audio-entropyd.
      Signed-off-by: NJavier Martinez Canillas <martinez.javier@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab392d2d
  13. 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
  14. 15 3月, 2011 2 次提交
  15. 28 1月, 2011 1 次提交
    • I
      xen: netfront: handle incoming GSO SKBs which are not CHECKSUM_PARTIAL · e0ce4af9
      Ian Campbell 提交于
      The Linux network stack expects all GSO SKBs to have ip_summed ==
      CHECKSUM_PARTIAL (which implies that the frame contains a partial
      checksum) and the Xen network ring protocol similarly expects an SKB
      which has GSO set to also have NETRX_csum_blank (which also implies a
      partial checksum).
      
      However there have been cases of buggy guests which mark a frame as
      GSO but do not set csum_blank. If we detect that we a receiving such a
      frame (which manifests as ip_summed != PARTIAL && skb_is_gso) then
      force the SKB to partial and recalculate the checksum, since we cannot
      rely on the peer having done so if they have not set csum_blank.
      
      Add an ethtool stat to track occurances of this event.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: xen-devel@lists.xensource.com
      Cc: netdev@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0ce4af9
  16. 10 1月, 2011 1 次提交
  17. 16 12月, 2010 1 次提交
  18. 18 10月, 2010 1 次提交
  19. 27 9月, 2010 1 次提交
  20. 23 8月, 2010 1 次提交
  21. 31 5月, 2010 1 次提交
  22. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  23. 05 11月, 2009 1 次提交
  24. 02 9月, 2009 1 次提交
  25. 06 7月, 2009 1 次提交
  26. 16 6月, 2009 1 次提交
  27. 14 3月, 2009 1 次提交
  28. 22 1月, 2009 1 次提交
  29. 07 1月, 2009 1 次提交
  30. 23 12月, 2008 1 次提交
  31. 01 12月, 2008 1 次提交
  32. 04 11月, 2008 1 次提交
  33. 17 10月, 2008 1 次提交
  34. 16 10月, 2008 1 次提交
  35. 20 8月, 2008 1 次提交
  36. 07 8月, 2008 1 次提交
  37. 16 7月, 2008 1 次提交
    • I
      xen-netfront: fix xennet_release_tx_bufs() · 1ffb40b8
      Isaku Yamahata 提交于
      After restore on ia64 xen domain, kernel panics as follows.
      This patch fixes it.
      
      union skb_entry assumes sizeof(link->skb, pointer) ==
      sizeof(list->link, unsigned).
      However this isn't true on ia64. So  make link type unsigned long.
      And introduced two accesor.
      
      kernel unaligned access to 0xe0000000000000bd, ip=0xa0000001004c2ca0
      xenwatch[14]: error during unaligned kernel access
       -1 [1]
      Modules linked in:
      
      Pid: 14, CPU 0, comm:             xenwatch
      psr : 0000101008422010 ifs : 8000000000000307 ip  : [<a0000001004c2ca0>]    Not tainted (2.6.26-rc4xen-ia64-dirty)
      ip is at dev_kfree_skb_irq+0x20/0x1a0
      unat: 0000000000000000 pfs : 400000000000040b rsc : 0000000000000007
      rnat: 0000000000000000 bsps: 0000000000000000 pr  : 000000000000a941
      ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c8a70433f
      csd : 0000000000000000 ssd : 0000000000000000
      b0  : a0000001003efb70 b6  : a000000100070e40 b7  : a000000100070e40
      f6  : 1003e000000fcb75352b1 f7  : 1003e000000000014ff97
      f8  : 1003e00fcb74fc3454d80 f9  : 1003e0000000080000000
      f10 : 1003e0000000000001431 f11 : 1003e0000000000989680
      r1  : a000000100bfcf80 r2  : e0000000000000bd r3  : 000000000000308c
      r8  : 0000000000000000 r9  : e00000000fc31310 r10 : a000000100a13b28
      r11 : 0000000000000000 r12 : e00000000fd0fdf0 r13 : e00000000fd08000
      r14 : 0000000000000000 r15 : e00000000fcc8000 r16 : 0000000000000009
      r17 : e000010000104000 r18 : e000010000104000 r19 : a000000100a13b40
      r20 : a0000001009c23f0 r21 : a0000001009fd4d0 r22 : 0000000000004000
      r23 : 0000000000000000 r24 : fffffffffff04c10 r25 : 0000000000000002
      r26 : 0000000000000000 r27 : 0000000000000000 r28 : e00000000fd08bd4
      r29 : a0000001007570b8 r30 : a0000001009e5500 r31 : a0000001009e54a0
      
      Call Trace:
       [<a000000100026000>] show_stack+0x40/0xa0
                                      sp=e00000000fd0f670 bsp=e00000000fd08f68
       [<a000000100026a60>] show_regs+0x9a0/0x9e0
                                      sp=e00000000fd0f840 bsp=e00000000fd08f10
       [<a000000100037680>] die+0x260/0x3a0
                                      sp=e00000000fd0f840 bsp=e00000000fd08ec8
       [<a000000100037810>] die_if_kernel+0x50/0x80
                                      sp=e00000000fd0f840 bsp=e00000000fd08e98
       [<a00000010003eb40>] ia64_handle_unaligned+0x2ea0/0x2fc0
                                      sp=e00000000fd0f840 bsp=e00000000fd08df0
       [<a00000010001ca30>] ia64_prepare_handle_unaligned+0x30/0x60
                                      sp=e00000000fd0fa10 bsp=e00000000fd08df0
       [<a00000010005d100>] paravirt_leave_kernel+0x0/0x40
                                      sp=e00000000fd0fc20 bsp=e00000000fd08df0
       [<a0000001004c2ca0>] dev_kfree_skb_irq+0x20/0x1a0
                                      sp=e00000000fd0fdf0 bsp=e00000000fd08db8
       [<a0000001003efb70>] xennet_release_tx_bufs+0xd0/0x120
                                      sp=e00000000fd0fdf0 bsp=e00000000fd08d78
       [<a0000001003f14c0>] backend_changed+0xc40/0xf80
                                      sp=e00000000fd0fdf0 bsp=e00000000fd08d08
       [<a00000010034bd50>] otherend_changed+0x190/0x1c0
                                      sp=e00000000fd0fe00 bsp=e00000000fd08cc8
       [<a000000100349530>] xenwatch_thread+0x310/0x3c0
                                      sp=e00000000fd0fe00 bsp=e00000000fd08ca0
       [<a0000001000cb040>] kthread+0xe0/0x160
                                      sp=e00000000fd0fe30 bsp=e00000000fd08c68
       [<a000000100024450>] kernel_thread_helper+0x30/0x60
                                      sp=e00000000fd0fe30 bsp=e00000000fd08c40
       [<a00000010001a8a0>] start_kernel_thread+0x20/0x40
                                      sp=e00000000fd0fe30 bsp=e00000000fd08c40
      Kernel panic - not syncing: Aiee, killing interrupt handler!
      Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp>
      Cc: Stephen Tweedie <sct@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Mark McLoughlin <markmc@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1ffb40b8
  38. 03 7月, 2008 1 次提交