Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp478229rwb; Tue, 29 Nov 2022 00:56:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf7zXslV6t9HxsItvKkcCUn4mApBvngQD/ePCRP5TQmH98l2oVWVQDb3YPb0guog8LT8bCoG X-Received: by 2002:a17:906:b108:b0:7b5:dd3e:69c1 with SMTP id u8-20020a170906b10800b007b5dd3e69c1mr31042691ejy.381.1669712169793; Tue, 29 Nov 2022 00:56:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669712169; cv=none; d=google.com; s=arc-20160816; b=HfvkkBD+eTnk5xE0LubsBzbXA6cZ0N5a6LeoTGAIgRk/U0CVgcTvH4huFTk59perV0 sd/W4gjR74sEcwwGQ0ZOt1XO3cQ/v6fW4YPP5KNjiD676vN359gYMF397mj+P/ZT40qm ivRcCPNCojsqPPK6Pt62mn34HJKGCNx9ufmpjAcWLa5+nWP0OkQxBb5aoJTwnu8F/xTj 0SKT8irp6HNI1oXdsjo/svf8hz9bhiwIaXqHACvf+Ar1qjIBQ7f03MDnW+AGQ1xYdYkm kvMM5UgROIRNQhuf+knYK4NOFcpAIWVMZuHMt78EaozDhg5pq4NOZqBmgjEFLetF43yC 0UWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dpO9kHttOEsGZbAoig1yKNBzBhJaK+0I3/p2cAkfaZs=; b=Wg1GLkzL/GGgOpc3zf1BqGvtcKGJEDMM1IAcL6NPyvBNzMYoyP3QU4GKSwer+oLurw vfZDDQ7beeqrRWb5OXv42ze4deT5j5sVjU+UtB1L9t0At/LAMC7be0BHDh9hcxk0FJrb c5fDZzn2Zye68NEI2/6xbouaw15MsBm/YLcEP7w3wtRY9lpUu3n0SiTRjDVgRof781u7 OrWUGNz5kzTltYkjXrdiFpboCy0/zP3+W51vkURpWyGw+37PC0nNflP+xAUJ2UHmUwOl sKwb83B6LejQHkeI9xQAvMK7QMc/sjv+jZ/bMyK7NdOlIVCOiUnJpvHENLJQOBGVslnk 9TtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LvLvBHzD; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xf9-20020a17090731c900b007ae26c33a6fsi12582354ejb.685.2022.11.29.00.55.42; Tue, 29 Nov 2022 00:56:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LvLvBHzD; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 S231499AbiK2Iyx (ORCPT + 99 others); Tue, 29 Nov 2022 03:54:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230134AbiK2IyN (ORCPT ); Tue, 29 Nov 2022 03:54:13 -0500 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78BBFC76D; Tue, 29 Nov 2022 00:54:12 -0800 (PST) Received: by mail-pg1-x52e.google.com with SMTP id h33so7424932pgm.9; Tue, 29 Nov 2022 00:54:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=dpO9kHttOEsGZbAoig1yKNBzBhJaK+0I3/p2cAkfaZs=; b=LvLvBHzD8KLR9pMc7aejSFXchfNBTkbIRoKsfBok/8rA+WdFOCnVrs0D7l2dKDmqB0 NaKTLlOnD+87r5spzGPMmNiYo367kNARd2oM665oRX22blBCJ5IyjRNH+A24F03sIMXE y5klMJz3G4lwctzcBWKTfAha8WJKXCYV72R1zhY2elc9zGaTalzPltYKAAyCB0KaYB+q EVCPJl1z6Wz3nE6gevFta7y7upsedhnzjLoZp5n587T9LjNcm106ApRtlVdBUZQ2VVb1 uTIEj3fkLbxpV8B7kVSB2cvSZPYWp7pz9u2nJ1cnMhK/ouedTHd48xsVa+79xGLxOY// l8Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dpO9kHttOEsGZbAoig1yKNBzBhJaK+0I3/p2cAkfaZs=; b=Y68o0d6dzwyxD6p8kx4yC4T+cnvOnTKq1CJ1fAMlTg5U94ttd/Vynj80Al9DJEklvl MOglITn45YQMR9pF3L3Z0Al02JV0CqNrU0l2cySx1xDbZoVlyLmHEGW/dIYcCh/kYcTs cjaidcxx6N0qqJcWxjKYslAXH2RjNSy0EhS/Noi64NzCEjNnY7oyOqNuTNmWYYq6SwA3 VvGRaZ58GFu7vASbuHjiKk2iPoFqvhNXtXmlLyDPuXVWAlRuD8y7lfsKw4SXbMcYUscL BDfiqiIe/AO6MhTcvLa92G6zJQxpkb8oNFEXAy7X4cT8jkH8Lg1XLDEzeN7WRrd11FzZ scgA== X-Gm-Message-State: ANoB5pl0SzSJMCxJxb9rHbYKKCf4p90VtJI9aPi0bp0W/lqYmvvElBf1 OyZWeKM18jzdidWwqVF1PJibZIkYcGM= X-Received: by 2002:a62:1c95:0:b0:571:baf8:8945 with SMTP id c143-20020a621c95000000b00571baf88945mr36191579pfc.83.1669712051911; Tue, 29 Nov 2022 00:54:11 -0800 (PST) Received: from localhost ([129.41.58.18]) by smtp.gmail.com with ESMTPSA id q14-20020a170902dace00b001895d87225csm10155545plx.182.2022.11.29.00.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 00:54:11 -0800 (PST) Date: Tue, 29 Nov 2022 14:24:01 +0530 From: "Ritesh Harjani (IBM)" To: Theodore Ts'o Cc: Jan Kara , Baokun Li , linux-ext4@vger.kernel.org, adilger.kernel@dilger.ca, lczerner@redhat.com, enwlinux@gmail.com, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, yebin10@huawei.com, yukuai3@huawei.com Subject: Re: [PATCH 2/2] ext4: add inode table check in __ext4_get_inode_loc to aovid possible infinite loop Message-ID: <20221129085401.amqusrucv3h5ihq7@riteshh-domain> References: <20220817132701.3015912-1-libaokun1@huawei.com> <20220817132701.3015912-3-libaokun1@huawei.com> <20220817143138.7krkxzoa3skruiyx@quack3> <20220818144353.q6cq3b7huwkopk5b@riteshh-domain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 22/11/28 03:44PM, Theodore Ts'o wrote: > On Thu, Aug 18, 2022 at 08:13:53PM +0530, Ritesh Harjani (IBM) wrote: > > Folding a small patch to implement the simple bound check. Is this the right > > approach? > > > > From: "Ritesh Harjani (IBM)" > > Date: Thu, 18 Aug 2022 07:53:58 -0500 > > Subject: [RFC] ext4: Add ext4_sb_getblk() wrapper for block bounds checking > > > > We might need more bounds checking on the block before calling sb_getblk(). > > This helper does that and if it is not valid then returns ERR_PTR(-EFSCORRUPTED) > > Later we will need to carefully convert the callers to use ext4_sb_getblk() > > instead of sb_getblk(). > > Hey Ritesh, > > I was going through some old patches and came across this RFC patch. > Have you had a chance to polish this up? I don't think I've seen a > newer version of this patch, but maybe I missed it. Hello Ted, Sorry, I guess I completely forgot about this, since around those dates I was travelling. I will definitely try and get back to this once I finish few ongoing things on my plate. Thanks for bringing it up! -ritesh