lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 14 Sep 2020 13:52:24 -0700
From:   Song Liu <song@...nel.org>
To:     Nicolas Rybowski <nicolas.rybowski@...sares.net>
Cc:     Mat Martineau <mathew.j.martineau@...ux.intel.com>,
        Matthieu Baerts <matthieu.baerts@...sares.net>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        Andrii Nakryiko <andriin@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...omium.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Networking <netdev@...r.kernel.org>, mptcp@...ts.01.org,
        open list <linux-kernel@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH bpf-next v2 2/5] mptcp: attach subflow socket to parent cgroup

On Fri, Sep 11, 2020 at 9:43 AM Nicolas Rybowski
<nicolas.rybowski@...sares.net> wrote:
>
> It has been observed that the kernel sockets created for the subflows
> (except the first one) are not in the same cgroup as their parents.
> That's because the additional subflows are created by kernel workers.
>
> This is a problem with eBPF programs attached to the parent's
> cgroup won't be executed for the children. But also with any other features
> of CGroup linked to a sk.
>
> This patch fixes this behaviour.
>
> As the subflow sockets are created by the kernel, we can't use
> 'mem_cgroup_sk_alloc' because of the current context being the one of the
> kworker. This is why we have to do low level memcg manipulation, if
> required.
>
> Suggested-by: Matthieu Baerts <matthieu.baerts@...sares.net>
> Suggested-by: Paolo Abeni <pabeni@...hat.com>
> Acked-by: Matthieu Baerts <matthieu.baerts@...sares.net>
> Reviewed-by: Mat Martineau <mathew.j.martineau@...ux.intel.com>
> Signed-off-by: Nicolas Rybowski <nicolas.rybowski@...sares.net>

Acked-by: Song Liu <songliubraving@...com>

[...]

Powered by blists - more mailing lists