diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 1 | ||||
| -rw-r--r-- | lib/genalloc.c | 3 | ||||
| -rw-r--r-- | lib/stackdepot.c | 4 | ||||
| -rw-r--r-- | lib/test_bpf.c | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 33bc56cf60d7..b01e547d4d04 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -198,6 +198,7 @@ config FRAME_WARN | |||
| 198 | int "Warn for stack frames larger than (needs gcc 4.4)" | 198 | int "Warn for stack frames larger than (needs gcc 4.4)" |
| 199 | range 0 8192 | 199 | range 0 8192 |
| 200 | default 0 if KASAN | 200 | default 0 if KASAN |
| 201 | default 2048 if GCC_PLUGIN_LATENT_ENTROPY | ||
| 201 | default 1024 if !64BIT | 202 | default 1024 if !64BIT |
| 202 | default 2048 if 64BIT | 203 | default 2048 if 64BIT |
| 203 | help | 204 | help |
diff --git a/lib/genalloc.c b/lib/genalloc.c index 0a1139644d32..144fe6b1a03e 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c | |||
| @@ -292,7 +292,7 @@ unsigned long gen_pool_alloc_algo(struct gen_pool *pool, size_t size, | |||
| 292 | struct gen_pool_chunk *chunk; | 292 | struct gen_pool_chunk *chunk; |
| 293 | unsigned long addr = 0; | 293 | unsigned long addr = 0; |
| 294 | int order = pool->min_alloc_order; | 294 | int order = pool->min_alloc_order; |
| 295 | int nbits, start_bit = 0, end_bit, remain; | 295 | int nbits, start_bit, end_bit, remain; |
| 296 | 296 | ||
| 297 | #ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG | 297 | #ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG |
| 298 | BUG_ON(in_nmi()); | 298 | BUG_ON(in_nmi()); |
| @@ -307,6 +307,7 @@ unsigned long gen_pool_alloc_algo(struct gen_pool *pool, size_t size, | |||
| 307 | if (size > atomic_read(&chunk->avail)) | 307 | if (size > atomic_read(&chunk->avail)) |
| 308 | continue; | 308 | continue; |
| 309 | 309 | ||
| 310 | start_bit = 0; | ||
| 310 | end_bit = chunk_size(chunk) >> order; | 311 | end_bit = chunk_size(chunk) >> order; |
| 311 | retry: | 312 | retry: |
| 312 | start_bit = algo(chunk->bits, end_bit, start_bit, | 313 | start_bit = algo(chunk->bits, end_bit, start_bit, |
diff --git a/lib/stackdepot.c b/lib/stackdepot.c index 60f77f1d470a..f87d138e9672 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c | |||
| @@ -50,7 +50,7 @@ | |||
| 50 | STACK_ALLOC_ALIGN) | 50 | STACK_ALLOC_ALIGN) |
| 51 | #define STACK_ALLOC_INDEX_BITS (DEPOT_STACK_BITS - \ | 51 | #define STACK_ALLOC_INDEX_BITS (DEPOT_STACK_BITS - \ |
| 52 | STACK_ALLOC_NULL_PROTECTION_BITS - STACK_ALLOC_OFFSET_BITS) | 52 | STACK_ALLOC_NULL_PROTECTION_BITS - STACK_ALLOC_OFFSET_BITS) |
| 53 | #define STACK_ALLOC_SLABS_CAP 1024 | 53 | #define STACK_ALLOC_SLABS_CAP 8192 |
| 54 | #define STACK_ALLOC_MAX_SLABS \ | 54 | #define STACK_ALLOC_MAX_SLABS \ |
| 55 | (((1LL << (STACK_ALLOC_INDEX_BITS)) < STACK_ALLOC_SLABS_CAP) ? \ | 55 | (((1LL << (STACK_ALLOC_INDEX_BITS)) < STACK_ALLOC_SLABS_CAP) ? \ |
| 56 | (1LL << (STACK_ALLOC_INDEX_BITS)) : STACK_ALLOC_SLABS_CAP) | 56 | (1LL << (STACK_ALLOC_INDEX_BITS)) : STACK_ALLOC_SLABS_CAP) |
| @@ -192,6 +192,7 @@ void depot_fetch_stack(depot_stack_handle_t handle, struct stack_trace *trace) | |||
| 192 | trace->entries = stack->entries; | 192 | trace->entries = stack->entries; |
| 193 | trace->skip = 0; | 193 | trace->skip = 0; |
| 194 | } | 194 | } |
| 195 | EXPORT_SYMBOL_GPL(depot_fetch_stack); | ||
| 195 | 196 | ||
| 196 | /** | 197 | /** |
| 197 | * depot_save_stack - save stack in a stack depot. | 198 | * depot_save_stack - save stack in a stack depot. |
| @@ -283,3 +284,4 @@ exit: | |||
| 283 | fast_exit: | 284 | fast_exit: |
| 284 | return retval; | 285 | return retval; |
| 285 | } | 286 | } |
| 287 | EXPORT_SYMBOL_GPL(depot_save_stack); | ||
diff --git a/lib/test_bpf.c b/lib/test_bpf.c index 94346b4d8984..0362da0b66c3 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c | |||
| @@ -4831,7 +4831,7 @@ static struct bpf_test tests[] = { | |||
| 4831 | { }, | 4831 | { }, |
| 4832 | INTERNAL, | 4832 | INTERNAL, |
| 4833 | { 0x34 }, | 4833 | { 0x34 }, |
| 4834 | { { 1, 0xbef } }, | 4834 | { { ETH_HLEN, 0xbef } }, |
| 4835 | .fill_helper = bpf_fill_ld_abs_vlan_push_pop, | 4835 | .fill_helper = bpf_fill_ld_abs_vlan_push_pop, |
| 4836 | }, | 4836 | }, |
| 4837 | /* | 4837 | /* |
