From: David Miller <davem@davemloft.net>
To: catalin.marinas@arm.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Will.Deacon@arm.com, luto@amacapital.net
Subject: Re: [PATCH] net: compat: Ignore MSG_CMSG_COMPAT in compat_sys_{send,recv}msg
Date: Thu, 19 Feb 2015 16:15:08 -0500 (EST) [thread overview]
Message-ID: <20150219.161508.681345805038401073.davem@davemloft.net> (raw)
In-Reply-To: <20150212173218.GC25491@e104818-lin.cambridge.arm.com>
From: Catalin Marinas <catalin.marinas@arm.com>
Date: Thu, 12 Feb 2015 17:32:18 +0000
> On Thu, Feb 12, 2015 at 04:41:24PM +0000, David Miller wrote:
>> Setting MSG_* bits that aren't supported by the protocol in any way
>> gives undefined semantics. You may get an error, it may be silently
>> ignored, etc.
>
> From the sendmsg(2) man page, if some bit in the flags is inappropriate
> for the socket type, it should return -EOPNOTSUPP. But I can't tell
> whether it refers only to bits which are defined (for other socket
> types) or just any bit. The test itself checks for -EOPNOTSUPP but it
> gets -EINVAL instead, hence the failure being reported.
Thanks for thinking about this a bit more. Yes, -EINVAL is probably
not the thing we should return in this situation.
>> I'm not applying this, sorry.
>
> What I'm after is consistency between the native 32-bit kernel and the
> compat layer on 64-bit. On the former, bit 31 is silently ignored, on
> the latter it reports -EINVAL.
>
> We could as well do something like below but we end up with unnecessary
> flags check on 32-bit. The question is whether such change would be
> considered a 32-bit user ABI breakage.
Ok, after some further consideration I like your original patch.
If 32-bit ignores the value, 64-bit should too. So just mask it out.
Please resubmit your original patch, I'll apply it, thanks!
prev parent reply other threads:[~2015-02-19 21:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-12 12:28 [PATCH] net: compat: Ignore MSG_CMSG_COMPAT in compat_sys_{send,recv}msg Catalin Marinas
2015-02-12 16:41 ` David Miller
2015-02-12 17:32 ` Catalin Marinas
2015-02-19 21:15 ` David Miller [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=20150219.161508.681345805038401073.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Will.Deacon@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox