public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
@ 2021-04-21  3:04 Takashi Yano
  2021-04-21  8:49 ` Andrey Repin
  2021-04-21  9:19 ` Corinna Vinschen
  0 siblings, 2 replies; 18+ messages in thread
From: Takashi Yano @ 2021-04-21  3:04 UTC (permalink / raw)
  To: cygwin

Hi Corinna,

I noticed the problem that /cygdrive/c/Windows/System32 directory
can be no longer accessed from 32 bit cygwin (WOW64) after the
commit:

commit 456c3a46386f38887407603b2c64b7f63a4871c5
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Mon Apr 19 14:49:14 2021 +0200

    Cygwin: path_conv: Try to handle native symlinks more sanely

    For local paths, add a check if the inner path components contain native
    symlinks or junctions.  Compare the incoming path with the path returned
    by NtQueryInformationFile(FileNameInformation).  If they differ, there
    must be at least one native symlink or junction in the path.  If so,
    treat the currently evaluated file as non-existant.  This forces
    path_conv::check to backtrack inner path components until we eliminated
    all native symlinks or junctions and have a normalized path.

    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Reverting this commit resolves the issue.

64 bit cygwin does not seem to be affected. Could you please
have a look?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21  3:04 Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46 Takashi Yano
@ 2021-04-21  8:49 ` Andrey Repin
  2021-04-21  9:10   ` Takashi Yano
  2021-04-21  9:56   ` Marco Atzeri
  2021-04-21  9:19 ` Corinna Vinschen
  1 sibling, 2 replies; 18+ messages in thread
From: Andrey Repin @ 2021-04-21  8:49 UTC (permalink / raw)
  To: Takashi Yano, cygwin

Greetings, Takashi Yano!

> I noticed the problem that /cygdrive/c/Windows/System32 directory
> can be no longer accessed from 32 bit cygwin (WOW64) after the
> commit:

> commit 456c3a46386f38887407603b2c64b7f63a4871c5
> Author: Corinna Vinschen <corinna@vinschen.de>
> Date:   Mon Apr 19 14:49:14 2021 +0200

>     Cygwin: path_conv: Try to handle native symlinks more sanely

>     For local paths, add a check if the inner path components contain native
>     symlinks or junctions.  Compare the incoming path with the path returned
>     by NtQueryInformationFile(FileNameInformation).  If they differ, there
>     must be at least one native symlink or junction in the path.  If so,
>     treat the currently evaluated file as non-existant.  This forces
>     path_conv::check to backtrack inner path components until we eliminated
>     all native symlinks or junctions and have a normalized path.

>     Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

> Reverting this commit resolves the issue.

> 64 bit cygwin does not seem to be affected. Could you please
> have a look?

How exactly it "can no longer be accessed" ? Is it opening WOW64 System32 or
not opening anything at all?


-- 
With best regards,
Andrey Repin
Wednesday, April 21, 2021 11:47:03

Sorry for my terrible english...


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21  8:49 ` Andrey Repin
@ 2021-04-21  9:10   ` Takashi Yano
  2021-04-21  9:22     ` Andrey Repin
  2021-04-21  9:56   ` Marco Atzeri
  1 sibling, 1 reply; 18+ messages in thread
From: Takashi Yano @ 2021-04-21  9:10 UTC (permalink / raw)
  To: cygwin

On Wed, 21 Apr 2021 11:49:00 +0300
Andrey Repin wrote:
> Greetings, Takashi Yano!
> 
> > I noticed the problem that /cygdrive/c/Windows/System32 directory
> > can be no longer accessed from 32 bit cygwin (WOW64) after the
> > commit:
> 
> > commit 456c3a46386f38887407603b2c64b7f63a4871c5
> > Author: Corinna Vinschen <corinna@vinschen.de>
> > Date:   Mon Apr 19 14:49:14 2021 +0200
> 
> >     Cygwin: path_conv: Try to handle native symlinks more sanely
> 
> >     For local paths, add a check if the inner path components contain native
> >     symlinks or junctions.  Compare the incoming path with the path returned
> >     by NtQueryInformationFile(FileNameInformation).  If they differ, there
> >     must be at least one native symlink or junction in the path.  If so,
> >     treat the currently evaluated file as non-existant.  This forces
> >     path_conv::check to backtrack inner path components until we eliminated
> >     all native symlinks or junctions and have a normalized path.
> 
> >     Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
> 
> > Reverting this commit resolves the issue.
> 
> > 64 bit cygwin does not seem to be affected. Could you please
> > have a look?
> 
> How exactly it "can no longer be accessed" ? Is it opening WOW64 System32 or
> not opening anything at all?

