Daniel Borkmann <dan...@iogearbox.net> [Mon, 2019-03-25 03:27 -0700]:
> Hi Andrey,

Hi Daniel,

> On 03/24/2019 01:12 AM, Andrey Ignatov wrote:
> > The patch set introduces new BPF hook for sysctl.
...
> The change in patch 2 which this whole series is centered around would
> need a consent from fs maintainers:
> 
> diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
> index 4d598a399bbf..72f4a096c146 100644
> --- a/fs/proc/proc_sysctl.c
> +++ b/fs/proc/proc_sysctl.c
> @@ -13,6 +13,7 @@
>  #include <linux/namei.h>
>  #include <linux/mm.h>
>  #include <linux/module.h>
> +#include <linux/bpf-cgroup.h>
>  #include "internal.h"
> 
>  static const struct dentry_operations proc_sys_dentry_operations;
> @@ -588,6 +589,10 @@ static ssize_t proc_sys_call_handler(struct file *filp, 
> void __user *buf,
>       if (!table->proc_handler)
>               goto out;
> 
> +     error = BPF_CGROUP_RUN_PROG_SYSCTL(head, table, write);
> +     if (error)
> +             goto out;
> +
>       /* careful: calling conventions are nasty here */
>       res = count;
>       error = table->proc_handler(table, write, buf, &res, ppos);
> 
> ... but I haven't seen that they are in Cc. Checking MAINTAINERS file,
> this would be the following folks:
> 
> PROC SYSCTL
> M:      Luis Chamberlain <mcg...@kernel.org>
> M:      Kees Cook <keesc...@chromium.org>
> L:      linux-ker...@vger.kernel.org
> L:      linux-fsde...@vger.kernel.org
> S:      Maintained
> F:      fs/proc/proc_sysctl.c
> F:      include/linux/sysctl.h
> F:      kernel/sysctl.c
> F:      tools/testing/selftests/sysctl/
> 
> Please add them to Cc as well so they can provide Ack, thanks.

Right, I missed that. Will add them as well and send v2. Thanks.


-- 
Andrey Ignatov

Reply via email to