1
0
Fork 0
alistair23-linux/include
Reinette Chatre 01a3ee2b20 [PATCH] bitmap: parse input from kernel and user buffers
lib/bitmap.c:bitmap_parse() is a library function that received as input a
user buffer.  This seemed to have originated from the way the write_proc
function of the /proc filesystem operates.

This has been reworked to not use kmalloc and eliminates a lot of
get_user() overhead by performing one access_ok before using __get_user().

We need to test if we are in kernel or user space (is_user) and access the
buffer differently.  We cannot use __get_user() to access kernel addresses
in all cases, for example in architectures with separate address space for
kernel and user.

This function will be useful for other uses as well; for example, taking
input for /sysfs instead of /proc, so it was changed to accept kernel
buffers.  We have this use for the Linux UWB project, as part as the
upcoming bandwidth allocator code.

Only a few routines used this function and they were changed too.

Signed-off-by: Reinette Chatre <reinette.chatre@linux.intel.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-11 11:14:22 -07:00
..
acpi ACPI: Allow setting SCI_EN bit in PM1_CONTROL register 2006-10-10 17:14:44 -07:00
asm-alpha [PATCH] alpha pt_regs cleanups: machine_check() 2006-10-08 12:32:36 -07:00
asm-arm IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
asm-arm26 fix file specification in comments 2006-10-03 23:01:26 +02:00
asm-avr32 [PATCH] IRQ: Fix AVR32 breakage 2006-10-11 11:14:14 -07:00
asm-cris [PATCH] remove remaining errno and __KERNEL_SYSCALLS__ references 2006-10-02 07:57:23 -07:00
asm-frv IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
asm-generic [PATCH] sched: likely profiling 2006-10-11 11:14:22 -07:00
asm-h8300 [PATCH] remove remaining errno and __KERNEL_SYSCALLS__ references 2006-10-02 07:57:23 -07:00
asm-i386 [PATCH] epoll_pwait() 2006-10-11 11:14:21 -07:00
asm-ia64 [PATCH] ia64/sn __iomem annotations 2006-10-10 15:37:22 -07:00
asm-m32r [PATCH] m32r pt_regs fixes 2006-10-07 10:51:15 -07:00
asm-m68k [PATCH] m68k: more syscall updates 2006-10-09 14:53:35 -07:00
asm-m68knommu fix file specification in comments 2006-10-03 23:01:26 +02:00
asm-mips [MIPS] Make sure cpu_has_fpu is used only in atomic context 2006-10-09 23:20:48 +01:00
asm-parisc [PARISC] pdc_init no longer exists 2006-10-07 05:22:30 -06:00
asm-powerpc IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
asm-ppc [POWERPC] ARCH=ppc pt_regs fixes 2006-10-10 11:55:25 +10:00
asm-s390 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2006-10-06 09:13:53 -07:00
asm-sh fix file specification in comments 2006-10-03 23:01:26 +02:00
asm-sh64 fix file specification in comments 2006-10-03 23:01:26 +02:00
asm-sparc IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
asm-sparc64 [PATCH] sparc64 pt_regs fixes 2006-10-08 12:32:35 -07:00
asm-um [PATCH] um: irq changes break build 2006-10-06 08:53:42 -07:00
asm-v850 [PATCH] remove remaining errno and __KERNEL_SYSCALLS__ references 2006-10-02 07:57:23 -07:00
asm-x86_64 [PATCH] x86_64 irq: Allocate a vector across all cpus for genapic_flat. 2006-10-08 12:24:02 -07:00
asm-xtensa fix file specification in comments 2006-10-03 23:01:26 +02:00
crypto [CRYPTO] digest: Added user API for new hash type 2006-09-21 11:46:17 +10:00
keys [PATCH] keys: discard the contents of a key on revocation 2006-06-26 09:58:18 -07:00
linux [PATCH] bitmap: parse input from kernel and user buffers 2006-10-11 11:14:22 -07:00
math-emu
media V4L/DVB (4666): Ensure the WM8775 driver is loaded generically for any board. 2006-10-03 15:13:48 -03:00
mtd Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-10-01 17:55:53 +01:00
net Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
pcmcia
rdma IB/sa: fix ib_sa_selector names 2006-09-22 15:22:55 -07:00
rxrpc
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2006-10-04 18:57:35 -07:00
sound [ALSA] version 1.0.13 2006-10-06 20:28:26 +02:00
video fix file specification in comments 2006-10-03 23:01:26 +02:00
Kbuild [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00