From: Junio C Hamano <gitster@pobox.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>,
David Michael Barr <david.barr@cordelta.com>,
Sverre Rabbelier <srabbelier@gmail.com>,
Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: Explanation for dropping write-back in mmap
Date: Mon, 07 Jun 2010 08:55:56 -0700 [thread overview]
Message-ID: <7vbpbmx2er.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <AANLkTilrinkNo9awJ9Wso4tXzQKghWEd2bfDRhPHPOga@mail.gmail.com> (Ramkumar Ramachandra's message of "Mon\, 7 Jun 2010 17\:16\:18 +0200")
Ramkumar Ramachandra <artagnon@gmail.com> writes:
> In the commit f48000fcbe100, you've forced the caller to use
> MAP_PRIVATE in the alternative mmap implementation dropping write-back
> support.
> ...
> commit f48000fcbe1009c18f1cc46e56cde2cb632071fa
> Author: Junio C Hamano <junkio@cox.net>
> Date: Sat Oct 8 15:54:36 2005 -0700
>
> Yank writing-back support from gitfakemmap.
>
> We do not write through our use of mmap(), so make sure callers pass
> MAP_PRIVATE and remove support for writing changes back.
That's a
I don't think we _dropped_ a _working_ support that allowed shared
mapping. IIRC the implementation emulated only private mapping well
enough to support the use of mmap() in our codebase (iow, instead of
allocating a buffer and reading into it and possibly mucking with it
without affecting outside world, map it to read and then possibly mucking
with it), but lacked input validation to make sure that no caller
mistakenly thinks the implementation could satisfy non private mapping.
Also I don't think I did this without telling other people---it would be a
lot more likely that somebody else noticed it and the issue was discussed
on the list and resulted in this commit. I would check the commit date
and see the discussion around that time if I were you to learn the
backstory.
next prev parent reply other threads:[~2010-06-07 15:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-07 15:16 Explanation for dropping write-back in mmap Ramkumar Ramachandra
2010-06-07 15:50 ` Shawn O. Pearce
2010-06-07 15:55 ` Junio C Hamano [this message]
2010-06-07 19:01 ` Ramkumar Ramachandra
2010-06-07 23:13 ` David Michael Barr
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=7vbpbmx2er.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=artagnon@gmail.com \
--cc=david.barr@cordelta.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=srabbelier@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).