Thread (43 messages) 43 messages, 2 authors, 2021-07-29

Re: [PATCH 10/14] bpf/tests: Add branch conversion JIT test

From: Yonghong Song <hidden>
Date: 2021-07-29 15:47:16
Also in: netdev


On 7/29/21 5:45 AM, Johan Almbladh wrote:
On Thu, Jul 29, 2021 at 1:59 AM Yonghong Song [off-list ref] wrote:
quoted
quoted
+static int bpf_fill_long_jmp(struct bpf_test *self)
+{
+     unsigned int len = BPF_MAXINSNS;
+     struct bpf_insn *insn;
+     int i;
+
+     insn = kmalloc_array(len, sizeof(*insn), GFP_KERNEL);
+     if (!insn)
+             return -ENOMEM;
When insn will be freed?
It is freed by the existing test runner code. If the fill_helper
member is set, the function destroy_bpf_tests frees the insn pointer
in that test case. This is the same as with other tests that use the
fill_helper facility.
Sounds good. Thanks for explanation.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help