|
From: Geert U. <ge...@li...> - 2003-01-07 21:33:17
|
On Tue, 7 Jan 2003, James Simmons wrote:
> > Wouldn't it make sense to make the fb_{fillrect,copyarea,image} parameters of
> > the fb_ops.fb_{fillrect,copyarea,image}() operations const? This would protect
> > us against side effects when reusing the fb_{fillrect,copyarea,image} structs
> > without reinitializing their contents (as is currently done by the logo drawing
> > code in fbcon_show_logo() on SMP).
>
> Where is this exactly?
drivers/video/fbmem.c:fb_show_logo() initializes only image.dx in each loop
iteration:
| for (x = 0; x < num_online_cpus() * (LOGO_W + 8) &&
| x < info->var.xres - (LOGO_W + 8); x += (LOGO_W + 8)) {
| image.dx = x;
| info->fbops->fb_imageblit(info, &image);
| done = 1;
| }
> > Of course this means that we have to modify the clipping code, which currently
> > just modifies the passed structure.
>
> :-( That is done to prevent someone from passing data that is larger than
> the framebuffer.
You can still do clipping without modifying the passed structure, right?
BTW, is it possible that someone passes data that is larger (except for bugs)?
We have control over what happens in the kernel. Data passed from userspace is
a different issue, of course.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li...
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
|