From: Scott Branden <scott.branden@broadcom.com>
To: Al Viro <viro@zeniv.linux.org.uk>
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
Date: Thu, 27 Feb 2020 15:49:38 -0800 [thread overview]
Message-ID: <588cad53-0099-b95a-d228-f2523774956a@broadcom.com> (raw)
In-Reply-To: <20200227234055.GF23230@ZenIV.linux.org.uk>
On 2020-02-27 3:40 p.m., Al Viro wrote:
> 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...
Thanks for the immediate responses. I'm glad I sent this patch out to
understand the check is as such.
Is there some attribute we can add so such issues are not reported
against static analysis tools such as coverity?
prev parent reply other threads:[~2020-02-27 23:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 23:31 Scott Branden
2020-02-27 23:39 ` Eric Biggers
2020-02-27 23:40 ` Al Viro
2020-02-27 23:49 ` Scott Branden [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=588cad53-0099-b95a-d228-f2523774956a@broadcom.com \
--to=scott.branden@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®