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=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 5FCA9C11D25 for ; Thu, 20 Feb 2020 22:49:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 35419207FD for ; Thu, 20 Feb 2020 22:49:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582238997; bh=+Jk8ZLGepwfSKBz/r/AeAIirnEIPybIoNRaHLfpkM8g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=h+KXWvajMGUXhfBqHezXgg5PG1WAaVGD3UKlwPWFfmT5qXCZ3Pjh1UMb/l/Mn/GjH yPt0lWL/LQcv/UetxEK/wPX9DgVkkONQBpMX43ZqpCDkPI44XIVIGSVgVUlG9YK1gH WcsLG5M91VUyb5bWXQkq5RHttvzpa9U3NoQSlqLg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727845AbgBTWt4 (ORCPT ); Thu, 20 Feb 2020 17:49:56 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:37546 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729150AbgBTWt4 (ORCPT ); Thu, 20 Feb 2020 17:49:56 -0500 Received: by mail-lj1-f193.google.com with SMTP id q23so186134ljm.4 for ; Thu, 20 Feb 2020 14:49:55 -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=tL5lUey3RYA/T2cV3TzsmNh+nOGlQcoOiKM3KSc7QVWJxf6MxPL7NT4k03DMJntWpb YP4LmqWD8tBY9+OXOXl4pgPFgcyl8pk1CaxfICcNT6uPdaeTYQ/G9qVgI/Mn4C978M8R Eq3Eun+ZzktF3WIlXFVNoP1q1px5lIMZoDTgA7GS6MrQ3lPiWyGWq7BDS3SlnsyfqLuS E7OCl3QYrmkPfBh1Wcl3kHpylEXuZfbCOHSKPcq3yoAh29PqZuTgViKb4ASce3uy4syG WZdJVixd3UZcAOfrhxtUYmj1/ZRrmsu9bWXmIsSX2ceSy3yyCzmcCYWpIpM6VtFVa1xB yFWQ== X-Gm-Message-State: APjAAAV3wqCUIZDp/2eCSpI45lsjUx8tCqjV0sf7U58oBTtDsQVjnda1 JdQNrHamLy3L3RpZHekC+4Y7t8+wJc8= X-Google-Smtp-Source: APXvYqxPCXyEjDxhcjLpMROIfcEGpt1KWQiMjTV0qwzRMutaHyX6zwoMiTgzHBCN4pvciBadmL3gBw== X-Received: by 2002:a2e:3504:: with SMTP id z4mr20193438ljz.273.1582238993940; Thu, 20 Feb 2020 14:49:53 -0800 (PST) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com. [209.85.167.44]) by smtp.gmail.com with ESMTPSA id d9sm428750lja.73.2020.02.20.14.49.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Feb 2020 14:49:53 -0800 (PST) Received: by mail-lf1-f44.google.com with SMTP id 83so12141lfh.9 for ; Thu, 20 Feb 2020 14:49:53 -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-api-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@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