]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'generic-string-functions'
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 26 May 2012 23:57:16 +0000 (16:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 26 May 2012 23:57:16 +0000 (16:57 -0700)
This makes <asm/word-at-a-time.h> actually live up to its promise of
allowing architectures to help tune the string functions that do their
work a word at a time.

David had already taken the x86 strncpy_from_user() function, modified
it to work on sparc, and then done the extra work to make it generically
useful.  This then expands on that work by making x86 use that generic
version, completing the circle.

But more importantly, it fixes up the word-at-a-time interfaces so that
it's now easy to also support things like strnlen_user(), and pretty
much most random string functions.

David reports that it all works fine on sparc, and Jonas Bonn reported
that an earlier version of this worked on OpenRISC too.  It's pretty
easy for architectures to add support for this and just replace their
private versions with the generic code.

* generic-string-functions:
  sparc: use the new generic strnlen_user() function
  x86: use the new generic strnlen_user() function
  lib: add generic strnlen_user() function
  word-at-a-time: make the interfaces truly generic
  x86: use generic strncpy_from_user routine

1  2 
lib/Kconfig
lib/Makefile

diff --cc lib/Kconfig
Simple merge
diff --cc lib/Makefile
index 2a1d7f9d39a2349f7adce9413436ebe4fc583577,77937a7dd5ce31123f3ed6096cdbf2dad6b3602b..8c31a0cb75e97746af1cd02906ac149105250cc2
@@@ -126,9 -126,8 +126,10 @@@ obj-$(CONFIG_CLZ_TAB) += clz_tab.
  obj-$(CONFIG_DDR) += jedec_ddr_data.o
  
  obj-$(CONFIG_GENERIC_STRNCPY_FROM_USER) += strncpy_from_user.o
+ obj-$(CONFIG_GENERIC_STRNLEN_USER) += strnlen_user.o
  
 +obj-$(CONFIG_STMP_DEVICE) += stmp_device.o
 +
  hostprogs-y   := gen_crc32table
  clean-files   := crc32table.h