Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-04 Thread Michael Kerrisk (man-pages)
On 04/03/2014 01:51 PM, Christopher Covington wrote: > On 04/03/2014 04:25 AM, Michael Kerrisk (man-pages) wrote: > >> I think the only reasonable solution is to better document existing >> behavior and what the programmer should do. With that in mind, I've >> drafted the following text for the ms

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC [resend]

2014-04-04 Thread Peter Zijlstra
On Fri, Apr 04, 2014 at 09:12:58AM +0200, Michael Kerrisk (man-pages) wrote: > > * Clearer intentions. Looking at the existing code and the code > > history, the fact that flags=0 behaves like flags=MS_ASYNC appears > > to be a coincidence, not the result of an intentional choice. > > M

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC [resend]

2014-04-04 Thread Michael Kerrisk (man-pages)
[Resending this message from yesterday, since, as Richard Hansen pointed out, I failed to CC bug-readline@] [CC += Peter Zijlstra] [CC += bug-readl...@gnu.org -- maintainers, it _may_ be desirable to fix your msync() call] Richard, On Thu, Apr 3, 2014 at 1:44 AM, Richard Hansen wrote: > On 201

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-04 Thread Michael Kerrisk (man-pages)
Hi Greg, On 04/03/2014 02:57 PM, Greg Troxel wrote: > > "Michael Kerrisk (man-pages)" writes: > >> I think the only reasonable solution is to better document existing >> behavior and what the programmer should do. With that in mind, I've >> drafted the following text for the msync(2) man page:

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-03 Thread Christoph Hellwig
Guys, I don't really see why you get so worked up about this. There is lots and lots of precedent of Linux allowing non-Posix (or non-standard in general) arguments to system calls. Even ones that don't have symbolic names defined for them (the magic 3 open argument for device files). Given that

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-03 Thread Richard Hansen
On 2014-04-03 04:25, Michael Kerrisk (man-pages) wrote: > [CC += Peter Zijlstra] > [CC += bug-readl...@gnu.org -- maintainers, it _may_ be desirable to > fix your msync() call] I didn't see bug-readl...@gnu.org in the CC list -- did you forget to add them, or were they BCC'd? >> * Clearer inten

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-03 Thread Greg Troxel
"Michael Kerrisk (man-pages)" writes: > I think the only reasonable solution is to better document existing > behavior and what the programmer should do. With that in mind, I've > drafted the following text for the msync(2) man page: > > NOTES >According to POSIX, exactly one of MS_S

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-03 Thread Christopher Covington
On 04/03/2014 04:25 AM, Michael Kerrisk (man-pages) wrote: > I think the only reasonable solution is to better document existing > behavior and what the programmer should do. With that in mind, I've > drafted the following text for the msync(2) man page: > > NOTES >According to POSIX,

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-03 Thread Michael Kerrisk (man-pages)
[CC += Peter Zijlstra] [CC += bug-readl...@gnu.org -- maintainers, it _may_ be desirable to fix your msync() call] Richard, On Thu, Apr 3, 2014 at 1:44 AM, Richard Hansen wrote: > On 2014-04-02 07:45, Steven Whitehouse wrote: >> Hi, >> >> On Wed, 2014-04-02 at 04:10 -0700, Christoph Hellwig wrot

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-02 Thread Richard Hansen
On 2014-04-02 07:45, Steven Whitehouse wrote: > Hi, > > On Wed, 2014-04-02 at 04:10 -0700, Christoph Hellwig wrote: >> On Tue, Apr 01, 2014 at 02:25:45PM -0400, Richard Hansen wrote: >>> For the flags parameter, POSIX says "Either MS_ASYNC or MS_SYNC shall >>> be specified, but not both." [1] The

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-02 Thread Steven Whitehouse
Hi, On Wed, 2014-04-02 at 04:10 -0700, Christoph Hellwig wrote: > On Tue, Apr 01, 2014 at 02:25:45PM -0400, Richard Hansen wrote: > > For the flags parameter, POSIX says "Either MS_ASYNC or MS_SYNC shall > > be specified, but not both." [1] There was already a test for the > > "both" condition.

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-02 Thread Christoph Hellwig
On Tue, Apr 01, 2014 at 02:25:45PM -0400, Richard Hansen wrote: > For the flags parameter, POSIX says "Either MS_ASYNC or MS_SYNC shall > be specified, but not both." [1] There was already a test for the > "both" condition. Add a test to ensure that the caller specified one > of the flags; fail w

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-02 Thread chrubis
Hi! > > and there's no good > > reason to believe that this behavior would have persisted > > indefinitely. > > > > The msync(2) man page (as currently written in man-pages.git) is > > silent on the behavior if both flags are unset, so this change should > > not break an application written by som

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-01 Thread Richard Hansen
On 2014-04-01 15:32, Michael Kerrisk (man-pages) wrote: > Richard, > > On 04/01/2014 08:25 PM, Richard Hansen wrote: >> For the flags parameter, POSIX says "Either MS_ASYNC or MS_SYNC shall >> be specified, but not both." [1] There was already a test for the >> "both" condition. Add a test to en

Re: [PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-01 Thread Michael Kerrisk (man-pages)
Richard, On 04/01/2014 08:25 PM, Richard Hansen wrote: > For the flags parameter, POSIX says "Either MS_ASYNC or MS_SYNC shall > be specified, but not both." [1] There was already a test for the > "both" condition. Add a test to ensure that the caller specified one > of the flags; fail with EINV

[PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2014-04-01 Thread Richard Hansen
For the flags parameter, POSIX says "Either MS_ASYNC or MS_SYNC shall be specified, but not both." [1] There was already a test for the "both" condition. Add a test to ensure that the caller specified one of the flags; fail with EINVAL if neither are specified. Without this change, specifying ne

[PATCH] mm: msync: require either MS_ASYNC or MS_SYNC

2013-09-01 Thread Richard Hansen
For the flags parameter, POSIX says "Either MS_ASYNC or MS_SYNC shall be specified, but not both." [1] There was already a test for the "both" condition. Add a test to ensure that the caller specified one of the flags; fail with EINVAL if neither are specified. Without this change, specifying ne