public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Fork issue on W10 WOW
Date: Mon, 09 Jul 2018 12:37:00 -0000	[thread overview]
Message-ID: <20180709123739.GB27673@calimero.vinschen.de> (raw)
In-Reply-To: <87e94b8c-13d0-928e-957d-c32b15b8a962@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2998 bytes --]

On Jul  9 13:37, Marco Atzeri wrote:
> Am 7/9/2018 um 11:03 AM schrieb Corinna Vinschen:
> > On Jul  8 18:03, Marco Atzeri wrote:
> > > Am 30.06.2018 um 22:47 schrieb Ken Brown:
> > > > On 6/30/2018 11:52 AM, Marco Atzeri wrote:
> > > > 
> > > > I've never had this problem with my own 32bit installation on W10, but I
> > > > just reproduced it by doing a new installation with your list of
> > > > packages.  Have you tried just installing a minimal list of packages
> > > > that you need for building the packages you maintain?
> > > > 
> > > 
> > > On a fresh minimal installation the problem can arise again
> > > 
> > > $ cygcheck -cd |wc -l
> > > 245
> > > 
> > > as the first system shared libs are lower than the rebase
> > > DefaultBaseAddress=0x070000000
> > > 
> > > 6F810000-6F811000 r--p  /cygdrive/c/Windows/System32/wow64.dll
> > > 6F811000-6F844000 r-xp  /cygdrive/c/Windows/System32/wow64.dll
> > > 
> > > I think that rebase should consider different rebase
> > > base address for W10.
> > > 
> > > Using DefaultBaseAddress=0x06F000000 seems fine
> > > for the time being
> > 
> > I can do that in the rebaseall script (I have a matching patch locally),
> > but it looks like a race we can't win in the long run.  240 Megs less
> > space is a lot given the number of DLLs in the distro.
> 
> I know, but until we try to support the 32bit version, we need a
> way to handle it.
> 
> > To make matters worse, I just checked my local 32 bit W10 and it turns
> > out that various Windows DLLs loaded by default (even in a simple tcsh)
> > are at even lower addresses, e.g.
> > 
> >    6B690000-6B6A3000 /mnt/c/Windows/System32/netapi32.dll
> 
> I suspect it is due the their 64bit base address

netapi32.dll is 32 bit.  And it's a 32 bit OS, not WOW64...

>  $ objdump -x /cygdrive/c/Windows/System32/wow64.dll|grep ImageBase
> ImageBase               000000006b000000
> 
>  $ objdump -x /cygdrive/c/Windows/System32/wow64win.dll |grep ImageBase
> ImageBase               000000006b180000
> 
> It is like they put the 64bit System 32 over 0x6b000000 (maybe)

0x6b000000?  In your previous mail you wrote 0x6f000000.

> and the WoW64 over 0x70000000

I don't think there's a rule.  On my 64 bit W10 system:

  76E60000-76ED8000 /mnt/c/Windows/System32/wow64win.dll
  76EE0000-76EEA000 /mnt/c/Windows/System32/wow64cpu.dll
  76EF0000-76F42000 /mnt/c/Windows/System32/wow64.dll

Of course you can rebase the wow64 DLLs, it's just unclear if that
helps, given Windows uses different DLL addresses for their system DLLs
after each reboot.

> But I guess that ALSR can play around that numbers.
> There is still a way to disable ALSR?

ASLR is disabled by default on Cygwin executables.  Unless it can't
be disabled anymore for certain (system?) DLLs.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-07-09 12:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-30 17:33 Marco Atzeri
     [not found] ` <c1505248-8d03-c0b6-37ca-9c6eed2100e9@cornell.edu>
2018-07-01  8:51   ` Marco Atzeri
2018-07-08 16:03   ` Marco Atzeri
2018-07-09  9:03     ` Corinna Vinschen
2018-07-09 11:37       ` Marco Atzeri
2018-07-09 12:37         ` Corinna Vinschen [this message]
2018-07-10  5:33           ` Marco Atzeri
2018-07-12 12:34             ` marco atzeri
2018-07-14 12:46               ` Corinna Vinschen
2018-07-14 14:31                 ` Marco Atzeri
2018-07-14 17:58                   ` Achim Gratz
2018-07-14 19:03                     ` Marco Atzeri
2018-07-14 22:41                       ` Achim Gratz
2018-07-15  2:12                         ` Brian Inglis
2018-07-15  9:18                           ` Marco Atzeri
2018-07-15 13:25                             ` Achim Gratz
2018-07-15 19:33                             ` Brian Inglis
2018-07-15 23:01                             ` David Stacey
2018-07-16 18:58                               ` Marco Atzeri
2018-07-16  1:06                             ` Andrey Repin
2018-07-17 18:34                             ` Marco Atzeri

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=20180709123739.GB27673@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@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).