Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp299727rwb; Thu, 18 Aug 2022 04:13:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR7m5IV2sB5OWUPiY8cenRNuUn5iwx+bQQkWmqNEAMX9bDJomOYL9PjHmgw18LrVHUOr+Rq4 X-Received: by 2002:a63:ab05:0:b0:427:fb94:f9d6 with SMTP id p5-20020a63ab05000000b00427fb94f9d6mr2012604pgf.544.1660821221391; Thu, 18 Aug 2022 04:13:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1660821221; cv=pass; d=google.com; s=arc-20160816; b=0vokAEKKPRlBpzoYDp0AlTlaw/OFUmTOjCxzlfhb3+T2+z2IlwRVaaZhbMCuAjXs07 gEQcje6vk2wzA1U0TNq+uEmlnA9sa3F0xzgPjmfWW9AMzzVBMjI/xAuFGUAvw4RDL/hE BwSVV0XLjlEH7bxvq/WWYLLyvobDgVqsWPK18zlwkj1pIC9G7xUJr9LT4kxtUt0Ak+Lw JtY55HA9/bZVlsQ0BB1cJvn2pLslhYLq367z+Dqv/a7VkEsPvIS9bLimxo4V4Hc3xYCJ /rCGGuDYdTgxCVrjr3WN+VFth3FeoRcuzKTCttX80cRTVnnz/O4FQk4V+ix7zr5eSyCr Cm6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:subject:message-id:cc:to:from :dkim-signature; bh=y+G1krJ8CXTDXn6qZTth7DCyPot/zzg8W1f8MXUNSdI=; b=00zPdxC0My8qqi9omjVWQpIY6vjLu0mo+PpNZKLmSB8L1HPQh8oKNHRRgL5QaS9Rf2 8jlE8OniBoRjWVZ7piwrieTsY4SyxqpAi3En8cgnT5Wdq/bMh2ox7NewyYl+f9igOoxV LDEoWGntCNRlfaQ5f9Rzc9rS94qZ6/LOxZfg0Y6lJmKQfcTkTsBXyhG+/RHC3SLnDgXn 37yQpANmcIaxhQ4iBqv2/ZZA+Qj8KHDQ536ZISLegc2mtPvNoy0b/R7KIjijTTEf7MM4 p2TwzsK0R+aiim4J8P0ltnX/PAhMeqfZQwnu/PlQWvRatBK6IysGekbilUt1n5HMF1tk lDKw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=OdpzWta8; 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 v10-20020a63bf0a000000b00427fbb3e3d2si1237823pgf.246.2022.08.18.04.13.23; Thu, 18 Aug 2022 04:13:41 -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=OdpzWta8; 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 S244301AbiHRLL7 (ORCPT + 99 others); Thu, 18 Aug 2022 07:11:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243897AbiHRLL6 (ORCPT ); Thu, 18 Aug 2022 07:11:58 -0400 X-Greylist: delayed 628 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 18 Aug 2022 04:11:56 PDT Received: from sender-of-o50.zoho.in (sender-of-o50.zoho.in [103.117.158.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F723A5C57; Thu, 18 Aug 2022 04:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660821087; cv=none; d=zohomail.in; s=zohoarc; b=CK+0SxAcSS6Nr2B+ne/H3MWMkiC1taz5FsR2IymBmR8eHwRqr05o0KleO6clc2g4+a3vA6Zzp0qzSSLFgkTEfOtxwzREBNj3B7ecpPEgkErCgWjW8l8NhIoGI8u8G3xNY70IHPLSIkxHUX2PCZ2OHFm4dLDodpL7wv/5rqLMiSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1660821087; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=y+G1krJ8CXTDXn6qZTth7DCyPot/zzg8W1f8MXUNSdI=; b=BXEIBvr6GH4KJjl0jR0jZsY34OPzAV5c1XD2B8yOlA0omfCOGEpZzyZDUV4fwxXBac7gZmZbAJH4qUC0wkmtz5H37DAo+maxpr6oqzKxsIxyw1tZ4qBF3pizqGQCxq6uVpDPJIk8ofrK7+WDa+hMbzvo0Mur7wSzVxSRpq6bJ3g= 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=1660821087; s=zmail; d=siddh.me; i=code@siddh.me; h=From:From:To:To:Cc:Cc:Message-ID:Subject:Subject:Date:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=y+G1krJ8CXTDXn6qZTth7DCyPot/zzg8W1f8MXUNSdI=; b=OdpzWta8ueF1lTahkP72qgf9IErRfIuKV/RyxF+9g476kcZEaCJRCnAHaFlUf4Cc SP3OVYaWI0Ku5SZz+3lTwVgXDYiK5F00aqFFKFqvsBrLRR/d1TdJH/6fh/j/jYucXNz ppnU/TUKtsECR9TfMsnP7stYhGQn7C96AQJ3RjsA= Received: from localhost.localdomain (103.86.19.2 [103.86.19.2]) by mx.zoho.in with SMTPS id 166082108572024.568604130410563; Thu, 18 Aug 2022 16:41:25 +0530 (IST) From: Siddh Raman Pant To: code@siddh.me Cc: david@fromorbit.com, djwong@kernel.org, fgheet255t@gmail.com, hch@infradead.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, riteshh@linux.ibm.com, syzbot+a8e049cd3abd342936b6@syzkaller.appspotmail.com, syzkaller-bugs@googlegroups.com Message-ID: <20220818111117.102681-1-code@siddh.me> Subject: Re: [syzbot] WARNING in iomap_iter Date: Thu, 18 Aug 2022 16:41:17 +0530 X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220818110031.89467-1-code@siddh.me> References: <20220818110031.89467-1-code@siddh.me> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset=utf8 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_BLOCKED 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 The last test patch accidentally left out less-than-zero checks... Is there a way to cancel previously requested tests? #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gi= t master --- drivers/block/loop.c | 3 +++ include/uapi/linux/loop.h | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index e3c0ba93c1a3..4ca20ce3158d 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -977,6 +977,9 @@ loop_set_status_from_info(struct loop_device *lo, =09=09return -EINVAL; =09} =20 +=09if (info->lo_offset < 0 || info->lo_sizelimit < 0) +=09=09return -EINVAL; + =09lo->lo_offset =3D info->lo_offset; =09lo->lo_sizelimit =3D info->lo_sizelimit; =09memcpy(lo->lo_file_name, info->lo_file_name, LO_NAME_SIZE); diff --git a/include/uapi/linux/loop.h b/include/uapi/linux/loop.h index 6f63527dd2ed..973565f38f9d 100644 --- a/include/uapi/linux/loop.h +++ b/include/uapi/linux/loop.h @@ -53,12 +53,12 @@ struct loop_info64 { =09__u64=09=09 lo_device;=09=09=09/* ioctl r/o */ =09__u64=09=09 lo_inode;=09=09=09/* ioctl r/o */ =09__u64=09=09 lo_rdevice;=09=09=09/* ioctl r/o */ -=09__u64=09=09 lo_offset; -=09__u64=09=09 lo_sizelimit;/* bytes, 0 =3D=3D max available */ -=09__u32=09=09 lo_number;=09=09=09/* ioctl r/o */ -=09__u32=09=09 lo_encrypt_type;=09=09/* obsolete, ignored */ -=09__u32=09=09 lo_encrypt_key_size;=09=09/* ioctl w/o */ -=09__u32=09=09 lo_flags; +=09__s64=09=09 lo_offset; +=09__s64=09=09 lo_sizelimit;/* bytes, 0 =3D=3D max available */ +=09__s32=09=09 lo_number;=09=09=09/* ioctl r/o */ +=09__s32=09=09 lo_encrypt_type;=09=09/* obsolete, ignored */ +=09__s32=09=09 lo_encrypt_key_size;=09=09/* ioctl w/o */ +=09__s32=09=09 lo_flags; =09__u8=09=09 lo_file_name[LO_NAME_SIZE]; =09__u8=09=09 lo_crypt_name[LO_NAME_SIZE]; =09__u8=09=09 lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ --=20 2.35.1