public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [FIX] Re: 2.5.66 new fbcon oops while loading X
  2003-03-25 17:23 ` James Simmons
@ 2003-03-26 10:58   ` bert hubert
  2003-03-26 14:54     ` Wichert Akkerman
  2003-03-26 20:05     ` James Simmons
  0 siblings, 2 replies; 9+ messages in thread
From: bert hubert @ 2003-03-26 10:58 UTC (permalink / raw)
  To: James Simmons; +Cc: linux-kernel

On Tue, Mar 25, 2003 at 05:23:07PM +0000, James Simmons wrote:
> > While loading X, I get this oops. The weird thing is that I don't use
> > framebuffer. I compiled with gcc 3.2.2 but the code generated looks weird.
> > Virgin gcc 3.2.2 on a pentium III.
> 
> You don't use framebuffer? Can you send me your config. 

Ok, I've found the bug, it is in fb_open() in drivers/video/fbmem.c, it
needs this addition:

        if(fbidx >= FB_MAX)
                return -ENODEV;

Without it, large minor numbers result in access beyond the end of
registered_fb.

On Debian, ls /dev/fb[67] results in:
crw--w--w-    1 root     tty       29, 192 Nov 30  2000 /dev/fb6
crw--w--w-    1 root     tty       29, 224 Nov 30  2000 /dev/fb7

On Red Hat this is: 
crw-------    1 root     root      29,   7 Apr 11  2002 /dev/fb7
crw-------    1 root     root      29,   8 Apr 11  2002 /dev/fb8

Which explains why many don't see this bug.

Regards,

bert

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
http://netherlabs.nl                         Consulting

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FIX] Re: 2.5.66 new fbcon oops while loading X
  2003-03-26 10:58   ` [FIX] Re: 2.5.66 new fbcon oops while loading X bert hubert
@ 2003-03-26 14:54     ` Wichert Akkerman
  2003-03-26 20:10       ` James Simmons
  2003-03-26 20:05     ` James Simmons
  1 sibling, 1 reply; 9+ messages in thread
From: Wichert Akkerman @ 2003-03-26 14:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: bert hubert, James Simmons

Previously bert hubert wrote:
> On Debian, ls /dev/fb[67] results in:
> crw--w--w-    1 root     tty       29, 192 Nov 30  2000 /dev/fb6
> crw--w--w-    1 root     tty       29, 224 Nov 30  2000 /dev/fb7

Documentation/devices.txt (at least in 2.5.64) states that those
devices should be fully supported:

                For backwards compatibility {2.6} the following
                progression is also handled by current kernels:
                  0 = /dev/fb0
                 32 = /dev/fb1
                    ...
                224 = /dev/fb7

So perhaps the patch should look something like:

if (fbidx >= FB_MAX) {
	/* Support older device minor numbering */
	if (fbidx%32!=0)
		return -ENODEV;
	else
		fbidx/=32;

	/* Check if it is still too large */
	if (fbidx >= FB_MAX)
		return -ENODEV;
}

Wichert.

-- 
Wichert Akkerman <wichert@wiggy.net>           http://www.wiggy.net/
A random hacker

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FIX] Re: 2.5.66 new fbcon oops while loading X
  2003-03-26 10:58   ` [FIX] Re: 2.5.66 new fbcon oops while loading X bert hubert
  2003-03-26 14:54     ` Wichert Akkerman
@ 2003-03-26 20:05     ` James Simmons
  1 sibling, 0 replies; 9+ messages in thread
From: James Simmons @ 2003-03-26 20:05 UTC (permalink / raw)
  To: bert hubert; +Cc: Linux Kernel Mailing List, Linux Fbdev development list


> On Tue, Mar 25, 2003 at 05:23:07PM +0000, James Simmons wrote:
> > > While loading X, I get this oops. The weird thing is that I don't use
> > > framebuffer. I compiled with gcc 3.2.2 but the code generated looks weird.
> > > Virgin gcc 3.2.2 on a pentium III.
> > 
> > You don't use framebuffer? Can you send me your config. 
> 
> Ok, I've found the bug, it is in fb_open() in drivers/video/fbmem.c, it
> needs this addition:
> 
>         if(fbidx >= FB_MAX)
>                 return -ENODEV;
> 
> Without it, large minor numbers result in access beyond the end of
> registered_fb.
> 
> On Debian, ls /dev/fb[67] results in:
> crw--w--w-    1 root     tty       29, 192 Nov 30  2000 /dev/fb6
> crw--w--w-    1 root     tty       29, 224 Nov 30  2000 /dev/fb7
> 
> On Red Hat this is: 
> crw-------    1 root     root      29,   7 Apr 11  2002 /dev/fb7
> crw-------    1 root     root      29,   8 Apr 11  2002 /dev/fb8
> 
> Which explains why many don't see this bug.

Ah. That explains it. I will apply the fix.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FIX] Re: 2.5.66 new fbcon oops while loading X
  2003-03-26 14:54     ` Wichert Akkerman
@ 2003-03-26 20:10       ` James Simmons
  2003-03-26 22:42         ` Wichert Akkerman
  0 siblings, 1 reply; 9+ messages in thread
From: James Simmons @ 2003-03-26 20:10 UTC (permalink / raw)
  To: Wichert Akkerman; +Cc: linux-kernel, bert hubert


> Previously bert hubert wrote:
> > On Debian, ls /dev/fb[67] results in:
> > crw--w--w-    1 root     tty       29, 192 Nov 30  2000 /dev/fb6
> > crw--w--w-    1 root     tty       29, 224 Nov 30  2000 /dev/fb7
> 
> Documentation/devices.txt (at least in 2.5.64) states that those
> devices should be fully supported:
> 
>                 For backwards compatibility {2.6} the following
>                 progression is also handled by current kernels:
>                   0 = /dev/fb0
>                  32 = /dev/fb1
>                     ...
>                 224 = /dev/fb7

