android_kernel_samsung_a7y1.../lib
Matthew Wilcox 06d2173e3d lib/string.c: add multibyte memset functions
Patch series "Multibyte memset variations", v4.

A relatively common idiom we're missing is a function to fill an area of
memory with a pattern which is larger than a single byte.  I first
noticed this with a zram patch which wanted to fill a page with an
'unsigned long' value.  There turn out to be quite a few places in the
kernel which can benefit from using an optimised function rather than a
loop; sometimes text size, sometimes speed, and sometimes both.  The
optimised PowerPC version (not included here) improves performance by
about 30% on POWER8 on just the raw memset_l().

Most of the extra lines of code come from the three testcases I added.

This patch (of 8):

memset16(), memset32() and memset64() are like memset(), but allow the
caller to fill the destination with a value larger than a single byte.
memset_l() and memset_p() allow the caller to use unsigned long and
pointer values respectively.

Link: http://lkml.kernel.org/r/20170720184539.31609-2-willy@infradead.org
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: David Miller <davem@davemloft.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-08-19 11:34:40 +05:30
..
842 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fonts A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lz4 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lzo A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mpi lib/mpi: Fix karactx leak in mpi_powm 2020-04-06 19:21:06 +02:00
raid6 lib: raid6: fix awk build warnings 2020-04-07 13:07:01 +02:00
reed_solomon rslib: Fix handling of of caller provided syndrome 2020-04-06 19:55:29 +02:00
xz A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zlib_deflate A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zlib_inflate A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zstd A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
argv_split.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
asn1_decoder.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
assoc_array.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atomic64_test.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atomic64.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
audit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bch.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bitmap.c bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free() 2020-04-07 13:45:09 +02:00
bitrev.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bsearch.c kprobes: Prohibit probing on bsearch() 2020-04-06 14:51:19 +02:00
btree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
build_OID_registry A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bust_spinlocks.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
check_signature.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
checksum.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
clz_ctz.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
clz_tab.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cmdline.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
compat_audit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cordic.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpu_rmap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpu-notifier-error-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpumask.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc-ccitt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc-itu-t.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc-t10dif.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc7.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc8.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc16.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc32.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crc32defs.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ctype.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debug_info.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debug_locks.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debugobjects.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dec_and_lock.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_bunzip2.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_inflate.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_unlz4.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_unlzma.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_unlzo.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress_unxz.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
decompress.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
devres.c devres: allow const resource arguments 2020-04-07 13:42:28 +02:00
digsig.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
div64.c lib/div64.c: off by one in shift 2020-04-06 15:20:42 +02:00
dma-debug.c dma-debug: add a schedule point in debug_dma_dump_mappings() 2020-04-07 13:22:54 +02:00
dump_stack.c dump_stack: avoid the livelock of the dump_lock 2020-04-07 11:48:34 +02:00
dynamic_debug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dynamic_queue_limits.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
earlycpio.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extable.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fault-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_empty_tree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_ro.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_rw.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_strerror.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_sw.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt_wip.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fdt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
find_bit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
flex_array.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
flex_proportions.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gen_crc32table.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
genalloc.c lib/genalloc.c: include vmalloc.h 2020-04-07 12:42:44 +02:00
glob.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
halfmd4.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hexdump.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hweight.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
inflate.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
int_sqrt.c lib/int_sqrt: optimize initial value compute 2020-04-06 13:43:46 +02:00
interval_tree_test.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
interval_tree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iomap_copy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iomap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iommu-common.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iommu-helper.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ioremap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iov_iter.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
irq_regs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
is_single_threaded.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
jedec_ddr_data.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kasprintf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.debug kmemleak: increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K 2020-04-07 07:55:16 +02:00
Kconfig.kasan A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.kgdb A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.kmemcheck A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kfifo.c Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()" 2020-04-07 13:43:03 +02:00
klist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kobject_uevent.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kobject.c kobject: Export kobject_get_unless_zero() 2020-04-07 13:29:27 +02:00
kstrtox.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kstrtox.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lcm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
libcrc32c.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
list_debug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
list_sort.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
llist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-hardirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-mutex.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-rlock-hardirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-rlock-softirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-rlock.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-rsem.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-softirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-spin-hardirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-spin-softirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-spin.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-wlock-hardirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-wlock-softirq.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-wlock.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest-wsem.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
locking-selftest.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lockref.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lru_cache.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile siphash: add cryptographically secure PRF 2020-04-06 21:32:41 +02:00
md5.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
memory-notifier-error-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
memweight.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
net_utils.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nlattr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nmi_backtrace.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
notifier-error-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
notifier-error-inject.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
of-reconfig-notifier-error-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
oid_registry.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
once.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parser.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pci_iomap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
percpu_counter.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
percpu_ida.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
percpu_test.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
percpu-refcount.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
plist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pm-notifier-error-inject.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
proportions.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
radix-tree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
random32.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ratelimit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rational.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rbtree_test.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rbtree.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
reciprocal_div.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rhashtable.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
scatterlist.c lib/scatterlist.c: adjust indentation in __sg_alloc_table 2020-04-07 13:57:21 +02:00
seq_buf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sg_split.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sha1.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
show_mem.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
siphash.c siphash: implement HalfSipHash1-3 for hash tables 2020-04-06 21:32:43 +02:00
smp_processor_id.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sort.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stackdepot.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stmp_device.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
string_helpers.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
string.c lib/string.c: add multibyte memset functions 2020-08-19 11:34:40 +05:30
strncpy_from_user.c mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions 2020-04-06 18:18:29 +02:00
strnlen_user.c mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions 2020-04-06 18:18:29 +02:00
swiotlb.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
syscall.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_bpf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_firmware.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_kasan.c lib/test_kasan.c: fix memory leak in kmalloc_oob_krealloc_more() 2020-04-07 13:49:45 +02:00
test_module.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_printf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_rhashtable.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_siphash.c siphash: implement HalfSipHash1-3 for hash tables 2020-04-06 21:32:43 +02:00
test_static_key_base.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_static_keys.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test_user_copy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test-hexdump.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test-kstrtox.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
test-string_helpers.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
textsearch.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
timerqueue.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ts_bm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ts_fsm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ts_kmp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ucs2_string.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usercopy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uuid.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vsprintf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xxhash.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30