If "ls /cygdrive/c/Windows/System32" is executed, the result is:
ls: cannot access '/cygdrive/c/Windows/System32': No such file or directory

Also, if try to execute "cmd.exe" in System32 directory, the result is:
bash: cmd.exe: command not found.
Of cource, /cygdrive/c/WINDOWS/system32 exists in the PATH.

So I mean "not opening anything at all".

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21  3:04 Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46 Takashi Yano
  2021-04-21  8:49 ` Andrey Repin
@ 2021-04-21  9:19 ` Corinna Vinschen
  2021-04-21 14:58   ` Andrey Repin
  2021-04-21 15:49   ` Bill Stewart
  1 sibling, 2 replies; 18+ messages in thread
From: Corinna Vinschen @ 2021-04-21  9:19 UTC (permalink / raw)
  To: cygwin

Hi Takashi,

On Apr 21 12:04, Takashi Yano via Cygwin wrote:
> Hi Corinna,
> 
> I noticed the problem that /cygdrive/c/Windows/System32 directory
> can be no longer accessed from 32 bit cygwin (WOW64) after the
> commit:

The problem here is the File System Redirector,
https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector

This thing is really a problem because it break every, otherwise
sane assumption.  Hmm, bummer.  I need some time to think about
a solution here.


Thanks,
Corinna

