From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-developers@cygwin.com
Subject: Re: page_size vs allocation_granularity
Date: Wed, 22 Jul 2020 20:48:30 +0200 [thread overview]
Message-ID: <20200722184830.GV16360@calimero.vinschen.de> (raw)
In-Reply-To: <5eaa60f8-37d5-1d73-7ec7-679ca0cce3c9@cornell.edu>
On Jul 22 14:35, Ken Brown via Cygwin-developers wrote:
> On 7/22/2020 12:42 PM, Ken Brown via Cygwin-developers wrote:
> > On 7/22/2020 4:33 AM, Corinna Vinschen wrote:
> > > If php reads or writes in the remainder of the block constituting EOF,
> > > or tries to change page protection, shit happens. Every time, a process
> > > stabs into the EOF block following the last valid 4K block, it results
> > > in a STATUS_ACCESS_VIOLATION which in turn calls
> > > mmap_is_attached_or_noreserve(). While this situation can be
> > > recognized, I don't see a way to fix this from the processes POV.
> >
> > So that's exactly what happens when php maps a file whose size is a
> > multiple of 4K but not a multiple of 64K. It expects that there is a
> > zero-filled region beyond EOF that it can safely read from.
>
> Interestingly, you mentioned exactly this scenario in 2002 as a reason for
> keeping the pagesize at 4K rather than 64K:
>
> https://cygwin.com/pipermail/cygwin/2002-January/068154.html
Yeah, it took quite some time for me to realize that a 64K pagesize is
usually the better approach for POSIX compatibility. And the fact that
AT_ROUND_TO_PAGE worked nicely on 32 bit (and 64 bit way off) helped,
too. I was pretty stubborn back then... I hope that changed.
> I have nothing new to contribute, so we should probably just drop this. My
> curiosity has been satisfied.
I toyed around with Windows mappings today, all the stuff I already
tried since 2000 over and over again. Still no joy.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
prev parent reply other threads:[~2020-07-22 18:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 22:40 Ken Brown
2020-07-22 8:33 ` Corinna Vinschen
2020-07-22 8:47 ` Corinna Vinschen
2020-07-22 11:36 ` Ken Brown
2020-07-22 16:42 ` Ken Brown
2020-07-22 18:35 ` Ken Brown
2020-07-22 18:48 ` Corinna Vinschen [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=20200722184830.GV16360@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin-developers@cygwin.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 read-only IMAP folder(s) and NNTP newsgroup(s).