kernel-ark/lib
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
..
reed_solomon fix file specification in comments 2006-10-03 23:01:26 +02:00
zlib_deflate [PATCH] zlib_inflate: Upgrade library code to a recent version 2006-06-22 15:05:58 -07:00
zlib_inflate [PATCH] Fix ppc32 zImage inflate 2006-07-31 13:28:37 -07:00
.gitignore
audit.c [PATCH] fix missing ifdefs in syscall classes hookup for generic targets 2006-09-22 17:48:56 -07:00
bitmap.c [PATCH] bitmap: parse input from kernel and user buffers 2006-10-11 11:14:22 -07:00
bust_spinlocks.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
carta_random32.c [PATCH] Add carta_random32() library routine 2006-10-11 11:14:21 -07:00
cmdline.c
cpumask.c [PATCH] cpumask: add highest_possible_node_id 2006-10-02 07:57:17 -07:00
crc16.c [PATCH] kernel-doc for lib/crc*.c 2006-06-25 10:01:20 -07:00
crc32.c [PATCH] kernel-doc for lib/crc*.c 2006-06-25 10:01:20 -07:00
crc32defs.h
crc-ccitt.c [PATCH] kernel-doc for lib/crc*.c 2006-06-25 10:01:20 -07:00
ctype.c
debug_locks.c [PATCH] lockdep: better lock debugging 2006-07-03 15:27:01 -07:00
dec_and_lock.c [PATCH] atomic: dec_and_lock use atomic primitives 2006-01-08 20:13:48 -08:00
div64.c
dump_stack.c
extable.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
find_next_bit.c [PATCH] bitops: generic ext2_{set,clear,test,find_first_zero,find_next_zero}_bit() 2006-03-26 08:57:11 -08:00
gen_crc32table.c
genalloc.c [PATCH] make genpool allocator adhere to kernel-doc standards 2006-10-02 07:57:12 -07:00
halfmd4.c
hweight.c [PATCH] optimize hweight64 for x86_64 2006-09-26 10:52:38 +02:00
idr.c [PATCH] Convert idr's internal locking to _irqsave variant 2006-07-14 21:53:54 -07:00
inflate.c
int_sqrt.c [PATCH] lib: Fix bug in int_sqrt() for 64 bit longs 2006-02-03 08:32:08 -08:00
iomap_copy.c [PATCH] add __iowrite64_copy 2006-06-20 20:24:58 -07:00
iomap.c
ioremap.c [PATCH] Generic ioremap_page_range: flush_cache_vmap 2006-10-01 00:39:31 -07:00
irq_regs.c [PATCH] irq_reqs: export __irq_regs 2006-10-06 08:53:40 -07:00
Kconfig [PATCH] syscall class hookup for all normal targets 2006-09-12 03:04:40 -04:00
Kconfig.debug [PATCH] Add CONFIG_HEADERS_CHECK option to automatically run 'make headers_check' 2006-10-11 11:14:21 -07:00
kernel_lock.c [PATCH] lockdep: prove spinlock rwlock locking correctness 2006-07-03 15:27:04 -07:00
klist.c Driver core: Don't call put methods while holding a spinlock 2006-09-25 21:08:40 -07:00
kobject_uevent.c PCI: docking station: remove dock uevents 2006-08-03 13:20:06 -07:00
kobject.c kobject: must_check fixes 2006-09-25 21:08:39 -07:00
kref.c [PATCH] kref: avoid an atomic operation in kref_put() 2006-03-20 13:42:57 -08:00
libcrc32c.c [PATCH] constify libcrc32c table 2006-06-25 10:01:09 -07:00
list_debug.c [PATCH] list_del-debug fix 2006-10-01 00:39:17 -07:00
locking-selftest-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-mutex.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rlock-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rlock-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rlock.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-rsem.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-spin-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-spin-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-spin.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wlock-hardirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wlock-softirq.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wlock.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest-wsem.h [PATCH] lockdep: locking API self tests 2006-07-03 15:27:03 -07:00
locking-selftest.c [PATCH] lockdep: allow read_lock() recursion of same class 2006-07-03 15:27:04 -07:00
Makefile [PATCH] Add carta_random32() library routine 2006-10-11 11:14:21 -07:00
parser.c
percpu_counter.c [PATCH] percpu counter data type changes to suppport more than 2**31 ext3 free blocks counter 2006-06-23 07:43:06 -07:00
plist.c [PATCH] pi-futex: add plist implementation 2006-06-27 17:32:46 -07:00
prio_tree.c
radix-tree.c [PATCH] gfp annotations: radix_tree_root 2006-10-10 15:37:23 -07:00
rbtree.c [PATCH] rbtree: fixed reversed RB_EMPTY_NODE and rb_next/prev 2006-09-30 20:26:56 +02:00
rwsem-spinlock.c [PATCH] lockdep: prove rwsem locking correctness 2006-07-03 15:27:04 -07:00
rwsem.c [PATCH] lib/rwsem.c: un-inline rwsem_down_failed_common() 2006-09-29 09:18:22 -07:00
semaphore-sleepers.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sha1.c
smp_processor_id.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
sort.c [PATCH] low performance of lib/sort.c 2006-10-03 08:03:41 -07:00
spinlock_debug.c [PATCH] spinlock_debug: don't recompute (jiffies_per_loop * HZ) in spinloop 2006-09-29 09:18:06 -07:00
string.c [PATCH] strstrip() API 2006-06-23 07:43:06 -07:00
swiotlb.c BUG_ON() Conversion in lib/swiotlb.c 2006-03-24 18:47:11 +01:00
textsearch.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
ts_bm.c [TEXTSEARCH]: Fix Boyer Moore initialization bug 2006-08-22 14:33:58 -07:00
ts_fsm.c [PATCH] lib/ts_fsm.c: constify structs 2006-09-29 09:18:23 -07:00
ts_kmp.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
vsprintf.c Fix vsnprintf off-by-one bug 2006-06-28 17:09:34 -07:00