From: Al Viro <viro@ZenIV.linux.org.uk>
To: Louis Langholtz <lou_langholtz@me.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] include/linux: avoid narrowing length parameter values
Date: Mon, 18 May 2015 16:56:31 +0100 [thread overview]
Message-ID: <20150518155631.GX7232@ZenIV.linux.org.uk> (raw)
In-Reply-To: <45D183F5-DFCC-4FBF-833E-E738E098CF1D@me.com>
On Mon, May 18, 2015 at 09:33:10AM -0600, Louis Langholtz wrote:
> memcpy_from_msg() and memcpy_to_msg() functions previously called
> memcpy_fromiovec() and memcpy_toiovec() functions respectively. The
> memcpy_fromiovec() and memcpy_toiovec() functions took a length parameter
> of type int. memcpy_from_msg() and memcpy_to_msg() now call
> copy_from_iter() and copy_to_iter() functions respectively which take a length
> parameter of type size_t. Most code calling the memcpy_from_msg() and
> memcpy_to_msg() functions currently pass a length value of type size_t.
> This patch updates the memcpy_from_msg() and memcpy_to_msg() functions
> concordantly to take the length parameter of type size_t. This also avoids a potential
> for data narrowing.
iov_iter for sendmsg or recvmsg *can't* have more than 2Gb of data; if it
ever does, it's a serious bug.
IOW, NAK - that's pointless.
next prev parent reply other threads:[~2015-05-18 15:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 15:33 [PATCH] include/linux: avoid narrowing length parameter values Louis Langholtz
2015-05-18 15:56 ` Al Viro [this message]
2015-05-18 20:43 ` Louis Langholtz
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=20150518155631.GX7232@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=lou_langholtz@me.com \
/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.