Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2451997rwa; Mon, 22 Aug 2022 07:59:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Rvs4LquzDFqcimNSQMyEykceSR3dr9bcgVX2BIvNX1xT5JmjcRGug9kbLrHrBnMTRS6AD X-Received: by 2002:a17:902:9b85:b0:16e:cc02:b9b2 with SMTP id y5-20020a1709029b8500b0016ecc02b9b2mr20747262plp.74.1661180378650; Mon, 22 Aug 2022 07:59:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661180378; cv=pass; d=google.com; s=arc-20160816; b=HtdXPR32f2GFDJKw6sHFTLTTifcU28PmHwoag4AFITzSkmlneZ1gLPF+ld58Z4gCeG VaTgGdPmezBw3CVJvj8im4lNuiyMwq/SPcRIO9M2gXAZCr+dNgMoAjf2gTRrUsgT5TQc cHR4cps6kVH+bTfqb53QijSLf/IPZrBjYWe+0wBNG2IncahS4/DnGKLNSk5AWy+1nvpO 0b4f5HF4+8ZUAH5iKRp48RsvrsArqaMctSMh3sNlZDv2HLNp+3t7JnZ+eu57UKntplNq guG4MJrdZS1MXAvW2f1dhl5OoyUoLzaRbp+pkR4uFYxxdeRPDJukV4SNvSQv/XdUAAci 1eSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:dkim-signature; bh=1/As8HiBTtKLJWHkLMxaHWVm4vefy+krh2lK8/Fqr0c=; b=Lr2JskPKK2u+V0lxJ26DnvXIvmrg9Y/4LbQ+gtWvuZWVrcjMtqaXWHlY7SaFOswFr+ a5Xn5FqHp0YHpLDRbB3OSULsWTq6WDmKE2VZd4iffdKYEiu7HNKishfhg6St4NvQ6Hfd E3gaIvwYJCYm0owTwQMlHBssOpfsLonzs0GHT+UDWTwwWxmfWpcpN8W7kpBXfSldzP3y Zcwz+0O/SybPFTU/qzBZnTeOtId9ruxi8khnMGNCgIQiVmpAPlN2t020kiUA9YB0q10O NmpcRMf6l5O+9yjMgmQYOWitvGUPVLzDc9TheQ0sHYIF8Flw7YpfzvUvK2vdaw0wcamd 5dYQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=tdihgEUS; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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=REJECT sp=REJECT dis=NONE) header.from=siddh.me Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h7-20020a056a00170700b0052f52495dbesi12927115pfc.85.2022.08.22.07.59.20; Mon, 22 Aug 2022 07:59:38 -0700 (PDT) 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=@siddh.me header.s=zmail header.b=tdihgEUS; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); 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=REJECT sp=REJECT dis=NONE) header.from=siddh.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235623AbiHVOuo (ORCPT + 99 others); Mon, 22 Aug 2022 10:50:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235556AbiHVOun (ORCPT ); Mon, 22 Aug 2022 10:50:43 -0400 Received: from sender-of-o50.zoho.in (sender-of-o50.zoho.in [103.117.158.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDF0B37F85; Mon, 22 Aug 2022 07:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661179794; cv=none; d=zohomail.in; s=zohoarc; b=YQAijLv/Lbe14OzPr0mzRNLoZDvTRpLfUEXGcqbBRD0kKEJpxanXVquWrV+UG5BzCpVTbdpPoAfaViDmO9Thws5J0c/C/ZmEqZR8VtXXLZFdpiPT5dhkCNxH5RYO6XpSVtnLc61mL2bJv9t5T0ojwqy6+HcfHjsM4Hrol7pNWKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1661179794; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=1/As8HiBTtKLJWHkLMxaHWVm4vefy+krh2lK8/Fqr0c=; b=TLge55SnZLPUoGrT3ldSzWOlKutcuTsQAYnfBs7JCAqCgRV1wbWsTQUWKWM2pSJutvr96D9XHXfRvsNBunzD/gwaGQw9XZPpTekvU/4of0P9v/757osBcs+OCLxj80qJGA/FKe7vf8XyjzTJbGH+JMP9NFVu75rk74NoZl1FK48= ARC-Authentication-Results: i=1; mx.zohomail.in; dkim=pass header.i=siddh.me; spf=pass smtp.mailfrom=code@siddh.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1661179794; s=zmail; d=siddh.me; i=code@siddh.me; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=1/As8HiBTtKLJWHkLMxaHWVm4vefy+krh2lK8/Fqr0c=; b=tdihgEUStPOrWmTSRI9/Urp0AQkosKaE04zWb59kO++QUug9D9Dh7yg7ZAdWlIwi Z5wK8l4x9vv1rdJ8J/S4ap7hYq8nBhqYIhipepmCZujkrMcN+P2bDtN5kMtxSN9YAj3 fqrA3hGM7sj5i5bEjtHU5fIST9eXwUm9KONh4Naw= Received: from mail.zoho.in by mx.zoho.in with SMTP id 1661179783103133.49004819986476; Mon, 22 Aug 2022 20:19:43 +0530 (IST) Date: Mon, 22 Aug 2022 20:19:43 +0530 From: Siddh Raman Pant To: "Matthew Wilcox" Cc: "david" , "djwong" , "fgheet255t" , "hch" , "linux-ext4" , "linux-fsdevel" , "linux-kernel" , "linux-xfs" , "riteshh" , "syzbot+a8e049cd3abd342936b6" , "syzkaller-bugs" Message-ID: <182c607e79a.820e4a7012709.6365464609772129416@siddh.me> In-Reply-To: References: <182c028abf0.2dc6f7c973088.2963173753499991828@siddh.me> <20220821114816.24193-1-code@siddh.me> Subject: Re: [syzbot] WARNING in iomap_iter MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_RED 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 Mon, 22 Aug 2022 20:15:28 +0530 Matthew Wilcox wrote: > On Sun, Aug 21, 2022 at 05:18:16PM +0530, Siddh Raman Pant wrote: > > @@ -979,9 +979,15 @@ loop_set_status_from_info(struct loop_device *lo, > > > > lo->lo_offset = info->lo_offset; > > lo->lo_sizelimit = info->lo_sizelimit; > > + lo->lo_flags = info->lo_flags; > > + > > + /* loff_t/int vars are assigned __u64/__u32 vars (respectively) */ > > + if (lo->lo_offset < 0 || lo->lo_sizelimit < 0 || lo->lo_flags < 0) > > + return -EOVERFLOW; > > Why would you check lo_flags? That really, really should be an unsigned > type. I agree, but the loop_device struct has (see line 54 of loop.c): int lo_flags; Thus, I checked for it, as we are not changing any types. Thanks, Siddh