Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-08-01 Thread Ben Hutchings
On Mon, 2015-06-01 at 09:28 +, Junling Zheng wrote: > Hi, Greg: > > We found that after v3.10.73, recvmsg might return -EFAULT while -EINVAL > was expected. > > We tested it through the recvmsg01 testcase come from LTP testsuit. It set > msg->msg_namelen to -1 and the recvmsg syscall returned

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-02 Thread Luis Henriques
On Tue, Jun 02, 2015 at 03:05:57PM +0800, Junling Zheng wrote: > On 2015/6/2 14:52, Willy Tarreau wrote: > > On Tue, Jun 02, 2015 at 02:43:54PM +0800, Junling Zheng wrote: > >> On 2015/6/2 14:27, Greg KH wrote: > >>> On Mon, Jun 01, 2015 at 10:23:57PM -0700, David Miller wrote: > From: Junling

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-02 Thread Junling Zheng
On 2015/6/2 14:52, Willy Tarreau wrote: > On Tue, Jun 02, 2015 at 02:43:54PM +0800, Junling Zheng wrote: >> On 2015/6/2 14:27, Greg KH wrote: >>> On Mon, Jun 01, 2015 at 10:23:57PM -0700, David Miller wrote: From: Junling Zheng Date: Tue, 2 Jun 2015 12:05:32 +0800 > So, the prob

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-01 Thread Willy Tarreau
On Tue, Jun 02, 2015 at 02:43:54PM +0800, Junling Zheng wrote: > On 2015/6/2 14:27, Greg KH wrote: > > On Mon, Jun 01, 2015 at 10:23:57PM -0700, David Miller wrote: > >> From: Junling Zheng > >> Date: Tue, 2 Jun 2015 12:05:32 +0800 > >> > >>> So, the problem commit is 281c9c36 (net: compat: Update

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-01 Thread Junling Zheng
On 2015/6/2 14:27, Greg KH wrote: > On Mon, Jun 01, 2015 at 10:23:57PM -0700, David Miller wrote: >> From: Junling Zheng >> Date: Tue, 2 Jun 2015 12:05:32 +0800 >> >>> So, the problem commit is 281c9c36 (net: compat: Update >>> get_compat_msghdr() to match copy_msghdr_from_user() behaviour), >>> w

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-01 Thread Junling Zheng
On 2015/6/2 13:23, David Miller wrote: > From: Junling Zheng > Date: Tue, 2 Jun 2015 12:05:32 +0800 > >> So, the problem commit is 281c9c36 (net: compat: Update >> get_compat_msghdr() to match copy_msghdr_from_user() behaviour), >> which fixes db31c55a6fb2 and brings the get_compat_msghdr() in li

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-01 Thread Greg KH
On Mon, Jun 01, 2015 at 10:23:57PM -0700, David Miller wrote: > From: Junling Zheng > Date: Tue, 2 Jun 2015 12:05:32 +0800 > > > So, the problem commit is 281c9c36 (net: compat: Update > > get_compat_msghdr() to match copy_msghdr_from_user() behaviour), > > which fixes db31c55a6fb2 and brings the

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-01 Thread Junling Zheng
On 2015/6/2 12:44, Greg KH wrote: > On Tue, Jun 02, 2015 at 12:05:32PM +0800, Junling Zheng wrote: >> On 2015/6/2 9:21, Greg KH wrote: >>> On Mon, Jun 01, 2015 at 09:28:00AM +, Junling Zheng wrote: Hi, Greg: We found that after v3.10.73, recvmsg might return -EFAULT while -EINVAL

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-01 Thread David Miller
From: Junling Zheng Date: Tue, 2 Jun 2015 12:05:32 +0800 > So, the problem commit is 281c9c36 (net: compat: Update > get_compat_msghdr() to match copy_msghdr_from_user() behaviour), > which fixes db31c55a6fb2 and brings the get_compat_msghdr() in line > with copy_msghdr_from_user(). Upstream thi

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-01 Thread Greg KH
On Tue, Jun 02, 2015 at 12:05:32PM +0800, Junling Zheng wrote: > On 2015/6/2 9:21, Greg KH wrote: > > On Mon, Jun 01, 2015 at 09:28:00AM +, Junling Zheng wrote: > >> Hi, Greg: > >> > >> We found that after v3.10.73, recvmsg might return -EFAULT while -EINVAL > >> was expected. > > > > That mea

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-01 Thread Junling Zheng
On 2015/6/2 9:21, Greg KH wrote: > On Mon, Jun 01, 2015 at 09:28:00AM +, Junling Zheng wrote: >> Hi, Greg: >> >> We found that after v3.10.73, recvmsg might return -EFAULT while -EINVAL >> was expected. > > That means I messed up and applied something I shouldn't have, right? > > Can you use

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-01 Thread Greg KH
On Mon, Jun 01, 2015 at 09:28:00AM +, Junling Zheng wrote: > Hi, Greg: > > We found that after v3.10.73, recvmsg might return -EFAULT while -EINVAL > was expected. That means I messed up and applied something I shouldn't have, right? Can you use 'git bisect' to find the problem patch? That'

Re: [RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-01 Thread David Miller
From: Junling Zheng Date: Mon, 1 Jun 2015 09:28:00 + > We found that after v3.10.73, recvmsg might return -EFAULT while -EINVAL > was expected. > > We tested it through the recvmsg01 testcase come from LTP testsuit. It set > msg->msg_namelen to -1 and the recvmsg syscall returned errno 14, w

[RFC] [PATCH] net: socket: Fix the wrong returns for recvmsg and sendmsg

2015-06-01 Thread Junling Zheng
Hi, Greg: We found that after v3.10.73, recvmsg might return -EFAULT while -EINVAL was expected. We tested it through the recvmsg01 testcase come from LTP testsuit. It set msg->msg_namelen to -1 and the recvmsg syscall returned errno 14, which is unexpected (errno 22 is expected): recvmsg014