Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Nov 2008 16:28:11 -0800
From:      "David Christensen" <davidch@broadcom.com>
To:        "Poul-Henning Kamp" <phk@phk.freebsd.dk>
Cc:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   RE: Dumping Large Binary Buffer Through Sysctl
Message-ID:  <5D267A3F22FD854F8F48B3D2B52381933936483700@IRVEXCHCCR01.corp.ad.broadcom.com>
In-Reply-To: <44603.1226189982@critter.freebsd.dk>
References:  Your message of "Sat, 08 Nov 2008 14:16:19 PST." <5D267A3F22FD854F8F48B3D2B523819339364836FC@IRVEXCHCCR01.corp.ad.broadcom.com> <44603.1226189982@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
> >I'm looking for a way to dump a large binary debug buffer=3D20
> >in a driver to a file.  I've currently implemented this
> >with SYSCTL_ADD_OPAQUE() and it works fine but running the
> >"sysctl -a" command causes this buffer to be dumped which
> >is something of a pain.  Is there a better way to do this?
>=20
> Much better idea:  memory map it, that way your driver does
> not even discover that userland peeks over its shoulder.

I found the CTLFLAG_SKIP attribute which hides the sysctl and=20
makes things a lot better.  How do I "memory map" the buffer?
Can you give me a function name or point to an example where=20
this is done so I can look into it further?

Dave




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