support for user-space buffers in kfifo
Nelson Castillo
AppliedQuoted 7 lines · Stelian Pop
Quoted 6 lines · Nelson Castillo
On 6/12/07, Stelian Pop <[email protected]> wrote:
(cut)Quoted 3 lines
accessing userspace memory with a spinlock taken (moreover an
irqsave()
one) is bad bad bad.
Quoted 5 lines
Quoted 3 lines
Hi Stelian.
I'm sending the new patch without
kfifo_put_userandkfifo_get_user.Ok, I have a few formatting/documentation comments:
Applied, thanks.
Quoted 1 line
Other than that I'm ok with this patch.
Submitting.
Regards, Nelson.-
---
include/linux/kfifo.h +5 -0
@@ -41,8 +41,13 @@ extern struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask,extern void kfifo_free (struct kfifo *fifo);extern unsigned int __kfifo_put (struct kfifo *fifo,unsigned char *buffer,unsigned int len); +extern int __kfifo_put_user (struct kfifo *fifo, +const unsigned char __user *buffer, +unsigned int len);extern unsigned int __kfifo_get (struct kfifo *fifo,unsigned char *buffer,unsigned int len); +extern int __kfifo_get_user (struct kfifo *fifo,unsigned char __user *buffer, +unsigned int len);/** * __kfifo_reset - removes the entire FIFO contents, no locking version
kernel/kfifo.c +110 -0
125 lines not on this page · raw message
Signature · 2 lines
http://arhuaco.org http://emQbit.com
Quoted 16 lines · Nelson Castillo
Quoted 7 lines · Stelian Pop
Quoted 6 lines · Nelson Castillo
On 6/12/07, Stelian Pop <[email protected]> wrote:
(cut)Quoted 3 lines
accessing userspace memory with a spinlock taken (moreover an
irqsave()
one) is bad bad bad.Quoted 5 lines
Quoted 3 lines
Hi Stelian.
I'm sending the new patch without
kfifo_put_userandkfifo_get_user.Ok, I have a few formatting/documentation comments:
Applied, thanks.
Quoted 7 lines
Quoted 1 line
Other than that I'm ok with this patch.
Submitting.
Regards, Nelson.-
Signed-off-by Nelson Castillo <[email protected]>
Thanks,
Stelian.
Signature · 1 line
Stelian Pop <[email protected]>