Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Aug 1996 08:50:10 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-hackers@freebsd.org (FreeBSD hackers)
Subject:   Re: kern_mib.c:int securelevel = -1;
Message-ID:  <199608110650.IAA04874@uriah.heep.sax.de>
In-Reply-To: <199608110035.RAA00338@rah.star-gate.com> from Amancio Hasty at "Aug 10, 96 05:35:21 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
As Amancio Hasty wrote:

> > It's not so easy to provide since:
> > 
> > 0) the graphics console drivers are too dumb to know about the details
> >    of their devices, so they have no idea where the frame buffer
> >    actually is.  This is the usual ``the DDX layer should actually be
> >    in the kernel'' problem.
> > 
> If all what you want to add is the frame buffer then it should be easy
> to move the mapping of the frame buffer to the console drivers.
> In essence move the logic to map the frame buffers from the hardware
> specifics in the "DDX layer" to the kernel. 

Alas, this would require to move many chipset-specific hacks into the
kernel, something that doesn't fit in the current model.  It's really
a question of whether moving DDX into the kernel or not.  The mmap
code in DDX is nothing less or more hardware-specific than, say the
clocks programming.

Btw., Bruce, if it doesn't refuse to work in securelevel > 0, our
securelevel is broken.  The code always tries to mmap() /dev/mem
first, and opens a descriptor O_RDWR for this purpose.  Only if this
fails, it complains at stderr, and falls back to banked mode mapping
/dev/ttyv0.

NetBSD's aperture driver works with /dev/xf86, but i haven't looked
how the mapping is validated and prevented from being abused to map an
arbitrary piece of memory.  Perhaps the driver restricts the mapping
to the known VGA window or anything beyond the end of physical RAM,
which is certainly not ideal but would at least prevent abusing it to
spy the physical RAM.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



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