Re: [PATCH v9 bpf-next 10/14] bpf: Add d_path helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 1, 2020 at 7:04 PM Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
>
> Adding d_path helper function that returns full path for

[...]

> +}
> +
> +BTF_SET_START(btf_allowlist_d_path)
> +BTF_ID(func, vfs_truncate)
> +BTF_ID(func, vfs_fallocate)
> +BTF_ID(func, dentry_open)
> +BTF_ID(func, vfs_getattr)
> +BTF_ID(func, filp_close)
> +BTF_SET_END(btf_allowlist_d_path)
> +

> +static bool bpf_d_path_allowed(const struct bpf_prog *prog)
> +{
> +       return btf_id_set_contains(&btf_allowlist_d_path, prog->aux->attach_btf_id);
> +}

Can we allow it for LSM programs too?

- KP

> +
> +BTF_ID_LIST(bpf_d_path_btf_ids)
> +BTF_ID(struct, path)
> +

[...]

>
>  /* integer value in 'imm' field of BPF_CALL instruction selects which helper
> --
> 2.25.4
>



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux