s390/bpf: take advantage of stack_depth tracking
Make use of the "stack_depth" tracking feature introduced with
commit 8726679a0f
("bpf: teach verifier to track stack depth") for the
s390 JIT, so that stack usage can be reduced.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:

committed by
Heiko Carstens

父節點
22841cea1a
當前提交
78372709bf
@@ -52,10 +52,13 @@ extern u8 sk_load_word[], sk_load_half[], sk_load_byte[];
|
||||
*
|
||||
* We get 160 bytes stack space from calling function, but only use
|
||||
* 12 * 8 byte for old backchain, r15..r6, and tail_call_cnt.
|
||||
*
|
||||
* The stack size used by the BPF program ("BPF stack" above) is passed
|
||||
* via "aux->stack_depth".
|
||||
*/
|
||||
#define STK_SPACE (MAX_BPF_STACK + 8 + 8 + 4 + 4 + 160)
|
||||
#define STK_SPACE_ADD (8 + 8 + 4 + 4 + 160)
|
||||
#define STK_160_UNUSED (160 - 12 * 8)
|
||||
#define STK_OFF (STK_SPACE - STK_160_UNUSED)
|
||||
#define STK_OFF (STK_SPACE_ADD - STK_160_UNUSED)
|
||||
#define STK_OFF_TMP 160 /* Offset of tmp buffer on stack */
|
||||
#define STK_OFF_HLEN 168 /* Offset of SKB header length on stack */
|
||||
#define STK_OFF_SKBP 176 /* Offset of SKB pointer on stack */
|
||||
|
Reference in New Issue
Block a user