Re: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping

2025-01-22 Thread Corinna Vinschen
On Jan 20 10:36, Ken Brown wrote: > On 1/20/2025 6:49 AM, Corinna Vinschen wrote: > > Nice idea, but this may not do what is expected if the mapping is an > > anonymous mapping, leaving the protection or mapping of trailing pages > > in a wrong state, isn't it? > > > > Can we easily make sure the

Re: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping

2025-01-20 Thread Ken Brown
On 1/20/2025 6:49 AM, Corinna Vinschen wrote: Nice idea, but this may not do what is expected if the mapping is an anonymous mapping, leaving the protection or mapping of trailing pages in a wrong state, isn't it? Can we easily make sure the type of mapping (file vs anon) is known at the time of

Re: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping

2025-01-20 Thread Corinna Vinschen
On Jan 17 18:22, Ken Brown wrote: > On 1/15/2025 12:31 PM, Corinna Vinschen wrote: > > > Ouch. It looks like we can't go to 64K bookkeeping. Windows files are > > > not length-aligned to 64K allocation granularity, but to 4K pagesize. > > > Thus, if we align the length to 64K in mprotect or > > >

Re: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping

2025-01-17 Thread Ken Brown
On 1/15/2025 12:31 PM, Corinna Vinschen wrote: Ouch. It looks like we can't go to 64K bookkeeping. Windows files are not length-aligned to 64K allocation granularity, but to 4K pagesize. Thus, if we align the length to 64K in mprotect or mmap_record::unmap_pages, it tries to access the unalloca

Re: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping

2025-01-15 Thread Corinna Vinschen
On Jan 15 17:59, Corinna Vinschen wrote: > On Jan 15 11:36, Ken Brown wrote: > > On 1/15/2025 8:17 AM, Takashi Yano wrote: > > > With this patch, gdb no longer works in my environment: > > > > > > $ gdb > > > Pre-boot error; key: system-error, args: ("load-thunk-from-memory" "~A" > > > ("Invalid

Re: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping

2025-01-15 Thread Corinna Vinschen
On Jan 15 11:36, Ken Brown wrote: > On 1/15/2025 8:17 AM, Takashi Yano wrote: > > With this patch, gdb no longer works in my environment: > > > > $ gdb > > Pre-boot error; key: system-error, args: ("load-thunk-from-memory" "~A" > > ("Invalid argument") (22)) > > > > Fatal signal: Aborted > > ---

Re: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping

2025-01-15 Thread Ken Brown
On 1/15/2025 8:17 AM, Takashi Yano wrote: With this patch, gdb no longer works in my environment: $ gdb Pre-boot error; key: system-error, args: ("load-thunk-from-memory" "~A" ("Invalid argument") (22)) Fatal signal: Aborted - Backtrace - - A fatal error internal to

Re: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping

2025-01-15 Thread Takashi Yano
ems OK. > > > > Ken > > > From 654e5c83da077b67683a1aefd79a414ed6067e51 Mon Sep 17 00:00:00 2001 > > From: Ken Brown > > Date: Fri, 10 Jan 2025 14:39:46 -0500 > > Subject: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping > > > > It was convenient

Re: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping

2025-01-13 Thread Corinna Vinschen
:00 2001 > From: Ken Brown > Date: Fri, 10 Jan 2025 14:39:46 -0500 > Subject: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping > > It was convenient to use pages of size 4K (Windows page size) for > bookkeeping when we were using filler pages. But all references to > f

[PATCH] Cygwin: mmap: use 64K pages for bookkeeping

2025-01-10 Thread Ken Brown
bject: [PATCH] Cygwin: mmap: use 64K pages for bookkeeping It was convenient to use pages of size 4K (Windows page size) for bookkeeping when we were using filler pages. But all references to filler pages were removed in commit ceda26c9d35b ("Cygwin: mmap: remove __PROT_FILLER and the associat