linux/lib
Marco Elver bb104ed785 lib/test_kasan: Add test for double-kzfree detection
Add a simple test that checks if double-kzfree is being detected
correctly.

Link: http://lkml.kernel.org/r/20190626142014.141844-4-elver@google.com
Signed-off-by: Marco Elver <elver@google.com>
Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-07-12 11:05:42 -07:00
..
842 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
crypto crypto: arc4 - refactor arc4 core code into separate library 2019-06-20 14:18:33 +08:00
dim linux/dim: Add completions count to dim_sample 2019-06-25 13:46:40 -07:00
fonts treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
livepatch livepatch: Proper error handling in the shadow variables selftest 2019-02-06 11:01:57 +01:00
lz4 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
lzo treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
math treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mpi Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-07-05 13:31:19 +09:00
raid6 s390 updates for the 5.3 merge window 2019-07-08 10:06:12 -07:00
reed_solomon rslib: Make some functions static 2019-07-02 08:41:37 +02:00
vdso lib/vdso: Make delta calculation work correctly 2019-06-26 14:26:53 +02:00
xz treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
zlib_deflate treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
zlib_inflate treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
zstd treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
.gitignore
argv_split.c
ashldi3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 120 2019-05-24 17:39:02 +02:00
ashrdi3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 120 2019-05-24 17:39:02 +02:00
asn1_decoder.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
assoc_array.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
atomic64_test.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
atomic64.c locking/atomic: Use s64 for atomic64 2019-06-03 12:32:56 +02:00
audit.c
bcd.c
bch.c lib/bch: fix possible stack overrun 2018-10-12 09:17:46 +02:00
bitmap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
bitrev.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
bsearch.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372 2019-06-05 17:37:10 +02:00
btree.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 431 2019-06-05 17:37:16 +02:00
bucket_locks.c
bug.c
build_OID_registry treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
bust_spinlocks.c s390: use common bust_spinlocks() 2018-11-30 07:22:05 +01:00
chacha.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
check_signature.c
checksum.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
clz_ctz.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
clz_tab.c
cmdline.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
cmpdi2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 120 2019-05-24 17:39:02 +02:00
compat_audit.c
cpu_rmap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cpumask.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
crc4.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
crc7.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
crc8.c
crc16.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
crc32.c lib/crc32.c: mark crc32_le_base/__crc32c_le_base aliases as __pure 2019-02-15 19:50:07 +01:00
crc32defs.h
crc32test.c
crc64.c
crc-ccitt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
crc-itu-t.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
crc-t10dif.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
ctype.c
debug_info.c
debug_locks.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
debugobjects.c debugobjects: Move printk out of db->lock critical sections 2019-06-14 14:51:16 +02:00
dec_and_lock.c
decompress_bunzip2.c
decompress_inflate.c
decompress_unlz4.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
decompress_unlzma.c
decompress_unlzo.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 95 2019-05-24 17:37:53 +02:00
decompress_unxz.c
decompress.c
devres.c devres: allow const resource arguments 2019-07-05 11:12:07 +09:00
digsig.c Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
dump_stack.c
dynamic_debug.c RDMA/core: Introduce RDMA subsystem ibdev_* print functions 2019-05-01 12:29:28 -04:00
dynamic_queue_limits.c
earlycpio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 283 2019-06-05 17:36:37 +02:00
error-inject.c treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively 2019-04-09 14:19:06 +02:00
errseq.c
extable.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fault-inject.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
fdt_empty_tree.c
fdt_ro.c
fdt_rw.c
fdt_strerror.c
fdt_sw.c
fdt_wip.c
fdt.c
find_bit_benchmark.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295 2019-06-05 17:36:38 +02:00
find_bit.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
flex_proportions.c
gen_crc32table.c
gen_crc64table.c lib: don't depend on linux headers being installed. 2018-12-29 11:36:44 -08:00
genalloc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
generic-radix-tree.c generic radix trees 2019-03-12 10:04:02 -07:00
glob.c
globtest.c
hexdump.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 501 2019-06-19 17:09:56 +02:00
hweight.c x86/kconfig: Disable CONFIG_GENERIC_HWEIGHT and remove __HAVE_ARCH_SW_HWEIGHT 2019-05-13 11:07:33 +02:00
idr.c idr: Fix idr_get_next race with idr_remove 2019-06-02 23:00:24 -04:00
inflate.c
interval_tree_test.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
interval_tree.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
iomap_copy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504 2019-06-19 17:09:56 +02:00
iomap.c iomap: introduce io{read|write}64_{lo_hi|hi_lo} 2019-01-22 13:39:59 +01:00
iommu-helper.c
ioremap.c lib/ioremap: ensure break-before-make is used for huge p4d mappings 2018-12-28 12:11:50 -08:00
iov_iter.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
irq_poll.c lib/irq_poll: Support schedules in non-interrupt contexts 2019-02-19 20:52:19 -07:00
irq_regs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
is_single_threaded.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
jedec_ddr_data.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
kasprintf.c
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
Kconfig.debug Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
Kconfig.kasan treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig.kgdb treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig.ubsan treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
kfifo.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
klist.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 248 2019-06-19 17:09:08 +02:00
kobject_uevent.c kobject: Don't trigger kobject_uevent(KOBJ_REMOVE) twice. 2019-04-01 07:37:12 +02:00
kobject.c kobject: clean up the kobject add documentation a bit more 2019-05-03 08:26:51 +02:00
kstrtox.c lib/kstrtox.c: delete unnecessary casts 2018-10-31 08:54:13 -07:00
kstrtox.h
libcrc32c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
list_debug.c
list_sort.c lib: list_sort.c: add a blank line to avoid kernel-doc warnings 2019-06-20 14:07:34 -06:00
llist.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
locking-selftest-hardirq.h
locking-selftest-mutex.h
locking-selftest-rlock-hardirq.h
locking-selftest-rlock-softirq.h
locking-selftest-rlock.h
locking-selftest-rsem.h
locking-selftest-rtmutex.h
locking-selftest-softirq.h
locking-selftest-spin-hardirq.h
locking-selftest-spin-softirq.h
locking-selftest-spin.h
locking-selftest-wlock-hardirq.h
locking-selftest-wlock-softirq.h
locking-selftest-wlock.h
locking-selftest-wsem.h
locking-selftest.c locking/lockdep: Make it easy to detect whether or not inside a selftest 2019-02-28 07:55:43 +01:00
lockref.c lockref: Limit number of cmpxchg loop retries 2019-06-07 13:15:06 -07:00
logic_pio.c
lru_cache.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 91 2019-05-24 17:37:53 +02:00
lshrdi3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 120 2019-05-24 17:39:02 +02:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
memcat_p.c lib: Fix ia64 bootloader linkage 2018-10-16 13:45:44 +02:00
memory-notifier-error-inject.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
memweight.c
muldi3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 120 2019-05-24 17:39:02 +02:00
net_utils.c
netdev-notifier-error-inject.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
nlattr.c netlink: add validation of NLA_F_NESTED flag 2019-05-04 01:27:11 -04:00
nmi_backtrace.c
nodemask.c
notifier-error-inject.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
notifier-error-inject.h
objagg.c lib: objagg: Use struct_size() in kzalloc() 2019-06-05 19:03:39 -07:00
of-reconfig-notifier-error-inject.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
oid_registry.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
once.c
packing.c lib: Add support for generic packing operations 2019-05-03 10:49:17 -04:00
parman.c
parser.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
pci_iomap.c
percpu_counter.c
percpu_test.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
percpu-refcount.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
plist.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 10 2019-05-21 11:28:45 +02:00
pm-notifier-error-inject.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
radix-tree.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 153 2019-05-30 11:26:32 -07:00
random32.c lib: Correct comment of prandom_seed 2019-05-17 11:32:47 -07:00
ratelimit.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
rbtree_test.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
rbtree.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
refcount.c refcount_t: Add ACQUIRE ordering on success for dec(sub)_and_test() variants 2019-02-04 09:03:31 +01:00
rhashtable.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sbitmap.c sbitmap: Replace cmpxchg with xchg 2019-07-01 11:57:12 -06:00
scatterlist.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-07-08 20:57:08 -07:00
seq_buf.c seq_buf: Use size_t for len in seq_buf_puts() 2018-12-22 08:21:03 -05:00
sg_pool.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
sg_split.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
sha1.c
sha256.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
show_mem.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 435 2019-06-05 17:37:16 +02:00
siphash.c lib/siphash.c: mark expected switch fall-throughs 2019-04-25 19:47:24 +02:00
smp_processor_id.c sched/core: Provide a pointer to the valid CPU mask 2019-06-03 11:49:37 +02:00
sort.c lib/sort.c: fix kernel-doc notation warnings 2019-06-01 15:51:31 -07:00
stackdepot.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
stmp_device.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
string_helpers.c nfsd: escape high characters in binary data 2019-07-03 17:52:50 -04:00
string.c lib/string: Add strscpy_pad() function 2019-04-08 16:44:21 -06:00
strncpy_from_user.c mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions 2019-04-24 12:19:45 +02:00
strnlen_user.c mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions 2019-04-24 12:19:45 +02:00
syscall.c syscalls: Remove start and number from syscall_get_arguments() args 2019-04-05 09:26:43 -04:00
test_bitfield.c
test_bitmap.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
test_blackhole_dev.c blackhole_dev: add a selftest 2019-07-01 19:34:46 -07:00
test_bpf.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295 2019-06-05 17:36:38 +02:00
test_debug_virtual.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
test_firmware.c Char/Misc driver fixes for 5.2-rc4 2019-06-08 12:50:36 -07:00
test_hash.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
test_hexdump.c test_hexdump: use memcpy instead of strncpy 2018-11-30 12:13:15 -08:00
test_ida.c test_ida: Fix lockdep warning 2018-10-15 16:31:29 -04:00
test_kasan.c lib/test_kasan: Add test for double-kzfree detection 2019-07-12 11:05:42 -07:00
test_kmod.c lib/test_kmod.c: potential double free in error handling 2019-02-01 15:46:23 -08:00
test_list_sort.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
test_memcat_p.c lib: Fix ia64 bootloader linkage 2018-10-16 13:45:44 +02:00
test_module.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
test_objagg.c test_objagg: Uninitialized variable in error handling 2019-02-13 22:13:29 -08:00
test_overflow.c
test_parman.c
test_printf.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
test_rhashtable.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
test_siphash.c
test_sort.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
test_stackinit.c lib/test_stackinit: Handle Clang auto-initialization pattern 2019-06-05 07:36:43 -07:00
test_static_key_base.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
test_static_keys.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
test_string.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
test_strscpy.c lib: Add test module for strscpy_pad 2019-04-08 16:44:21 -06:00
test_sysctl.c tools/testing/selftests/sysctl/sysctl.sh: add proc_do_large_bitmap() test case 2019-05-14 19:52:51 -07:00
test_ubsan.c lib/test_ubsan.c: VLA no longer used in kernel 2019-03-07 18:32:00 -08:00
test_user_copy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
test_uuid.c
test_vmalloc.c lib/test_vmalloc.c:test_func(): eliminate local `ret' 2019-05-14 19:52:49 -07:00
test_xarray.c XArray tests: Add check_insert 2019-06-02 23:00:24 -04:00
test-kstrtox.c
test-string_helpers.c
textsearch.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
timerqueue.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ts_bm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ts_fsm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ts_kmp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ubsan.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ubsan.h ubsan: Remove vla bound checks. 2019-05-06 11:12:09 -07:00
ucmpdi2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 120 2019-05-24 17:39:02 +02:00
ucs2_string.c
usercopy.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
uuid.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
vsprintf.c Printk changes for 5.3 2019-07-09 12:25:58 -07:00
win_minmax.c
xarray.c mm: fix page cache convergence regression 2019-05-31 13:52:41 -04:00
xxhash.c