From: Dan Carpenter <dan.carpenter@oracle.com>
To: Julian Anastasov <ja@ssi.bg>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Simon Horman <horms@verge.net.au>,
lvs-devel@vger.kernel.org,
Andrey Utkin <andrey.krieger.utkin@gmail.com>,
David Binderman <dcb314@hotmail.com>
Subject: Re: [PATCHv2 net-next] ipvs: reduce stack usage for sockopt data
Date: Wed, 3 Sep 2014 22:03:00 +0300 [thread overview]
Message-ID: <20140903190300.GN6549@mwanda> (raw)
In-Reply-To: <alpine.LFD.2.11.1409032055520.1750@ja.home.ssi.bg>
On Wed, Sep 03, 2014 at 09:17:38PM +0300, Julian Anastasov wrote:
> > An another question, in do_ip_vs_get_ctl() I can see:
> >
> > + copylen = get_arglen[CMDID(cmd)];
> > + if (*len < (int) copylen || *len < 0) {
> >
> > len is signed, the casting also enforces signed arithmetics. copylen
> > can be 0 at worst case for unused options. Perhaps I'm overlooking
> > something but I think *len < 0 is redundant.
>
> Yes, I added it for readability, it can be
> removed, I checked that it does not generate code when
> I added it. IIRC, Arjan van de Ven mentioned
> about gcc reporting for missing range checks when
> commit 04bcef2a83f40c6db24222b
> ("ipvs: Add boundary check on ioctl arguments") was
> discussed. This is his posting:
>
> http://marc.info/?l=linux-netdev&m=125443389131548&w=2
>
> But I don't know how to check for such warnings
> and if they are still reported.
>
I think you mean CONFIG_DEBUG_STRICT_USER_COPY_CHECKS. Unfortunately
it's been turned off on recent versions of GCC since 2fb0815c9ee6
('gcc4: disable __compiletime_object_size for GCC 4.6+')
regards,
dan carpenter
next prev parent reply other threads:[~2014-09-03 19:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 21:02 [PATCHv2 net-next] ipvs: reduce stack usage for sockopt data Julian Anastasov
2014-09-02 23:50 ` Simon Horman
2014-09-03 9:11 ` Pablo Neira Ayuso
2014-09-03 18:17 ` Julian Anastasov
2014-09-03 19:03 ` Dan Carpenter [this message]
2014-09-05 9:52 ` Pablo Neira Ayuso
2014-09-05 9:52 ` Pablo Neira Ayuso
2014-09-05 18:52 ` Julian Anastasov
2014-09-06 14:25 ` Pablo Neira Ayuso
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=20140903190300.GN6549@mwanda \
--to=dan.carpenter@oracle.com \
--cc=andrey.krieger.utkin@gmail.com \
--cc=dcb314@hotmail.com \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=lvs-devel@vger.kernel.org \
--cc=pablo@netfilter.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.