Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp403009pxa; Fri, 21 Aug 2020 10:10:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrvOs3hyMO/+zZcMRZWnfzYLmVaeVMmM3zdjDunfkVTIAkR1+jIilUYUIlGM8Ki3vyJIwM X-Received: by 2002:a17:906:22c9:: with SMTP id q9mr3460266eja.158.1598029811490; Fri, 21 Aug 2020 10:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598029811; cv=none; d=google.com; s=arc-20160816; b=RL8VNbAuQDiziqg+1LYFYwd6k3SZEOnkGrpI5nrGOrWY/fMUm0r2EjfP5M1s33tqNQ 1NKdUUpeY1UnKmZemCd4gl2bRuUvc+ZMx1/8UQ//ifipkctme8TAE4oyq5fm8lOZHoaJ EZkzxWMADu2NOgcwxlXzsPs25wRRoGHzk4onF4kFqqPz4Ph0O94+VAif3QPlWlHP98Wj /E+nIcwEl+e2O1WXkf7N4ywETEAHbGqEjivkNgdn/qoWqsqSminVQkidUIP1zmwrOq1e V4wQ+4i+vuk8Y4zykhNAeUBpkaMDyc3Vjre1GgBZdxnwVISWnPK9TdAyNkv+7XlKBtb8 hFVA== 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=ciQpCZNqlUAY76HFlpjGJHUNDAs9xwtRbJI1yNtcuhM=; b=SKu0I4FsiClafUBvWElmyMJxOMcXPAk4plepFXv9yVbz/VCFnA1Q0DaHAxjkO7kF9/ IJmeJWxUQKMhjgqpg4LKv/27nwZh5nroXuveaTMDk8zjX30bADaWsNlfNXjuqSEyeiP0 Vx6QZJbv8hK7+6q9SZjpPHuHBtY3iEcSMyQq311eMUDZ1ocIOHOjW2w/TOHHb/3FwMSd LFjUjtXKmnZSXVswtQWfG5yRRdu/EMMyVk2wK8xKUCT+gsLG6gXovNXopkTkkBq1aRQ4 UUNyrVc0RbAN0z6XKIZNSwkEsu5rDcYRyEGlrSenCDu+hHv+ArhQmHBohB321rc3trqI 9f/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="V3/MFuya"; 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 b3si1789915edn.98.2020.08.21.10.09.48; Fri, 21 Aug 2020 10:10:11 -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="V3/MFuya"; 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 S1728798AbgHURIf (ORCPT + 99 others); Fri, 21 Aug 2020 13:08:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726181AbgHUQRo (ORCPT ); Fri, 21 Aug 2020 12:17:44 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 090C0C061573; Fri, 21 Aug 2020 09:17:44 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id i19so1183100lfj.8; Fri, 21 Aug 2020 09:17:43 -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=ciQpCZNqlUAY76HFlpjGJHUNDAs9xwtRbJI1yNtcuhM=; b=V3/MFuyaaic5NHAkMdBvSSzRXUx1HZnX7/7tVB5SKdqFl4sCYkXTJLsJGDC8JzAEBz QQHAWx1G5tLg68B/f+jO/GTnmuGXHhqqsBY99hXSUagyg+/ese3ijTQFcPm59tc/Om0j 93zEOpjIPKN+nJsVkX97YNxBsJZ8beku0FZSKz1vyd0ww1TeaPiS8O9rAmi4VkXJ0jVM YJVQVXWk6cpCcjykvdwRko4eFY+lYyAh9hfbpflaqRK7YwSgbZddXWy4G4blNIg5Dmc4 RU7t62cdxvy05TJm67EQ7n0CS3ldhL2OQ1YZfsFLOzNquURORpOUln5VqamVCzY6TsIZ zDuw== 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=ciQpCZNqlUAY76HFlpjGJHUNDAs9xwtRbJI1yNtcuhM=; b=tTOBuY/c8XDoyb9OQOZjTkvb+LM+j2P3XHryuaV8pLuY8mwy3uf1dfWt7yL40xs/MY NOFVabsq4HRMUWHy+eFu/QYZnsHGbL3HNeBW00h4Lc2LARFk/E+6P0uvDwSUphPK9SKl ROJAYgGE+aq2H0MHB7rZE4ERfpftWbUm9zBRP5mayKqXvmUgth3AAJc4hOZF/37lauun /v9nH3KK9T+HcbMIjkLEoIa6ROJD4FIo4tNDSNsk9lEQDgBto/EVMqjZuWyGjiwI1Mwg EJnh0L9mdgU5XN5X9SHEZdRKMHk7gn1yP851v8h6iKYSTnKes8JlNu5cXEomw00S7HkW UrXg== X-Gm-Message-State: AOAM5320FRkl99HPk8tjWY4w//0hstpZPuZJgW5dZYb8oJErJxwaDUi+ zjiVAdBor+RY5ojxpJdP3r3vCfu/yDlUpg6jqL8= X-Received: by 2002:ac2:59c5:: with SMTP id x5mr1766672lfn.174.1598026662334; Fri, 21 Aug 2020 09:17:42 -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> <871rk0t45v.fsf@x220.int.ebiederm.org> In-Reply-To: <871rk0t45v.fsf@x220.int.ebiederm.org> From: Alexei Starovoitov Date: Fri, 21 Aug 2020 09:17:30 -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 , "David S. Miller" 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 Fri, Aug 21, 2020 at 8:26 AM Eric W. Biederman wrote: > > Alexei Starovoitov writes: > > > 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") > > I wished you had based that change on -rc1 instead of some random > looking place in David's Millers net tree. random? It's a well documented process. Please see: Documentation/bpf/bpf_devel_QA.rst > I am glad to see that our existing debug checks can catch that > kind of problem when the code is exercised enough. They did not. Please see the commit log of the fix. It was a NULL pointer dereference. > I am going to pull this change into my tree on top of -rc1 so we won't > have unnecessary conflicts. Hopefully this will show up in -rc2 so the > final version of this patchset can use an easily describable base. Please do not cherry pick fixes from other trees. You need to wait until the bpf tree gets merged into net tree and net into Linus's tree. It's only a couple days away. Hopefully it's there by -rc2, but I cannot speak for Dave's schedule. We'll send bpf tree pull-req to Dave today.