Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp208030lqo; Tue, 7 May 2024 18:11:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWoudY5yzdp3wLXblE377bIE9OdgsSYrPKwf81mIdPwJ/9XeeVQOIdctQ+9j57Jtz9gbLkj3ZGNC/qG1bB7AR7IJZ+3O3+xyzP1mYcg7w== X-Google-Smtp-Source: AGHT+IGJbhbChsJta19R8zLwBzOhHN8bZ85OZYI5A3U/MtarUcrDbipkOGf9LU6yGbHtZ3Kk1Nkw X-Received: by 2002:a17:90a:ee94:b0:2a5:e087:768a with SMTP id 98e67ed59e1d1-2b6167da483mr1386572a91.29.1715130681338; Tue, 07 May 2024 18:11:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715130681; cv=pass; d=google.com; s=arc-20160816; b=0qGWRWeLf0uVY+1Zo6xM2z+4YmJXk9TCij3y6/hxFs9W1gx12YzNrFAGCZgmAPOLMM fj1JyUJbgEpQo9C4kHrQQ1DtucrQA0aVSXFqNzmH70YRh/8w1fJ3lvpCdVhIInQ5R+cB PLO0X2uTDxvMwYqfEooCgolAb2CZc4GS1RHYfEyPBjTjHvgzvO7Ku8k8vlq19dZp717q 0/d7vAgz1uER2ntoid6FUnsAoHt6ntmHh8i6sUQjAtYzySp55KCXsSop3fU0M4AQA/UV GdGgNsqNqMV7pa+TJvVNKBdH2iv3ec11EYtcQEG3yLLflzNUM5zt+fwytWwtcJRebec0 0LTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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=eM7u39jxMuwtzxSxV3ofyR5Os8gM00ob3zb2+NEoLvU=; fh=rVaxhcuFXLlAgeiN57QjWaNNP4MqBeg/iAPeZMBm6Gg=; b=HkrKYvWDXmbhVRQHniNqZNm+cMsaiIf1WwYcRQ3B7JIgeGihQEFoice89RM4zCe2Yz WLCsI1KvLixikg/Acs1SESKatp3nPYCneGl4frrAimXV1DmctauuwqaPj3+dpZhGY9mr udSAfS/SqprxQM8ATuYrSGcU0nhXq7lDzlgZRNG3EFRX/Gc93QrSnsKbGgvpSMWoShKT FqsV11ln8ECBKqpZqOF2uBRRnv6KaFhfIIO0Q/u6VNo7LBHyT5aLCKYGc1kA1utrSMCu 0bJ/UV1FlU6VmP7R1bNYFRASzmmimUFlTipy+6dMxPjgiPn1+9Bpu3HSvHp/mtapA6Yw hKWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=pVlA17cb; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-172547-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172547-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u64-20020a638543000000b0061b37e7f865si10863934pgd.583.2024.05.07.18.11.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 18:11:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172547-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=pVlA17cb; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-172547-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172547-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 961F1B28EE1 for ; Wed, 8 May 2024 00:12:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFB73322E; Wed, 8 May 2024 00:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="pVlA17cb" Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) (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 500DA376; Wed, 8 May 2024 00:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.89.141.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715127044; cv=none; b=oglVU0Y/tA9er7h2uj78sYCHm7pWMX5i/sU83LQJUgID7kDXTfJcmqKe4AX6mOl7PEq7NLmVlLzvzJQHEsx2nBbwSJdx2wRGZPHf4hDCaX8ZSV578jpHgEjj66guVw1murKePJ3Ditseg/qcrcg/BP+xO4SxdU+klCT7YkOw2Xo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715127044; c=relaxed/simple; bh=YYimxk82ybgdi1fUKmFUwfYtpSzOpBoq9hOWGpuXEr8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Crjg9Yx5dggIVmvp7zU5icS3UOWs5FE18B+KmKpcgvBzQ31beeM5oDm7JFLYyIUDeR8Xb9+oboB9Lmfpy54k1oJqWYN2bt9Z4QyzdEhhQL1rb3lRC0JPjE9U7Cnlm1Y+ceVTszJuJtib5l+Ym9kfS8/vsOIYFCsACMJZE70Xe0A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk; spf=none smtp.mailfrom=ftp.linux.org.uk; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b=pVlA17cb; arc=none smtp.client-ip=62.89.141.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ftp.linux.org.uk 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=eM7u39jxMuwtzxSxV3ofyR5Os8gM00ob3zb2+NEoLvU=; b=pVlA17cbEXQXUJwfmziJdT/pzM OfvTIlrmq/sxNGUcQuVO5kngSZNediU1l30Iz4V0eEWL9oiaQQzHHHEHLS+iWpOdXvkRnBIoVuikF +kM1B+jOLuCSyIHRRLMRRpNNvqUwdLouvNnU1+CRMzTw7xYJ6Atomp9CSWRdGspXa/krpKRbTIECh gTisO5xwE9vthNlSwD4ufpaM9ctzsYdipXHzPAO/JSGfPPOQmlWDc/ModfFEuiplMRxxCf8vL+7yz AV7pjKGwICxqJvR+muJl+fql2iFIESjrxr0r19qURGS6wZ9Uy79yApnNVRN6Q4B12wwL0RpBllmNe 6ajaUlbA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1s4UtH-00Fa9R-27; Wed, 08 May 2024 00:10:35 +0000 Date: Wed, 8 May 2024 01:10:35 +0100 From: Al Viro To: Justin Stitt Cc: Christian Brauner , Jan Kara , Nathan Chancellor , Bill Wendling , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org Subject: Re: [PATCH] fs: remove accidental overflow during wraparound check Message-ID: <20240508001035.GK2118490@ZenIV> References: <20240507-b4-sio-vfs_fallocate-v1-1-322f84b97ad5@google.com> 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: <20240507-b4-sio-vfs_fallocate-v1-1-322f84b97ad5@google.com> Sender: Al Viro On Tue, May 07, 2024 at 11:17:57PM +0000, Justin Stitt wrote: > I wonder, though, why isn't loff_t an unsigned type? Consider lseek(fd, -10, SEEK_CUR) PS: the above is *not* an endorsement of the proposed patch or KASAN overflow nonsense in general.