> 
> commit 456c3a46386f38887407603b2c64b7f63a4871c5
> Author: Corinna Vinschen <corinna@vinschen.de>
> Date:   Mon Apr 19 14:49:14 2021 +0200
> 
>     Cygwin: path_conv: Try to handle native symlinks more sanely
> 
>     For local paths, add a check if the inner path components contain native
>     symlinks or junctions.  Compare the incoming path with the path returned
>     by NtQueryInformationFile(FileNameInformation).  If they differ, there
>     must be at least one native symlink or junction in the path.  If so,
>     treat the currently evaluated file as non-existant.  This forces
>     path_conv::check to backtrack inner path components until we eliminated
>     all native symlinks or junctions and have a normalized path.
> 
>     Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
> 
> Reverting this commit resolves the issue.
> 
> 64 bit cygwin does not seem to be affected. Could you please
> have a look?
> 
> -- 
> Takashi Yano <takashi.yano@nifty.ne.jp>
> 
> -- 
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21  9:10   ` Takashi Yano
@ 2021-04-21  9:22     ` Andrey Repin
  2021-04-21 10:07       ` Takashi Yano
  0 siblings, 1 reply; 18+ messages in thread
From: Andrey Repin @ 2021-04-21  9:22 UTC (permalink / raw)
  To: Takashi Yano, cygwin

Greetings, Takashi Yano!

> On Wed, 21 Apr 2021 11:49:00 +0300
> Andrey Repin wrote:
>> Greetings, Takashi Yano!
>> 
>> > I noticed the problem that /cygdrive/c/Windows/System32 directory
>> > can be no longer accessed from 32 bit cygwin (WOW64) after the
>> > commit:
>> 
>> > commit 456c3a46386f38887407603b2c64b7f63a4871c5
>> > Author: Corinna Vinschen <corinna@vinschen.de>
>> > Date:   Mon Apr 19 14:49:14 2021 +0200
>> 
>> >     Cygwin: path_conv: Try to handle native symlinks more sanely
>> 
>> >     For local paths, add a check if the inner path components contain native
>> >     symlinks or junctions.  Compare the incoming path with the path returned
>> >     by NtQueryInformationFile(FileNameInformation).  If they differ, there
>> >     must be at least one native symlink or junction in the path.  If so,
>> >     treat the currently evaluated file as non-existant.  This forces
>> >     path_conv::check to backtrack inner path components until we eliminated
>> >     all native symlinks or junctions and have a normalized path.
>> 
>> >     Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
>> 
>> > Reverting this commit resolves the issue.
>> 
>> > 64 bit cygwin does not seem to be affected. Could you please
>> > have a look?
>> 
>> How exactly it "can no longer be accessed" ? Is it opening WOW64 System32 or
>> not opening anything at all?

> If "ls /cygdrive/c/Windows/System32" is executed, the result is:
> ls: cannot access '/cygdrive/c/Windows/System32': No such file or directory

> Also, if try to execute "cmd.exe" in System32 directory, the result is:
> bash: cmd.exe: command not found.
> Of cource, /cygdrive/c/WINDOWS/system32 exists in the PATH.

> So I mean "not opening anything at all".

Just curious, can you access SysNative at the same time?

ls -l /proc/cygdrive/c/WINDOWS/SysNative/


-- 
With best regards,
Andrey Repin
Wednesday, April 21, 2021 12:18:51

Sorry for my terrible english...


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21  8:49 ` Andrey Repin
  2021-04-21  9:10   ` Takashi Yano
@ 2021-04-21  9:56   ` Marco Atzeri
  2021-04-21 10:09     ` Takashi Yano
  1 sibling, 1 reply; 18+ messages in thread
From: Marco Atzeri @ 2021-04-21  9:56 UTC (permalink / raw)
  To: cygwin

On 21.04.2021 10:49, Andrey Repin wrote:
> Greetings, Takashi Yano!
> 
>> I noticed the problem that /cygdrive/c/Windows/System32 directory
>> can be no longer accessed from 32 bit cygwin (WOW64) after the
>> commit:
> 
>> Reverting this commit resolves the issue.
> 
>> 64 bit cygwin does not seem to be affected. Could you please
>> have a look?
> 
> How exactly it "can no longer be accessed" ? Is it opening WOW64 System32 or
> not opening anything at all?
> 
> 

I see no problem on my side

$ uname -svr
CYGWIN_NT-10.0-WOW 3.2.0(0.340/5/3) 2021-03-29 08:37

$ ls /cygdrive/c/Windows/System32 | wc -l
2925


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21  9:22     ` Andrey Repin
@ 2021-04-21 10:07       ` Takashi Yano
  0 siblings, 0 replies; 18+ messages in thread
From: Takashi Yano @ 2021-04-21 10:07 UTC (permalink / raw)
  To: cygwin

On Wed, 21 Apr 2021 12:22:33 +0300
Andrey Repin wrote:
> Greetings, Takashi Yano!
> 
> > On Wed, 21 Apr 2021 11:49:00 +0300
> > Andrey Repin wrote:
> >> Greetings, Takashi Yano!
> >> 
> >> > I noticed the problem that /cygdrive/c/Windows/System32 directory
> >> > can be no longer accessed from 32 bit cygwin (WOW64) after the
> >> > commit:
> >> 
> >> > commit 456c3a46386f38887407603b2c64b7f63a4871c5
> >> > Author: Corinna Vinschen <corinna@vinschen.de>
> >> > Date:   Mon Apr 19 14:49:14 2021 +0200
> >> 
> >> >     Cygwin: path_conv: Try to handle native symlinks more sanely
> >> 
> >> >     For local paths, add a check if the inner path components contain native
> >> >     symlinks or junctions.  Compare the incoming path with the path returned
> >> >     by NtQueryInformationFile(FileNameInformation).  If they differ, there
> >> >     must be at least one native symlink or junction in the path.  If so,
> >> >     treat the currently evaluated file as non-existant.  This forces
> >> >     path_conv::check to backtrack inner path components until we eliminated
> >> >     all native symlinks or junctions and have a normalized path.
> >> 
> >> >     Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
> >> 
> >> > Reverting this commit resolves the issue.
> >> 
> >> > 64 bit cygwin does not seem to be affected. Could you please
> >> > have a look?
> >> 
> >> How exactly it "can no longer be accessed" ? Is it opening WOW64 System32 or
> >> not opening anything at all?
> 
> > If "ls /cygdrive/c/Windows/System32" is executed, the result is:
> > ls: cannot access '/cygdrive/c/Windows/System32': No such file or directory
> 
> > Also, if try to execute "cmd.exe" in System32 directory, the result is:
> > bash: cmd.exe: command not found.
> > Of cource, /cygdrive/c/WINDOWS/system32 exists in the PATH.
> 
> > So I mean "not opening anything at all".
> 
> Just curious, can you access SysNative at the same time?
> 
> ls -l /proc/cygdrive/c/WINDOWS/SysNative/

This directory is also inaccessible.


-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21  9:56   ` Marco Atzeri
@ 2021-04-21 10:09     ` Takashi Yano
  0 siblings, 0 replies; 18+ messages in thread
From: Takashi Yano @ 2021-04-21 10:09 UTC (permalink / raw)
  To: cygwin

On Wed, 21 Apr 2021 11:56:50 +0200
Marco Atzeri wrote:
> On 21.04.2021 10:49, Andrey Repin wrote:
> > Greetings, Takashi Yano!
> > 
> >> I noticed the problem that /cygdrive/c/Windows/System32 directory
> >> can be no longer accessed from 32 bit cygwin (WOW64) after the
> >> commit:
> > 
> >> Reverting this commit resolves the issue.
> > 
> >> 64 bit cygwin does not seem to be affected. Could you please
> >> have a look?
> > 
> > How exactly it "can no longer be accessed" ? Is it opening WOW64 System32 or
> > not opening anything at all?
> > 
> > 
> 
> I see no problem on my side
> 
> $ uname -svr
> CYGWIN_NT-10.0-WOW 3.2.0(0.340/5/3) 2021-03-29 08:37
> 
> $ ls /cygdrive/c/Windows/System32 | wc -l
> 2925

Because your cygwin1.dll is older than the commit:
commit 456c3a46386f38887407603b2c64b7f63a4871c5
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Mon Apr 19 14:49:14 2021 +0200

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21  9:19 ` Corinna Vinschen
@ 2021-04-21 14:58   ` Andrey Repin
  2021-04-21 15:49     ` Corinna Vinschen
  2021-04-21 15:49   ` Bill Stewart
  1 sibling, 1 reply; 18+ messages in thread
From: Andrey Repin @ 2021-04-21 14:58 UTC (permalink / raw)
  To: Corinna Vinschen via Cygwin, cygwin

Greetings, Corinna Vinschen via Cygwin!

> On Apr 21 12:04, Takashi Yano via Cygwin wrote:
>> Hi Corinna,
>> 
>> I noticed the problem that /cygdrive/c/Windows/System32 directory
>> can be no longer accessed from 32 bit cygwin (WOW64) after the
>> commit:

> The problem here is the File System Redirector,
> https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector

> This thing is really a problem because it break every, otherwise
> sane assumption.  Hmm, bummer.  I need some time to think about
> a solution here.

As far as I'm aware, it can be disabled on application request.
I know at least one 32-bit application (Far Manager) that works through
redirector, but it might not be as easy for a library.

>> 
>> commit 456c3a46386f38887407603b2c64b7f63a4871c5
>> Author: Corinna Vinschen <corinna@vinschen.de>
>> Date:   Mon Apr 19 14:49:14 2021 +0200
>> 
>>     Cygwin: path_conv: Try to handle native symlinks more sanely
>> 
>>     For local paths, add a check if the inner path components contain native
>>     symlinks or junctions.  Compare the incoming path with the path returned
>>     by NtQueryInformationFile(FileNameInformation).  If they differ, there
>>     must be at least one native symlink or junction in the path.  If so,
>>     treat the currently evaluated file as non-existant.  This forces
>>     path_conv::check to backtrack inner path components until we eliminated
>>     all native symlinks or junctions and have a normalized path.
>> 
>>     Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
>> 
>> Reverting this commit resolves the issue.
>> 
>> 64 bit cygwin does not seem to be affected. Could you please
>> have a look?


-- 
With best regards,
Andrey Repin
Wednesday, April 21, 2021 17:54:23

Sorry for my terrible english...


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21  9:19 ` Corinna Vinschen
  2021-04-21 14:58   ` Andrey Repin
@ 2021-04-21 15:49   ` Bill Stewart
  2021-04-21 16:47     ` Corinna Vinschen
  1 sibling, 1 reply; 18+ messages in thread
From: Bill Stewart @ 2021-04-21 15:49 UTC (permalink / raw)
  To: cygwin

On Wed, Apr 21, 2021 at 3:20 AM Corinna Vinschen wrote:

The problem here is the File System Redirector,
>
> https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector
>
> This thing is really a problem because it break every, otherwise
> sane assumption.  Hmm, bummer.  I need some time to think about
> a solution here.
>

Can you elaborate on what "sane assumptions" get broken? (The redirector is
working as designed, as I understand it?)

Bill

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21 14:58   ` Andrey Repin
@ 2021-04-21 15:49     ` Corinna Vinschen
  2021-04-21 16:04       ` Brian Inglis
  0 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2021-04-21 15:49 UTC (permalink / raw)
  To: cygwin

