acquired = bpf_get_task_exe_file(task); if (!acquired) return 0;
bpf_put_file(acquired); return 0;
}
SEC("lsm.s/inode_getattr")
__success int BPF_PROG(path_d_path_from_path_argument, struct path *path)
{ int ret;
ret = bpf_path_d_path(path, buf, sizeof(buf));
__sink(ret); return 0;
}
SEC("lsm.s/file_open")
__success int BPF_PROG(path_d_path_from_file_argument, struct file *file)
{ int ret; struct path *path;
/* The f_path member is a path which is embedded directly within a * file. Therefore, a pointer to such embedded members are still * recognized by the BPF verifier as being PTR_TRUSTED as it's * essentially PTR_TRUSTED w/ a non-zero fixed offset.
*/
path = &file->f_path;
ret = bpf_path_d_path(path, buf, sizeof(buf));
__sink(ret); 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.