--- zzzz-none-000/linux-4.4.60/include/linux/slab.h 2017-04-08 07:53:53.000000000 +0000 +++ honeybee-1240e-714/linux-4.4.60/include/linux/slab.h 2019-07-03 09:21:34.000000000 +0000 @@ -27,6 +27,15 @@ #define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ #define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */ + +#if defined(CONFIG_DEBUG_SLAB_AVM_LITE) +#define SLAB_STORE_USER_AND_TIME 0x04000000UL /* DEBUG_SLAB_AVM_LITE: Store the last owner for oom-analyzing */ +#define SLAB_POISON_WRITE_AFTER_FREE 0x08000000UL /* DEBUG_SLAB_AVM_LITE: if poison on check write after free */ + +#if defined(CONFIG_DEBUG_SLAB) +#error conflict DEBUG_SLAB versus DEBUG_SLAB_AVM_LITE +#endif +#endif/*--- #if defined(CONFIG_DEBUG_SLAB_AVM_LITE) ---*/ /* * SLAB_DESTROY_BY_RCU - **WARNING** READ THIS! * @@ -182,15 +191,15 @@ #ifdef CONFIG_SLAB /* * The largest kmalloc size supported by the SLAB allocators is - * 32 megabyte (2^25) or the maximum allocatable page order if that is - * less than 32 MB. + * 1 megabyte (2^20) or the maximum allocatable page order if that is + * less than 1 MB. * * WARNING: Its not easy to increase this value since the allocators have * to do various tricks to work around compiler limitations in order to * ensure proper constant folding. */ -#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT - 1) <= 25 ? \ - (MAX_ORDER + PAGE_SHIFT - 1) : 25) +#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT - 1) <= 20 ? \ + (MAX_ORDER + PAGE_SHIFT - 1) : 20) #define KMALLOC_SHIFT_MAX KMALLOC_SHIFT_HIGH #ifndef KMALLOC_SHIFT_LOW #define KMALLOC_SHIFT_LOW 5