Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1171762ybv; Thu, 20 Feb 2020 14:45:46 -0800 (PST) X-Google-Smtp-Source: APXvYqwFXxamsEledivKEP7lHKhSoE94PKlSzpqkRT0ImkotLQnHWUk7tZIeDPGteucWsJbMGOGY X-Received: by 2002:aca:d610:: with SMTP id n16mr3881016oig.108.1582238746161; Thu, 20 Feb 2020 14:45:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582238746; cv=none; d=google.com; s=arc-20160816; b=aB5QD3gY3liv0XtPw71pFq6srbe8qRZD4kow26oMqQNU2zTanJqW3pTyPcRlnqDM5s 1Tq5mJBHtdKLtcp9voNLtc3SuRRqrgGr37bZ00hk8A1yxYaPFnK6lYbmaw+j8AO10lMZ Eb0WJON3dyqeKphxR32AhTLTifgFWa8PV4iZL6nVk5IlQHjcSrJFk8NLMAHXBAdRiOCe dfj6ArhaU5rM0WFdC0AgwRWgn+lf9wawRHHCUiMn7y3swIoUT5zIzeMiOWq/68AOISbl BcEJQMcuPHM8Cun1HldGJYUgI2AH8Oj4/MKC8m1msCdyIyqhkHQrorw2fcQiuZaJn1By HQzQ== 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=IsBAqEZQag0ypHqg0PyTqrCBxrLtLK/vf3m5Pbo+Q1I=; b=UkHDJAnUPUL1LiA5BnLCLpBOdwmivZijoEri2FiyfgoCA1zabw1iOQtBc3KxWCfF+7 yPBfIo/hODdxgcusyJpF+itBrdBOq0NkmrZM3uWx6j1+5S70VnwRsI3lFqiakZ+7YeDd LMGf6XhVhEjWm6wy8+AvCNimWbQeArP1Em903HBOJt40P06y6Loq+XdWS7p53rW/V9jv 6qUl39Tx8ekBF3ju4K3QTaZfYzQv7+d+HyZsHr3iDr68bq8XTd35cSpKzJpwf+ZRFtqb Hka82xBCCpJn3nlYlP1lKcghltP7lUy2I7R8J44GVDZBT07F6gCNQVJyJVJb59+RWAqx hdRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=HocGqZaP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t28si433608otr.16.2020.02.20.14.45.33; Thu, 20 Feb 2020 14:45:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=HocGqZaP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729301AbgBTWn6 (ORCPT + 99 others); Thu, 20 Feb 2020 17:43:58 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42986 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729272AbgBTWn5 (ORCPT ); Thu, 20 Feb 2020 17:43:57 -0500 Received: by mail-lj1-f194.google.com with SMTP id d10so151162ljl.9 for ; Thu, 20 Feb 2020 14:43:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IsBAqEZQag0ypHqg0PyTqrCBxrLtLK/vf3m5Pbo+Q1I=; b=HocGqZaPvPbj2Rc3tHfIsXtvsU9ZExNqDhyGTd1FkLfg2CixXSIhWg+lhtFLFy7LH5 Ll9ajjeSCLGyVGJFCP3pr8MzRIUlhdaSf4zT2trYK3NmUY7kfmF8q56qyO7AFc70i6vi mx1gRvncgXwtZTQp0OujHwfoGsQovufSXPaY4= 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=IsBAqEZQag0ypHqg0PyTqrCBxrLtLK/vf3m5Pbo+Q1I=; b=UXe5CknQKPTBC6nhtgXAz/7m3fjbuhZLvMk21gmr1SkMm6SSNf+/9Wr3S9yC0t0csv QoLBjVmnC7HXQJ6P4thDw/oLBfacV34nohbigBGlRndY7Ei2qLPjAAjcFQyKC3aw63Us k4vut22P46OCDMKiZRp0qFp9ANdLC/L9g60+6UkUr8+VDMGctRbEQXJ/0cVNsfanRSNy YpZBx7br2yitY5Y4Tjd5Mnw8HWc1cfzMB9O36OqjG2JYKk54aMBGh41TjetRX3Z+8ULw F57XtgwkROLkAG2KyfgO34nO7mo3Yz4nY8tSR0FlajXwLj9Hy5qRSjROuFYABaZbnUN3 cDMQ== X-Gm-Message-State: APjAAAUUnKmVC8Sm5Q7Lj/qyRAaXC0UhlKUhAsZT+Td8L1PsOGedcOZR Iqy/3z/aNqbYMGa+Unn3FwJiLxQpqB8= X-Received: by 2002:a2e:8797:: with SMTP id n23mr18879589lji.176.1582238635297; Thu, 20 Feb 2020 14:43:55 -0800 (PST) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id c203sm489358lfg.28.2020.02.20.14.43.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Feb 2020 14:43:54 -0800 (PST) Received: by mail-lj1-f182.google.com with SMTP id q23so174265ljm.4 for ; Thu, 20 Feb 2020 14:43:54 -0800 (PST) X-Received: by 2002:a2e:88c5:: with SMTP id a5mr20465844ljk.201.1582238633679; Thu, 20 Feb 2020 14:43:53 -0800 (PST) MIME-Version: 1.0 References: <20200210150519.538333-8-gladkov.alexey@gmail.com> <87v9odlxbr.fsf@x220.int.ebiederm.org> <20200212144921.sykucj4mekcziicz@comp-core-i7-2640m-0182e6> <87tv3vkg1a.fsf@x220.int.ebiederm.org> <87v9obipk9.fsf@x220.int.ebiederm.org> <20200212200335.GO23230@ZenIV.linux.org.uk> <20200212203833.GQ23230@ZenIV.linux.org.uk> <20200212204124.GR23230@ZenIV.linux.org.uk> <87lfp7h422.fsf@x220.int.ebiederm.org> <87pnejf6fz.fsf@x220.int.ebiederm.org> <871rqpaswu.fsf_-_@x220.int.ebiederm.org> <87blpt9e6m.fsf_-_@x220.int.ebiederm.org> In-Reply-To: <87blpt9e6m.fsf_-_@x220.int.ebiederm.org> From: Linus Torvalds Date: Thu, 20 Feb 2020 14:43:38 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/7] proc: Use d_invalidate in proc_prune_siblings_dcache To: "Eric W. Biederman" Cc: Al Viro , LKML , Kernel Hardening , Linux API , Linux FS Devel , Linux Security Module , Akinobu Mita , Alexey Dobriyan , Andrew Morton , Andy Lutomirski , Daniel Micay , Djalal Harouni , "Dmitry V . Levin" , Greg Kroah-Hartman , Ingo Molnar , "J . Bruce Fields" , Jeff Layton , Jonathan Corbet , Kees Cook , Oleg Nesterov , Solar Designer 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 Thu, Feb 20, 2020 at 12:51 PM Eric W. Biederman wrote: > > To use d_invalidate replace d_prune_aliases with d_find_alias > followed by d_invalidate and dput. This is safe and complete > because no inode in proc has any hardlinks or aliases. Are you sure you can't create them some way? This makes em go "what if we had multiple dentries associated with that inode?" Then the code would just invalidate the first one. I guess we don't have export_operations or anything like that, but this makes me worry... Linus