SEC("?tp/syscalls/sys_enter_nanosleep") int strncmp_bad_not_const_str_size(void *ctx)
{ /* The value of string size is not const, so will fail */
cmp_ret = bpf_strncmp(str, no_const_str_size, target); return 0;
}
SEC("?tp/syscalls/sys_enter_nanosleep") int strncmp_bad_writable_target(void *ctx)
{ /* Compared target is not read-only, so will fail */
cmp_ret = bpf_strncmp(str, STRNCMP_STR_SZ, writable_target); return 0;
}
SEC("?tp/syscalls/sys_enter_nanosleep") int strncmp_bad_not_null_term_target(void *ctx)
{ /* Compared target is not null-terminated, so will fail */
cmp_ret = bpf_strncmp(str, STRNCMP_STR_SZ, no_str_target); return 0;
}
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.