Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp373501lqh; Tue, 7 May 2024 01:32:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVtRRLvnuDmv1c7PF9f9waVGRhguApRS3bH9EyI57sHjvUKSfxw0ElBzqsm4ZumdQ91qhLGcYYs3hJcOWP708xReo4Ux+C6bhTJ54qDg== X-Google-Smtp-Source: AGHT+IFsXWmYX52SS5mRtm1jWVQ1fkiSSXyvHYp+RSPVtH9+cfxRRYFnrmgF8t506sIxtq7Zqybn X-Received: by 2002:ad4:5748:0:b0:6a0:9950:77a6 with SMTP id q8-20020ad45748000000b006a0995077a6mr16170987qvx.40.1715070729088; Tue, 07 May 2024 01:32:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715070729; cv=pass; d=google.com; s=arc-20160816; b=K00I2o78P5K3RXe0SieaWy2uJ0Wj5LhL88aetgz7hYXQ17uckYXy5ra9JRQ6+e7zT4 5yZNoulq6f1WcDfdZnuuuIo7Tkr34t46uPYz8WKuGnpUjA8VeKji/qNpWu0x0Wpr2Oa0 iKAavV/x7mumEnDGh1cqPz3kIgUcVWDRgEB4EVRcAbBZO0hIwyBt/eSYvxT2bb1TjT9D twN1/uktxLN7bq0o5cnOeediAIyGosizFdebg0bDtWYzOzK/hawR5PWYlpqYGU3UBSaO 52a3fU6iLYW+zHx0WoXWqXHKWc5xmNymueNuA/pbmgLrPzEqWLzc7tEuvq6QLCDUk0Wf JyEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AbyBUhF1bZR9QzFx1wqzPcMYZQU9/Sfuec0QHc4Ti30=; fh=M7gLPxuvOODkMwmwD71fkiLUUTuQe74BAfDvAqdRsxY=; b=MK+jancqh77tQX+XRTZ/MrOnihBCCyn4jcHsYafi1Pox5YuJNDvv+SVcTGK6hg73Jc rOaxKvmMDsYl5MUDlX6kCmIawkImytgrNpm5zjUk/XFs1uSUJqqcTt8XniLsfoO2PZyW 8UO+D1sS7+IhgbOIOKM/HPXnduFeDUc4RzXFWdU5588FN/BwU1GGLAV1UVXuxAha0NsR wibrWHCpDUibLD8NQbEE6Euxz7hm7jri+7Tu+4YGEr5cRf1dATPTqgc8lg5hr4Sssv9g fnhjI/wE6YS7XNDSQaX09Y//sg2sL4B4OaPLWmQ3NtkaJhKyR7sucGfF7iiJYk+BI6hY 96Jw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=jY+4x5NE; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-170724-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170724-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id dr12-20020a05621408ec00b006a10eb9d4b2si9182922qvb.251.2024.05.07.01.32.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 01:32:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170724-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=jY+4x5NE; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-170724-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170724-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1084A1C21D1C for ; Tue, 7 May 2024 06:06:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 146876F07E; Tue, 7 May 2024 06:06:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="jY+4x5NE" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A3B16D1C8; Tue, 7 May 2024 06:06:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715061982; cv=none; b=RexPLrRTla5bzNuTgncbCKb7hmBXa2ZdJ5QXV83pt9dKCMTiN2d3x82bRrvTgakA1kpnZi2BNEeegWCuFPX/3sMWMg0PdlDTWHtaotKQvXNG7gd09uHvJzXGj9D7pwRu8pE8Rrxa/tHiX3GTXKVMyB0vz4YdjhM0J1r+KsjoLzo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715061982; c=relaxed/simple; bh=kq0iE4Ltuz++mXgjo8EXa1DxZTvpmf9jk3QNV+WGZTM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OnW1NFEdIYSNtlt1vNVOE/fypBw+k8fKQ7zbcPEOYxe8lMnpsL5NmT7nEcxX54sA+Bg3+aumo2ddlDAW0maqj1cHcckWo+R7gNOUaMIUf9b2JHb7jagMk6rdBUBBQpvorm0OxecWldl85cfEAH5WdICv++7qN0DfYzzgAE1IZ/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=jY+4x5NE; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=AbyBUhF1bZR9QzFx1wqzPcMYZQU9/Sfuec0QHc4Ti30=; b=jY+4x5NEQ57r046QXBQyh12aaV Q0kcP7nsaiQxk0TujJcJmmB3DzHR6560Kp2VpnrUWoz1RbzuQwudmHvlig3XZFfjvmCK1uKSybQoQ tFlQ2aLMNrfSdpG8EoBn0d3oi91PfqGsmJ5Q65WDkKikWcTD30tS9uvj25m2Qv71FPhEiGSNVP+CW e3ejvgmwPdApmsDMKau6IhFtqdyQqRCXMHHFkOr1G4d6NJyG7NgQB2oMFzcYiEqgU7wis7ii9/CAG 5khYwAS4qVTDsBCB1fzO0BnPGBTha6rzeczrAhGxl16drwMqmgbbL+RKq3G8fsk8GB+pNiMBmuEnt 8l0ePAtQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Dxx-00000009mYM-2Fks; Tue, 07 May 2024 06:06:17 +0000 Date: Mon, 6 May 2024 23:06:17 -0700 From: Christoph Hellwig To: Dan Carpenter Cc: "Darrick J. Wong" , Chandan Babu R , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] xfs: check for negatives in xfs_exchange_range_checks() Message-ID: References: <0e7def98-1479-4f3a-a69a-5f4d09e12fa8@moroto.mountain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0e7def98-1479-4f3a-a69a-5f4d09e12fa8@moroto.mountain> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Sat, May 04, 2024 at 02:27:36PM +0300, Dan Carpenter wrote: > The fxr->file1_offset and fxr->file2_offset variables come from the user > in xfs_ioc_exchange_range(). They are size loff_t which is an s64. > Check the they aren't negative. > > Fixes: 9a64d9b3109d ("xfs: introduce new file range exchange ioctl") In this commit file1_offset and file2_offset are u64. They used to be u64 in the initial submission, but we changed that as part of the review process.