Re: [linux-fbdev] Re: [PATCH] updated Mips Magnum frame buf

From: James Simmons (jsimmons@acsu.buffalo.edu)
Date: Sat May 20 2000 - 09:09:20 EST


> If it doesn't, technically your random box process is buggy.

I also realized its easy to write a rogue program that can be used to spy
on other VTs this way :( Have app open /dev/fb. Make sure both consoles
have the same video mode. This way you will not notice the vt switch. mmap
the framebuffer and clear it. This way the VT you are on and the other VT
look the same. Call VT_ACTIVATE to switch away. Begin real part of app.
While doing this we have a image of the framebuffer saved to file to
record what person is doing. Yipes!!!

> About /dev/fb, ioctls and memory...
>
> Currently, the memory regions you access via /dev/fb refer to the
> currently visible framebuffer, no matter what VT you are currently
> switched to. This is correct, since we're using a framebuffer device,
> not a virtual terminal device.

I agree with this.

> However, the ioctls to the very same framebuffer device have very
> indeterminent results unless you go through a lot of pain. By this,
> I mean that you're using a framebuffer device, but your ioctls are
> treated as being via a virtual terminal device IF the current process
> has a fbcon tty associated with it.

Ouch!! I can see how this is bad.

> Yes, this greys the border between tty and fb, but what are we really
> asking for when we open each of these devices? /dev/tty* is all about
> the current VT state. /dev/fb refers to the framebuffer state.

I agree. The only part that gets funny is when you have the ability to
have direct access to the framebuffer and you can VT switch. You have to
hope that a app behaves properly :(

> We can easily pick up on (2) in console.c or vt.c, and pass them to the
> {fb,vga}con drivers themselves. This should end up with a cleaner
> interface in terms of the fbcon/fbdriver level. And yes, the fbdriver
> level ioctls should affect the currently visible VT on that driver.

I agree. To add the functionality some people want we need to extended the
console API. I guess this is for 2.5.X with the feature freeze in effect.
Well the console needs serious cleanup anyways (*shameless plug*).

http://linuxconsole.sourceforge.net

Q: Why did they deprecate a.out support in linux?
A: Because a nasty coff is bad for your elf.

James Simmons [jsimmons@linux-fbdev.org] ____/|
fbdev/gfx developer \ o.O|
http://www.linux-fbdev.org =(_)=
http://linuxgfx.sourceforge.net U

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:18 EST