lkml.org 
[lkml]   [2004]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectExpected sys_msync() behaviour?
From
Date
I looked at a bugzilla filed because of sys_msync() returning ok even if
you specify a addr + len that goes over bss section or MAP_PRIVATE's.

http://bugzilla.kernel.org/show_bug.cgi?id=2728
(my patch should return -ENOMEM instead of -EINVAL according
to specification link below).


This brings up a question on the expected behaviour of sys_msync().
Should it only sync a single vma?

Should it traverse several vma's until the the ending address has been
reached? In that case it should skip anything not MAP_SHARED, but that
also makes the system call quite random as it doesn't sync a flat memory
region.

Personally I think that it should sync a single vma, or parts of it, not
search around or "accidently" touch other mappings which aren't
intended, this should be the work of the user space program.

So before syncing it should check that the region is backed by a
MAP_SHARED file which is writeable and then sync it, yes?

The Open Group Base Specifications Issue 6:
http://www.opengroup.org/onlinepubs/009695399/functions/msync.html

Alex

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.038 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site