From: Dan Carpenter <dan.carpenter@oracle.com>
To: lustre-devel@lists.lustre.org
Subject: [lustre-devel] [bug report] staging: add Lustre file system client support
Date: Tue, 6 Dec 2016 22:19:38 +0300 [thread overview]
Message-ID: <20161206191938.GL8176@mwanda> (raw)
In-Reply-To: <BFC6DE82-5B4E-4F67-A30C-2176DFC28451@intel.com>
On Tue, Dec 06, 2016 at 02:10:13PM -0500, Oleg Drokin wrote:
>
> On Dec 6, 2016, at 1:37 PM, Dan Carpenter wrote:
>
> > On Tue, Dec 06, 2016 at 10:44:54AM -0500, Oleg Drokin wrote:
> >> I see, indeed, it all makes sense now.
> >> So basically if we unconditionally check for the size to be > 0, we should be
> >> fine then, I imagine.
> >> On the other hand there's probably no se for no param and nonzero param len,
> >> so it's probably even better to enforce size as zero when no param.
> >
> > Checking for > 0 is not enough, because it could also have an integer
> > overflow on 32 bit systems. We need to cap the upper bound as well.
>
> How would it play out, though?
> offsetof(struct lstcon_test, tes_param[large_positive_int]) would result in
> some real "large" negative number.
> So trying to allocate this many negative bytes would fail, right?
Oh, yeah. You're right. Good point...
regards,
dan carpenter
next prev parent reply other threads:[~2016-12-06 19:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 12:29 [lustre-devel] [bug report] staging: add Lustre file system client support Dan Carpenter
2016-12-05 23:43 ` Oleg Drokin
2016-12-06 11:02 ` Dan Carpenter
2016-12-06 15:44 ` Oleg Drokin
2016-12-06 18:37 ` Dan Carpenter
2016-12-06 19:10 ` Oleg Drokin
2016-12-06 19:19 ` Dan Carpenter [this message]
2016-12-06 20:14 ` Greg KH
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=20161206191938.GL8176@mwanda \
--to=dan.carpenter@oracle.com \
--cc=lustre-devel@lists.lustre.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.