On Apr 21 17:58, Andrey Repin wrote:
> Greetings, Corinna Vinschen via Cygwin!
> 
> > On Apr 21 12:04, Takashi Yano via Cygwin wrote:
> >> Hi Corinna,
> >> 
> >> I noticed the problem that /cygdrive/c/Windows/System32 directory
> >> can be no longer accessed from 32 bit cygwin (WOW64) after the
> >> commit:
> 
> > The problem here is the File System Redirector,
> > https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector
> 
> > This thing is really a problem because it break every, otherwise
> > sane assumption.  Hmm, bummer.  I need some time to think about
> > a solution here.
> 
> As far as I'm aware, it can be disabled on application request.
> I know at least one 32-bit application (Far Manager) that works through
> redirector, but it might not be as easy for a library.

That doesn't help.  We *want* the redirector to work, otherwise we would
end up in the wrong dir in terms of the system32 dir and sysnative
wouldn't work at all in Cygwin, without going to great lengths to
emulate the FSR by ourselves.

I pushed a patch and created new snapshots.  After some mulling I
decided it's not worth to introduce some complicated routine for just
WOW64, so Cygwin simply skips the code from commit 456c3a46386f3 now, if
the incoming path is pointing inside the Windows dir on WOW64.

Eventually, we should really start thinking about dropping 32 bit
support, I guess.  Only 17 years left until time_t overflow...


