From: Alexander Nyberg <alexn@telia.com>
To: linux-kernel@vger.kernel.org
Subject: Expected sys_msync() behaviour?
Date: Sat, 22 May 2004 19:03:56 +0200 [thread overview]
Message-ID: <1085245436.610.23.camel@boxen> (raw)
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
reply other threads:[~2004-05-22 17:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1085245436.610.23.camel@boxen \
--to=alexn@telia.com \
--cc=linux-kernel@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