Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp44038ybf; Thu, 27 Feb 2020 15:42:18 -0800 (PST) X-Google-Smtp-Source: APXvYqz0oFjPpZdXRtmiOp6jD/SR7fvGLWhLd3Yud4hCuM45H/uKPQ5w3Eaqbb35TZJRdJm3VMZS X-Received: by 2002:a9d:7f8d:: with SMTP id t13mr1028684otp.175.1582846938790; Thu, 27 Feb 2020 15:42:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582846938; cv=none; d=google.com; s=arc-20160816; b=cySAczJqZj6/CQbWv/PbtLhJ382J2iZhu4PvNuCJnkS8eYttAGND49DFVBx/4gi8ng JbvryhthQmNTg9p3fCQyDdTVtSlQCoDPSNFcWLWhJQNM/EwrxVmo5q821sb8XpeN8RGO /ULaVUU0mFHhsGiQny2RcNRJENDWrBJvT+8vaGYSY3GR4gwTLQuWQvYpllnwlW6I8HTU i1/4PwzQwfKQsquWnsrVMOHZ4pXVqXk+tv+3nmmLo9oibAJHM21HX8HeQTgx81i+P/Po CcpgI76CB1ZC1zIW8KXwFpEtgjoac9TD/4u7/8iAf3y7c6Ye+eZmyg2OvJpHGFJLd130 uzYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=kcAqXkDXkb4orfbXjKGOFX4ZSbmgClyB8orzH1yMAMw=; b=FLyDKRrfSffexEl/28xAivzNpGwevEAgWiM4V1TsBQ/DRa947B4OjVHp8U8F1kZlvk RQgdVw7HYdtC0qstu/eb5QStlCzFEd4DTGGRp2sYnqDQRXDv4li1P/eu1CNb1msJlWC/ dhaBeO5VmhQ4kBM0n5HS6Wpm4lr6djwwKscn9xLsoumQfrntBzs9Zwbi6k14Y/RsnBbM +uzPJEpzfq9LtGfZHUd1SDs+3FRIJJi1jhcH1FxFjRgtevpy+eviOmi1phjtx8dM8SnX G7bTUvQxybMPILJXA6tN58Gswq/1O5zbmY8x9skvZeo5fFy6ZPUyeNWQ2PNhyi9Sw0Jm ykiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s129si819470oig.177.2020.02.27.15.42.06; Thu, 27 Feb 2020 15:42:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730031AbgB0Xk5 (ORCPT + 99 others); Thu, 27 Feb 2020 18:40:57 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:50164 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729750AbgB0Xk5 (ORCPT ); Thu, 27 Feb 2020 18:40:57 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7Slz-0027E7-Iv; Thu, 27 Feb 2020 23:40:55 +0000 Date: Thu, 27 Feb 2020 23:40:55 +0000 From: Al Viro To: Scott Branden Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Subject: Re: [PATCH] exec: remove comparision of variable i_size of type loff_t against SIZE_MAX Message-ID: <20200227234055.GF23230@ZenIV.linux.org.uk> References: <20200227233133.10383-1-scott.branden@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200227233133.10383-1-scott.branden@broadcom.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 27, 2020 at 03:31:33PM -0800, Scott Branden wrote: > Remove comparision of (i_size > SIZE_MAX). > i_size is of type loff_t and can not be great than SIZE_MAX (~(size_t)0). include/linux/types.h:46:typedef __kernel_loff_t loff_t; include/uapi/asm-generic/posix_types.h:88:typedef long long __kernel_loff_t; And boxen with size_t smaller than long long do exist. Anything 32bit will qualify. Pick any such and check that yourself...