Corinna

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21 15:49     ` Corinna Vinschen
@ 2021-04-21 16:04       ` Brian Inglis
  2021-04-22  8:16         ` Csaba Raduly
  0 siblings, 1 reply; 18+ messages in thread
From: Brian Inglis @ 2021-04-21 16:04 UTC (permalink / raw)
  To: cygwin

On 2021-04-21 09:49, Corinna Vinschen via Cygwin wrote:
> Eventually, we should really start thinking about dropping 32 bit
> support, I guess.  Only 17 years left until time_t overflow...

...and start working on port to ARM64 Windows? gd&r ;^>

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21 15:49   ` Bill Stewart
@ 2021-04-21 16:47     ` Corinna Vinschen
  2021-04-21 17:57       ` Bill Stewart
  0 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2021-04-21 16:47 UTC (permalink / raw)
  To: cygwin

On Apr 21 09:49, Bill Stewart wrote:
> On Wed, Apr 21, 2021 at 3:20 AM Corinna Vinschen wrote:
> 
> The problem here is the File System Redirector,
> >
> > https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector
> >
> > This thing is really a problem because it break every, otherwise
> > sane assumption.  Hmm, bummer.  I need some time to think about
> > a solution here.
> >
> 
> Can you elaborate on what "sane assumptions" get broken? (The redirector is
> working as designed, as I understand it?)

A sane assumption is for instance, if you cd to foo, that your in foo.
That's what the FSR breaks in a thorough way.  I. e. on WOW64:

  $ cd /cygdrive/c/Windows
  $ ls -1d Sys*
  SysWOW64
  System
  System32
  SystemApps
  SystemResources

