From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05EDBC433E1 for ; Wed, 19 Aug 2020 15:55:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D024A2063A for ; Wed, 19 Aug 2020 15:55:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ParQHmrO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728785AbgHSPzE (ORCPT ); Wed, 19 Aug 2020 11:55:04 -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-Google-Smtp-Source: ABdhPJzo8ojYd7PedEirG4KP1WXU+RDi395iO/dPgxj2okrypI9Ncnu33CdFRKWevZJNZ0mb8YOPvY5MOjj7/ncEWrM= 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: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@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")