Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp566917pxa; Wed, 19 Aug 2020 08:56:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIxl66CiZEQFJcyHa9r+VSpqUeRD8WYu3mehxyY+9YVCoyeUp7vy/QlX2JnxylQcTKKIgw X-Received: by 2002:aa7:cf19:: with SMTP id a25mr24409942edy.67.1597852575709; Wed, 19 Aug 2020 08:56:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597852575; cv=none; d=google.com; s=arc-20160816; b=cMfFXjmd5jHy//f7oBO/VDrQ7m1QbIAh/F7XFn3oOe3/Wiad3zOfQ1hCoKgasGIr7R BzFKL+wLdsxiBPwAPFrFb85QvLrtAKLwupC2DC7Ypq0He7dbxmTMBUiBktX6taJ0ODdS MPBLpSMx4uX9SDSCmBIZZ+ILXjwHAcZkK/QU2r5uAXB71MdB3TP6lzQiXWMcSQF5pjyn ZdquqiZN825uoKBz+JCLHwiydBXIeWofwMpBrbtH6QfoMan67EyUizX4Rg6/jFx038Z/ 6M7qn4t0ezhTDgkYFu7ROIzQdhQijVBkBIWcOZyLJZQ6zt0N7lSmpVu72B/pd5X9iDiA ksbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=31Qym4k8331f6H4k76WgLs9RnH9R3abh8NK+iPJ0pQ8=; b=xhG4CDYPqCqYXn2bvZzHlfmp7zE85B3wdr6FbVOS4msylEMgN+vc2tr+wCOflRXafN 2Gx/tByA8e9d8JH8294E29SHuC5zndN7T4ZJf4AeSSypExdeFCKmGWGko5+gv6EGCrF1 mgYf51tZdGINMFasjaRatklrPnlNhb9ta5hKZOtocfrj7PpdWUmqdeAphHr8psxWd34M +talTRnEJDUjGtgEe3HmsYgU/BK2EAkPpuk/HQQKeeriAtEQZkeXrZ+ZoL2QVW8gawWo NReZ8fftO4QJ7sENRyefdn2F6MLjiBwP4Hy0Vg5QFjfZTtVu96uXn5CQ7D+Y5NKUXTS9 JK2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ParQHmrO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nv5si15385962ejb.144.2020.08.19.08.55.50; Wed, 19 Aug 2020 08:56:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ParQHmrO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728784AbgHSPzF (ORCPT + 99 others); Wed, 19 Aug 2020 11:55:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727000AbgHSPzD (ORCPT ); Wed, 19 Aug 2020 11:55:03 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF042C061757; Wed, 19 Aug 2020 08:55:03 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id i19so12317603lfj.8; Wed, 19 Aug 2020 08:55:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=31Qym4k8331f6H4k76WgLs9RnH9R3abh8NK+iPJ0pQ8=; b=ParQHmrOzrGsP3e8fhsiAiGjWynHT+odEmSfEkdgFcYE/+EQafA+ybVP3YAc1Dxz9E 27+5cq+fFaPMGVyaOMMxJpwnxvv8nYc2vRQFpcgSgK6p62joE/f6qdx7KldywxEogdY7 CFVBvmCIGQrkg97ni13iqPUqTQeG7RoUkfk+CPPqVTDCbGxcJAoWBxduM4pDSErKNneb VjhShTP2TTUj1v5u5GrI4yTEn9l3iPL53IdQG9oRB+Fzz3RY27xmJfJVU6A5ljf+dS+Y d0z0JbhPisKdgb7xtwyN5o7BmFZhKWWQpsdGP3UFkxzTngWz0SN9SvIZlh8iKXuBi6pP 9JcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=31Qym4k8331f6H4k76WgLs9RnH9R3abh8NK+iPJ0pQ8=; b=UhEoy9DFXxWff05nIWEanrzEoNt6J3RzsjxJiFraScrKocl9QKEwQbQ2j3diGLsT3p scIQw6xd8RfUmUJWrcKnkFQqitRRREVWo0FXyZb7oS+gVhE5Ma6RFg3D9JclwVhAGEQz zurMdTrKfUbFVh4RAxFgNbxDNc0nYk3YxI4THu3KX7IVMYq+6blWOo7wS6s78TR7SV6m hmfbMTip3CeSgp3Ft1yI5Us74zuo9WpEW85zvFaVnHw1OtRhSYD+YfM176HWSQIA/AiX A3mKotdyCoEXrxFDFrD0B7MHw17VzOC/TRAeEY5mPGf81nWl3wXfAd9yNl1xTO6nld0+ QS7A== X-Gm-Message-State: AOAM5304vc+2h6hejd/FewrP0mbsRxpBp2fIdy5UJRwQ+Po/PefdPFOI yTBfR60/Pq64jfVCMu/GcaAeeu8xPxQdGjsmTTk= X-Received: by 2002:a05:6512:2010:: with SMTP id a16mr12109645lfb.196.1597852502174; Wed, 19 Aug 2020 08:55:02 -0700 (PDT) MIME-Version: 1.0 References: <87ft8l6ic3.fsf@x220.int.ebiederm.org> <20200817220425.9389-9-ebiederm@xmission.com> <875z9g7oln.fsf@x220.int.ebiederm.org> <20200818110556.q5i5quflrcljv4wa@wittgenstein> <87pn7m22kn.fsf@x220.int.ebiederm.org> In-Reply-To: <87pn7m22kn.fsf@x220.int.ebiederm.org> From: Alexei Starovoitov Date: Wed, 19 Aug 2020 08:54:50 -0700 Message-ID: Subject: Re: [PATCH 09/17] file: Implement fnext_task To: "Eric W. Biederman" Cc: Christian Brauner , Linus Torvalds , Linux Kernel Mailing List , "" , criu@openvz.org, bpf , Alexander Viro , Oleg Nesterov , Cyrill Gorcunov , Jann Horn , Kees Cook , =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= , Jeff Layton , Miklos Szeredi , Matthew Wilcox , "J. Bruce Fields" , Matthew Wilcox , Trond Myklebust , Chris Wright , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 19, 2020 at 6:25 AM Eric W. Biederman wrote: > > The bug in the existing code is that bpf_iter does get_file instead > of get_file_rcu. Does anyone have any sense of how to add debugging > to get_file to notice when it is being called in the wrong context? That bug is already fixed in bpf tree. See commit cf28f3bbfca0 ("bpf: Use get_file_rcu() instead of get_file() for task_file iterator")