Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Mar 2009 22:17:44 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/net bpf.c
Message-ID:  <200903072217.n27MHsPH003809@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2009-03-07 22:17:44 UTC

  FreeBSD src repository

  Modified files:
    sys/net              bpf.c 
  Log:
  SVN rev 189501 on 2009-03-07 22:17:44Z by rwatson
  
  When resetting a BPF descriptor, properly check that zero-copy buffers
  are not currently owned by userspace before clearing or rotating them.
  
  Otherwise we may not play by the rules of the shared memory protocol,
  potentially corrupting packet data or causing userspace applications
  that are playing by the rules to spin due to being notified that a
  buffer is complete but the shared memory header not reflecting that.
  
  This behavior was seen with pflogd by a number of reporters; note that
  this fix is not sufficient to get pflogd properly working with
  zero-copy BPF, due to pflogd opening the BPF device before forking,
  leading to the shared memory buffer not being propery inherited in the
  privilege-separated child.  We're still deciding how to fix that
  problem.
  
  This change exposes buffer-model specific strategy information in
  reset_d(), which will be fixed at a later date once we've decided how
  best to improve the BPF buffer abstraction.
  
  Reviewed by:    csjp
  Reported by:    keramida
  
  Revision  Changes    Path
  1.206     +11 -5     src/sys/net/bpf.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903072217.n27MHsPH003809>