Thread (13 messages) 13 messages, 4 authors, 2000-06-20

Re: [linux-fbdev] Re: copy_from_user in drivers/video/fbmem.c

flat view

From: James Simmons <hidden>
Date: 2000-06-16 14:04:22

quoted
Which do people think is wrong:
Is copy_from_user() on PPC wrong, because it can't write to uncached
space.
Is fbmem.c wrong, because it tries to use copy_from_user() to memory
mapped IO?
Congratulations! You found a bug in fbmem.c! Fbmem.c should not use direct
memory accesses to access the frame buffer, but must use fb_writel() and
friends instead.
Let me guess, fb_write and fb_read. I have seen problems also with using
memset on a mmap framebuffer on the PPC. Geert I like to suggest we move
fb_write, fb_read, and fb_memset to fb.h so userland apps can use them.
Also I have though about having generic functions for register access
based on what is in atyfb.c for userland to use as well. Something like.

static inline u32 ld_le32(unsigned int regindex, struct fb_info *info);
etc.

Actually this problem is more general. We really should have a generic
access MMIO region function. I believe some sound cards can be mmapped as
well.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help