1. 24 Feb, 2012 27 commits
  2. 23 Feb, 2012 10 commits
  3. 22 Feb, 2012 3 commits
    • Ben Hutchings's avatar
      sfc: Minor formatting cleanup · 2d0cc56d
      Ben Hutchings authored
      Fix some indentation and line continuations.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      2d0cc56d
    • Ben Hutchings's avatar
      sfc: Reverse initial buffer table allocation to allow for later resizing · c92aaff1
      Ben Hutchings authored
      We have a very simple way of allocating buffer table entries to
      queues, which is just to take the next one available.  The extra
      channels are the highest numbered channels but they need to be
      allocated the lowest entries so that the traffic channels can be
      allocated new entries without any collisions.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      c92aaff1
    • Ben Hutchings's avatar
      sfc: Correct validation of peer_page_count in efx_vfdi_set_status_page() · 01cb543d
      Ben Hutchings authored
      efx_vfdi_set_status_page() validates the peer page count by
      calculating the size of a request containing that many addresses and
      comparing that with the maximum valid request size (4KB).  The
      calculation involves a multiplication that may overflow on a 32-bit
      system.
      
      We use kcalloc() to allocate memory to store the addresses; that also
      does a multiplication and it does check for integer overflow, so any
      values larger than 0x1fffffff will be rejected.  However, values in
      the range [0x1fffffffc, 0x1fffffff] pass boh tests and result in an
      attempt to allocate nearly 4GB on the heap.  This should be rejected
      rather quickly as it's obviously impossible on a 32-bit system, and
      indeed the maximum possible heap allocation is 32MB.  Still, let's
      make absolutely sure by fixing the initial validation.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      01cb543d