.. | .. |
---|
32 | 32 | #include <linux/perf_event.h> |
---|
33 | 33 | #include <linux/extable.h> |
---|
34 | 34 | #include <linux/log2.h> |
---|
| 35 | +#include <linux/nospec.h> |
---|
35 | 36 | |
---|
36 | 37 | #include <asm/barrier.h> |
---|
37 | 38 | #include <asm/unaligned.h> |
---|
.. | .. |
---|
827 | 828 | { |
---|
828 | 829 | /* Only used as heuristic here to derive limit. */ |
---|
829 | 830 | bpf_jit_limit_max = bpf_jit_alloc_exec_limit(); |
---|
830 | | - bpf_jit_limit = min_t(u64, round_up(bpf_jit_limit_max >> 2, |
---|
| 831 | + bpf_jit_limit = min_t(u64, round_up(bpf_jit_limit_max >> 1, |
---|
831 | 832 | PAGE_SIZE), LONG_MAX); |
---|
832 | 833 | return 0; |
---|
833 | 834 | } |
---|
.. | .. |
---|
1646 | 1647 | * reuse preexisting logic from Spectre v1 mitigation that |
---|
1647 | 1648 | * happens to produce the required code on x86 for v4 as well. |
---|
1648 | 1649 | */ |
---|
1649 | | -#ifdef CONFIG_X86 |
---|
1650 | 1650 | barrier_nospec(); |
---|
1651 | | -#endif |
---|
1652 | 1651 | CONT; |
---|
1653 | 1652 | #define LDST(SIZEOP, SIZE) \ |
---|
1654 | 1653 | STX_MEM_##SIZEOP: \ |
---|