That is no longer true. The fb nodes should be recreated. I fixed the docs 
in devices.txt




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FIX] Re: 2.5.66 new fbcon oops while loading X
  2003-03-26 20:10       ` James Simmons
@ 2003-03-26 22:42         ` Wichert Akkerman
  2003-03-27  0:23           ` James Simmons
  0 siblings, 1 reply; 9+ messages in thread
From: Wichert Akkerman @ 2003-03-26 22:42 UTC (permalink / raw)
  To: linux-kernel

Previously James Simmons wrote:
> That is no longer true. The fb nodes should be recreated. I fixed the docs 
> in devices.txt

Fine with me, however someone might want to look at the device numbering
that the various Linux distros are using at this moment. I know Debian
is using the old numbering and I just filed a bugreport to get that
updated. I do expect a fair amount of people will run into this when
they upgrade to 2.5/2.6 kernels.

Wichert.

-- 
Wichert Akkerman <wichert@wiggy.net>           http://www.wiggy.net/
A random hacker

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FIX] Re: 2.5.66 new fbcon oops while loading X
  2003-03-26 22:42         ` Wichert Akkerman
@ 2003-03-27  0:23           ` James Simmons
  2003-03-27  9:56             ` Wichert Akkerman
  0 siblings, 1 reply; 9+ messages in thread
From: James Simmons @ 2003-03-27  0:23 UTC (permalink / raw)
  To: Wichert Akkerman; +Cc: linux-kernel


> Previously James Simmons wrote:
> > That is no longer true. The fb nodes should be recreated. I fixed the docs 
> > in devices.txt
> 
> Fine with me, however someone might want to look at the device numbering
> that the various Linux distros are using at this moment. I know Debian
> is using the old numbering and I just filed a bugreport to get that
> updated. I do expect a fair amount of people will run into this when
> they upgrade to 2.5/2.6 kernels.

Only if they have more than one video card which is pretty small number.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FIX] Re: 2.5.66 new fbcon oops while loading X
  2003-03-27  0:23           ` James Simmons
@ 2003-03-27  9:56             ` Wichert Akkerman
  0 siblings, 0 replies; 9+ messages in thread
From: Wichert Akkerman @ 2003-03-27  9:56 UTC (permalink / raw)
  To: linux-kernel

Previously James Simmons wrote:
> Only if they have more than one video card which is pretty small number.

Since when is that a relevant factor in breaking backwards
compatibility?

Wichert.

-- 
Wichert Akkerman <wichert@wiggy.net>           http://www.wiggy.net/
A random hacker

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FIX] Re: 2.5.66 new fbcon oops while loading X
@ 2003-03-27 10:49 Petr Vandrovec
       [not found] ` <BKEGKPICNAKILKJKMHCAIEFBCGAA.Riley@Williams.Name>
  0 siblings, 1 reply; 9+ messages in thread
From: Petr Vandrovec @ 2003-03-27 10:49 UTC (permalink / raw)
  To: Wichert Akkerman; +Cc: linux-kernel

On 27 Mar 03 at 10:56, Wichert Akkerman wrote:
> Previously James Simmons wrote:
> > Only if they have more than one video card which is pretty small number.
> 
> Since when is that a relevant factor in breaking backwards
> compatibility?

All G400 and newer matroxfb users have dualhead system, so number is
not that small. Definitely not from my point of view ;-)

Problem is that Debian unstable still supports 2.2.x kernels
(kernel-image-2.2.20... & 2.2.22) and this version supports only 0/32/64/...
minors. 

So if you filled bug against makedev, you have to fill bug against 2.2.x
kernels too - either remove them or patch them, as otherwise updated
makedev has to conflict with kernels << 2.4.0.
                                                            Petr Vandrovec
                                                            


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FIX] Re: 2.5.66 new fbcon oops while loading X
       [not found] ` <BKEGKPICNAKILKJKMHCAIEFBCGAA.Riley@Williams.Name>
@ 2003-04-12  9:39   ` Wichert Akkerman
  0 siblings, 0 replies; 9+ messages in thread
From: Wichert Akkerman @ 2003-04-12  9:39 UTC (permalink / raw)
  To: linux-kernel

Previously Riley Williams wrote:
> Surely the correct fix is to have the updated MAKEDEV do something
> along the lines of...

That's fine for new installs, but people never run MAKEDEV when
upgrading their kernel.

Wichert.

-- 
Wichert Akkerman <wichert@wiggy.net>           http://www.wiggy.net/
A random hacker

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-04-12  9:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-27 10:49 [FIX] Re: 2.5.66 new fbcon oops while loading X Petr Vandrovec
     [not found] ` <BKEGKPICNAKILKJKMHCAIEFBCGAA.Riley@Williams.Name>
2003-04-12  9:39   ` Wichert Akkerman
  -- strict thread matches above, loose matches on Subject: below --
2003-03-25 12:31 2.5.66 new fbcon oops while loading X / possible gcc bug? bert hubert
2003-03-25 17:23 ` James Simmons
2003-03-26 10:58   ` [FIX] Re: 2.5.66 new fbcon oops while loading X bert hubert
2003-03-26 14:54     ` Wichert Akkerman
2003-03-26 20:10       ` James Simmons
2003-03-26 22:42         ` Wichert Akkerman
2003-03-27  0:23           ` James Simmons
2003-03-27  9:56             ` Wichert Akkerman
2003-03-26 20:05     ` James Simmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox