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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EB71C7618E for ; Fri, 21 Apr 2023 03:00:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233823AbjDUDAh (ORCPT ); Thu, 20 Apr 2023 23:00:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234282AbjDUDAX (ORCPT ); Thu, 20 Apr 2023 23:00:23 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 403BE10EC; Thu, 20 Apr 2023 20:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=//YIhm6gzARI8o6MnvvcCv8dn1240DofB0ntD6C9IRA=; b=fc6Vr5SKLpsamAaUeQFF3+4Vt/ N05OljI+CgfOjikJDcdsOnE3IewxzXycsEkVOCxv2x38T7AdReqlDiAU6MvkUlZ1bpaHrziaSj0fL iEzLAuXoaSqIPbCE4oLA1eqI1Tdd/591vBiRJ3uAvpi0cS6otTzMxl99GqqV0EeDxWIsJvtihY4Nn 1WAG/onN9Tr5LJcnw46JFh3PJJaiaeFiMVXTfi2/2vMDR6JRUjBB3EmCCcAWEts9w+ey3+zibNUPu mvh7yZmCBTZ/eZNFfPFAEL8WSs+qqOyaqPJlsD6Z5F/+5AAA8Fuq5HlMqCUfyKoA0LU3ikTrSPyJT DZ3ckHGg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1pph0T-00B3bY-2A; Fri, 21 Apr 2023 03:00:17 +0000 Date: Fri, 21 Apr 2023 04:00:17 +0100 From: Al Viro To: Kirtikumar Anandrao Ramchandani Cc: Christian Brauner , "cc: Greg KH" , security@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Linus Torvalds Subject: Re: Patch for a overwriting/corruption of the file system Message-ID: <20230421030017.GA3390869@ZenIV> References: <20230314095539.zf7uy27cjflqp6kp@wittgenstein> <20230314165708.GY3390869@ZenIV> <20230314171327.k6krhiql3d7tpqat@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 15, 2023 at 02:33:48PM +0530, Kirtikumar Anandrao Ramchandani wrote: > While I am going through the code at the moment, I think there is one more > issue. It probably can't just compare "old_dir" and "new_dir", since those > are just pointers to structs. So, both addresses can be completely > different, and still represent the same folder, yes? No, they can not. We should never have different in-core instances of struct inode representing the same on-disk object - otherwise all locking goes to hell, for example.