Re: [4KSTACK][2.6.6] Stack overflow in radeonfb

From: Kronos
Date: Fri May 14 2004 - 11:45:34 EST


Il Fri, May 14, 2004 at 08:55:02AM +1000, Benjamin Herrenschmidt ha scritto:
>
> >
> > int radeonfb_set_par(struct fb_info *info)
> > {
> > struct radeonfb_info *rinfo = info->par;
> > struct fb_var_screeninfo *mode = &info->var;
> > struct radeon_regs newmode;
> >
> > struct radeon_regs is huge: 2356 bytes
> > Quick fix (I'll test ASAP):
>
> Wow, this is evil indeed, I didn't expect that struct to be that big,
> but well... I did add a bunch of stuff to it lately.

There are 2 arrays at the end of the struct:

struct radeon_regs {
....
u32 palette[256];
u32 palette2[256];
};

they take 2KB alone and AFAICS they are not used anywhere. Maybe they
can be removed?

Luca
--
Home: http://kronoz.cjb.net
"Sei l'unica donna della mia vita".
(Adamo)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/