/* Test read and writes to the stack performed with offsets that are not * statically known.
*/ void test_stack_var_off(void)
{ int duration = 0; struct test_stack_var_off *skel;
skel = test_stack_var_off__open_and_load(); if (CHECK(!skel, "skel_open", "failed to open skeleton\n")) return;
/* Give pid to bpf prog so it doesn't trigger for anyone else. */
skel->bss->test_pid = getpid(); /* Initialize the probe's input. */
skel->bss->input[0] = 2;
skel->bss->input[1] = 42; /* This will be returned in probe_res. */
if (!ASSERT_OK(test_stack_var_off__attach(skel), "skel_attach")) goto cleanup;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.