So there are two dirs, one called System32, one called SysWOW64.
Note how there's *no* such directory called "Sysnative".  Still...

  $ cd System32

works fine.  You're just not in System32, but in SysWOW64.  Sane?

Alternatively:

  $ cd Sysnative

works fine and now you're, oh wonder, in System32.  If that's sane,
running head first into a wall is, too :)


Corinna

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21 16:47     ` Corinna Vinschen
@ 2021-04-21 17:57       ` Bill Stewart
  2021-04-21 19:28         ` Corinna Vinschen
  0 siblings, 1 reply; 18+ messages in thread
From: Bill Stewart @ 2021-04-21 17:57 UTC (permalink / raw)
  To: cygwin

On Wed, Apr 21, 2021 at 10:47 AM Corinna Vinschenwrote:


> A sane assumption is for instance, if you cd to foo, that your in foo.
> That's what the FSR breaks in a thorough way.  I. e. on WOW64:
>
>   $ cd /cygdrive/c/Windows
>   $ ls -1d Sys*
>   SysWOW64
>   System
>   System32
>   SystemApps
>   SystemResources
>
> So there are two dirs, one called System32, one called SysWOW64.
>

This is, of course, completely expected (notwithstanding the confusion
caused by the "bitness" names being opposite of what some expect).


> Note how there's *no* such directory called "Sysnative".  Still...
>
>   $ cd System32
>
> works fine.  You're just not in System32, but in SysWOW64.  Sane?
>

This is completely sensible and expected, as the entire point of the WoW
emulator is to emulate 32-bit Windows.

Alternatively:
>
>   $ cd Sysnative
>
> works fine and now you're, oh wonder, in System32.  If that's sane,
> running head first into a wall is, too :)
>

"Sysnative" isn't an actual file system directory, as noted, but an "alias"
(for lack of a better word) that allows, from a Wow64 process, to refer to
the real 64-bit system directory. You can use the name "Sysnative" if you
are certain you really want to refer to the 64-bit system directory.

This all seems like a pretty straightforward and sensible approach, IMO.

Bill

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21 17:57       ` Bill Stewart
@ 2021-04-21 19:28         ` Corinna Vinschen
  2021-04-21 21:03           ` Bill Stewart
  0 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2021-04-21 19:28 UTC (permalink / raw)
  To: cygwin

On Apr 21 11:57, Bill Stewart wrote:
> On Wed, Apr 21, 2021 at 10:47 AM Corinna Vinschenwrote:
> 
> 
> > A sane assumption is for instance, if you cd to foo, that your in foo.
> > That's what the FSR breaks in a thorough way.  I. e. on WOW64:
> >
> >   $ cd /cygdrive/c/Windows
> >   $ ls -1d Sys*
> >   SysWOW64
> >   System
> >   System32
> >   SystemApps
> >   SystemResources
> >
> > So there are two dirs, one called System32, one called SysWOW64.
> >
> 
> This is, of course, completely expected (notwithstanding the confusion
> caused by the "bitness" names being opposite of what some expect).
> 
> 
> > Note how there's *no* such directory called "Sysnative".  Still...
> >
> >   $ cd System32
> >
> > works fine.  You're just not in System32, but in SysWOW64.  Sane?
> >
> 
> This is completely sensible and expected, as the entire point of the WoW
> emulator is to emulate 32-bit Windows.
> 
> Alternatively:
> >
> >   $ cd Sysnative
> >
> > works fine and now you're, oh wonder, in System32.  If that's sane,
> > running head first into a wall is, too :)
> >
> 
> "Sysnative" isn't an actual file system directory, as noted, but an "alias"
> (for lack of a better word) that allows, from a Wow64 process, to refer to
> the real 64-bit system directory. You can use the name "Sysnative" if you
> are certain you really want to refer to the 64-bit system directory.
> 
> This all seems like a pretty straightforward and sensible approach, IMO.

This is not the right place to discuss this in detail, but to me, a
straightforward and sensible approach would have been to give the 64
bit system dir another name right from the start:

  C:\Windows\System64


