You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'akpm' (patches from Andrew)
Merge patch-bomb from Andrew Morton: - inotify tweaks - some ocfs2 updates (many more are awaiting review) - various misc bits - kernel/watchdog.c updates - Some of mm. I have a huge number of MM patches this time and quite a lot of it is quite difficult and much will be held over to next time. * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (162 commits) selftests: vm: add tests for lock on fault mm: mlock: add mlock flags to enable VM_LOCKONFAULT usage mm: introduce VM_LOCKONFAULT mm: mlock: add new mlock system call mm: mlock: refactor mlock, munlock, and munlockall code kasan: always taint kernel on report mm, slub, kasan: enable user tracking by default with KASAN=y kasan: use IS_ALIGNED in memory_is_poisoned_8() kasan: Fix a type conversion error lib: test_kasan: add some testcases kasan: update reference to kasan prototype repo kasan: move KASAN_SANITIZE in arch/x86/boot/Makefile kasan: various fixes in documentation kasan: update log messages kasan: accurately determine the type of the bad access kasan: update reported bug types for kernel memory accesses kasan: update reported bug types for not user nor kernel memory accesses mm/kasan: prevent deadlock in kasan reporting mm/kasan: don't use kasan shadow pointer in generic functions mm/kasan: MODULE_VADDR is not available on all archs ...
This commit is contained in:
+1
-2
@@ -15,8 +15,7 @@ config KASAN
|
||||
global variables requires gcc 5.0 or later.
|
||||
This feature consumes about 1/8 of available memory and brings about
|
||||
~x3 performance slowdown.
|
||||
For better error detection enable CONFIG_STACKTRACE,
|
||||
and add slub_debug=U to boot cmdline.
|
||||
For better error detection enable CONFIG_STACKTRACE.
|
||||
|
||||
choice
|
||||
prompt "Instrumentation type"
|
||||
|
||||
@@ -138,6 +138,71 @@ static noinline void __init kmalloc_oob_16(void)
|
||||
kfree(ptr2);
|
||||
}
|
||||
|
||||
static noinline void __init kmalloc_oob_memset_2(void)
|
||||
{
|
||||
char *ptr;
|
||||
size_t size = 8;
|
||||
|
||||
pr_info("out-of-bounds in memset2\n");
|
||||
ptr = kmalloc(size, GFP_KERNEL);
|
||||
if (!ptr) {
|
||||
pr_err("Allocation failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
memset(ptr+7, 0, 2);
|
||||
kfree(ptr);
|
||||
}
|
||||
|
||||
static noinline void __init kmalloc_oob_memset_4(void)
|
||||
{
|
||||
char *ptr;
|
||||
size_t size = 8;
|
||||
|
||||
pr_info("out-of-bounds in memset4\n");
|
||||
ptr = kmalloc(size, GFP_KERNEL);
|
||||
if (!ptr) {
|
||||
pr_err("Allocation failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
memset(ptr+5, 0, 4);
|
||||
kfree(ptr);
|
||||
}
|
||||
|
||||
|
||||
static noinline void __init kmalloc_oob_memset_8(void)
|
||||
{
|
||||
char *ptr;
|
||||
size_t size = 8;
|
||||
|
||||
pr_info("out-of-bounds in memset8\n");
|
||||
ptr = kmalloc(size, GFP_KERNEL);
|
||||
if (!ptr) {
|
||||
pr_err("Allocation failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
memset(ptr+1, 0, 8);
|
||||
kfree(ptr);
|
||||
}
|
||||
|
||||
static noinline void __init kmalloc_oob_memset_16(void)
|
||||
{
|
||||
char *ptr;
|
||||
size_t size = 16;
|
||||
|
||||
pr_info("out-of-bounds in memset16\n");
|
||||
ptr = kmalloc(size, GFP_KERNEL);
|
||||
if (!ptr) {
|
||||
pr_err("Allocation failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
memset(ptr+1, 0, 16);
|
||||
kfree(ptr);
|
||||
}
|
||||
|
||||
static noinline void __init kmalloc_oob_in_memset(void)
|
||||
{
|
||||
char *ptr;
|
||||
@@ -264,6 +329,10 @@ static int __init kmalloc_tests_init(void)
|
||||
kmalloc_oob_krealloc_less();
|
||||
kmalloc_oob_16();
|
||||
kmalloc_oob_in_memset();
|
||||
kmalloc_oob_memset_2();
|
||||
kmalloc_oob_memset_4();
|
||||
kmalloc_oob_memset_8();
|
||||
kmalloc_oob_memset_16();
|
||||
kmalloc_uaf();
|
||||
kmalloc_uaf_memset();
|
||||
kmalloc_uaf2();
|
||||
|
||||
Reference in New Issue
Block a user