Re: [PATCH] Cygwin: mmap: fix mapping beyond EOF on 64 bit

2020-07-20 Thread Brian Inglis
On 2020-07-20 15:08, Ken Brown via Cygwin-patches wrote: > On 7/20/2020 4:29 PM, Brian Inglis wrote: >> On 2020-07-20 09:41, Corinna Vinschen wrote: >>> Ultimately, I wonder if we really should keep all the 32 bit OS stuff >>> in.  The number of real 32 bit systems (not WOW64) is dwindling fast. >>

Re: [PATCH] Cygwin: mmap: fix mapping beyond EOF on 64 bit

2020-07-20 Thread Ken Brown via Cygwin-patches
On 7/20/2020 4:29 PM, Brian Inglis wrote: On 2020-07-20 09:41, Corinna Vinschen wrote: Ultimately, I wonder if we really should keep all the 32 bit OS stuff in. The number of real 32 bit systems (not WOW64) is dwindling fast. Keeping all the AT_ROUND_TO_PAGE stuff in just for what? 2%? of the s

Re: [PATCH] Cygwin: mmap: fix mapping beyond EOF on 64 bit

2020-07-20 Thread Brian Inglis
On 2020-07-20 09:41, Corinna Vinschen wrote: > Ultimately, I wonder if we really should keep all the 32 bit OS stuff > in. The number of real 32 bit systems (not WOW64) is dwindling fast. > Keeping all the AT_ROUND_TO_PAGE stuff in just for what? 2%? of the > systems is really not worth it, I gues

Re: [PATCH] Cygwin: mmap: fix mapping beyond EOF on 64 bit

2020-07-20 Thread Ken Brown via Cygwin-patches
On 7/20/2020 11:41 AM, Corinna Vinschen wrote: On Jul 20 10:58, Ken Brown via Cygwin-patches wrote: On 7/20/2020 10:49 AM, Ken Brown via Cygwin-patches wrote: On 7/20/2020 10:43 AM, Ken Brown via Cygwin-patches wrote: On 7/20/2020 10:23 AM, Corinna Vinschen wrote: On Jul 20 09:34, Ken Brown v

Re: [PATCH] Cygwin: mmap: fix mapping beyond EOF on 64 bit

2020-07-20 Thread Corinna Vinschen
On Jul 20 10:58, Ken Brown via Cygwin-patches wrote: > On 7/20/2020 10:49 AM, Ken Brown via Cygwin-patches wrote: > > On 7/20/2020 10:43 AM, Ken Brown via Cygwin-patches wrote: > > > On 7/20/2020 10:23 AM, Corinna Vinschen wrote: > > > > On Jul 20 09:34, Ken Brown via Cygwin-patches wrote: > > > >

Re: [PATCH] Cygwin: mmap: fix mapping beyond EOF on 64 bit

2020-07-20 Thread Ken Brown via Cygwin-patches
On 7/20/2020 10:49 AM, Ken Brown via Cygwin-patches wrote: On 7/20/2020 10:43 AM, Ken Brown via Cygwin-patches wrote: On 7/20/2020 10:23 AM, Corinna Vinschen wrote: On Jul 20 09:34, Ken Brown via Cygwin-patches wrote: Commit 605bdcd410384dda6db66b9b8cd19e863702e1bb enabled mapping beyond EOF i

Re: [PATCH] Cygwin: mmap: fix mapping beyond EOF on 64 bit

2020-07-20 Thread Ken Brown via Cygwin-patches
On 7/20/2020 10:43 AM, Ken Brown via Cygwin-patches wrote: On 7/20/2020 10:23 AM, Corinna Vinschen wrote: On Jul 20 09:34, Ken Brown via Cygwin-patches wrote: Commit 605bdcd410384dda6db66b9b8cd19e863702e1bb enabled mapping beyond EOF in 64 bit environments.  But the variable 'orig_len' did not

Re: [PATCH] Cygwin: mmap: fix mapping beyond EOF on 64 bit

2020-07-20 Thread Ken Brown via Cygwin-patches
On 7/20/2020 10:23 AM, Corinna Vinschen wrote: On Jul 20 09:34, Ken Brown via Cygwin-patches wrote: Commit 605bdcd410384dda6db66b9b8cd19e863702e1bb enabled mapping beyond EOF in 64 bit environments. But the variable 'orig_len' did not get rounded up to a multiple of 64K. This rounding was done

Re: [PATCH] Cygwin: mmap: fix mapping beyond EOF on 64 bit

2020-07-20 Thread Corinna Vinschen
On Jul 20 09:34, Ken Brown via Cygwin-patches wrote: > Commit 605bdcd410384dda6db66b9b8cd19e863702e1bb enabled mapping beyond > EOF in 64 bit environments. But the variable 'orig_len' did not get > rounded up to a multiple of 64K. This rounding was done on 32 bit > only. Fix this by rounding up

[PATCH] Cygwin: mmap: fix mapping beyond EOF on 64 bit

2020-07-20 Thread Ken Brown via Cygwin-patches
Commit 605bdcd410384dda6db66b9b8cd19e863702e1bb enabled mapping beyond EOF in 64 bit environments. But the variable 'orig_len' did not get rounded up to a multiple of 64K. This rounding was done on 32 bit only. Fix this by rounding up orig_len on 64 bit, in the same place where 'len' is rounded