Corinna

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21 19:28         ` Corinna Vinschen
@ 2021-04-21 21:03           ` Bill Stewart
  0 siblings, 0 replies; 18+ messages in thread
From: Bill Stewart @ 2021-04-21 21:03 UTC (permalink / raw)
  To: cygwin

On Wed, Apr 21, 2021 at 1:28 PM Corinna Vinschen wrote:

This is not the right place to discuss this in detail, but to me, a
> straightforward and sensible approach would have been to give the 64
> bit system dir another name right from the start:
>
>   C:\Windows\System64
>

That would not have worked for backward compatibility reasons.

https://docs.microsoft.com/en-us/previous-versions/technet-magazine/ff955767(v=msdn.10)

The "32" suffix in System32 can be seen as just a label and doesn't
represent the "bitness" of the files within. (As Raymond says, "you should
think of System32 as the somewhat strange name for the 'system DLLs in the
same bitness as the application [in this case, OS] that’s running'
directory").

(You're right - not really the right place to discuss - was just responding
to the evaluative labeling.)

Bill

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-21 16:04       ` Brian Inglis
@ 2021-04-22  8:16         ` Csaba Raduly
  2021-04-22  8:26           ` Brian Inglis
  0 siblings, 1 reply; 18+ messages in thread
From: Csaba Raduly @ 2021-04-22  8:16 UTC (permalink / raw)
  To: cygwin list

On Wed, 21 Apr 2021 at 19:44, Brian Inglis  wrote:
>
> On 2021-04-21 09:49, Corinna Vinschen via Cygwin wrote:
> > Eventually, we should really start thinking about dropping 32 bit
> > support, I guess.  Only 17 years left until time_t overflow...
>
> ...and start working on port to ARM64 Windows? gd&r ;^>
>

Get the right compiler, and then

"We just typed make"
(Stephen Lambrigh, Director of Server Product Marketing at Informix
                                      about porting their Database to Linux)

:)
Csaba
-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46
  2021-04-22  8:16         ` Csaba Raduly
@ 2021-04-22  8:26           ` Brian Inglis
  0 siblings, 0 replies; 18+ messages in thread
From: Brian Inglis @ 2021-04-22  8:26 UTC (permalink / raw)
  To: cygwin

On 2021-04-22 02:16, Csaba Raduly via Cygwin wrote:
> On Wed, 21 Apr 2021 at 19:44, Brian Inglis  wrote:
>>
>> On 2021-04-21 09:49, Corinna Vinschen via Cygwin wrote:
>>> Eventually, we should really start thinking about dropping 32 bit
>>> support, I guess.  Only 17 years left until time_t overflow...
>>
>> ...and start working on port to ARM64 Windows? gd&r ;^>
>>
> 
> Get the right compiler, and then
> 
> "We just typed make"
> (Stephen Lambrigh, Director of Server Product Marketing at Informix
>                                        about porting their Database to Linux)
> :)

Would be nice but some work is likely needed for Fjörk Fjörk Fjörk ;^>

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-04-22  8:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21  3:04 Cannot access system32 directory from 32 bit cygwin after the commit 456c3a46 Takashi Yano
2021-04-21  8:49 ` Andrey Repin
2021-04-21  9:10   ` Takashi Yano
2021-04-21  9:22     ` Andrey Repin
2021-04-21 10:07       ` Takashi Yano
2021-04-21  9:56   ` Marco Atzeri
2021-04-21 10:09     ` Takashi Yano
2021-04-21  9:19 ` Corinna Vinschen
2021-04-21 14:58   ` Andrey Repin
2021-04-21 15:49     ` Corinna Vinschen
2021-04-21 16:04       ` Brian Inglis
2021-04-22  8:16         ` Csaba Raduly
2021-04-22  8:26           ` Brian Inglis
2021-04-21 15:49   ` Bill Stewart
2021-04-21 16:47     ` Corinna Vinschen
2021-04-21 17:57       ` Bill Stewart
2021-04-21 19:28         ` Corinna Vinschen
2021-04-21 21:03           ` Bill Stewart

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).