ubpf_exec uses 1112 bytes of stack space - Consider moving some data to heap.
Alan-Jowett opened this issue · 0 comments
Alan-Jowett commented
The ubpf_exec function now allocated the following on the stack:
uint16_t pc = 0;
const struct ebpf_inst* insts = vm->insts;
uint64_t* reg;
uint64_t _reg[16];
uint64_t stack[(UBPF_STACK_SIZE + 7) / 8];
struct ubpf_stack_frame stack_frames[UBPF_MAX_CALL_DEPTH] = {
0,
};
uint64_t ras_index = 0;
This causes static analysis tools to issue a warning when the code is compiled for Windows kernel mode as stack space in kernel is more limited.