Re: peflags warning and tsaware flags

2012-04-27 Thread Achim Gratz
Larry Hall (Cygwin) writes:
 Does this help?

Thanks, I've been reading this before.  Tentatively I concluded that all
Cygwin executables should have the +tsaware set, I just wanted to make
sure that there aren't some that I would break if I do this.

Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Waldorf MIDI Implementation  additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: peflags warning and tsaware flags

2012-04-27 Thread Corinna Vinschen
On Apr 27 07:57, Achim Gratz wrote:
 Larry Hall (Cygwin) writes:
  Does this help?
 
 Thanks, I've been reading this before.  Tentatively I concluded that all
 Cygwin executables should have the +tsaware set, I just wanted to make
 sure that there aren't some that I would break if I do this.

To the contrary.  Originally we didn't care for the tsaware flag at all,
up to the point when we encountered that bash just crashed on a
TS-enabled 2008 Server.

After some debugging I found that, on a TS-enabled machine, the system
loads an additional DLL if an application is not marked as tsaware.  I
don't know what this DLL is doing exactly, but apparently it performs
certain tests on the executable to search for possible incompatibilities
of an application and then changes the system behaviour to match the
application's (or the system's) expectations.

Unfortunately it turned out that the DLL could also leave the process in
a broken state.  In case of bash it changed the page protection of parts
of the .text segment to non-executable, which then resulted in a SEGV.
I opened a support case at Microsoft, but it has been rejected.

So, adding the tsaware flag to Cygwin executables might not help, but
should never hurt.


Corinna

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

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: peflags warning and tsaware flags

2012-04-27 Thread Achim Gratz
Corinna Vinschen corinna-cygwin at cygwin.com writes:
 So, adding the tsaware flag to Cygwin executables might not help, but
 should never hurt.

Thanks.  So I'll extend my installer to sweep all executables and add +tsaware.


Regards,
Achim.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



peflags warning and tsaware flags

2012-04-26 Thread Achim Gratz
What is peflags trying to tell me with this warning, which is only present when
the -v switch is in effect?


 ash -c PATH=/bin peflags -t -d -v  /usr/lib/zsh/4.3.12/zsh/zutil.dll
Warning: file is non-executable but has tsaware set
(/usr/lib/zsh/4.3.12/zsh/zutil.dll).
/usr/lib/zsh/4.3.12/zsh/zutil.dll:
coff(0x230e[+executable_image,+line_nums_stripped,
+local_syms_stripped,+32bit_machine,+sepdbg,+dll])
pe(0x8000[-dynamicbase,+tsaware])

 ash -c PATH=/bin peflags -t -d  /usr/lib/zsh/4.3.12/zsh/zutil.dll
/usr/lib/zsh/4.3.12/zsh/zutil.dll: coff(0x230e) 
pe(0x8000[-dynamicbase,+tsaware])


The file(s) in question are most certainly executable, POSIX file permissions
and cacls are no different than hundreds of other DLL.  Also, I seem to have a
wild mixture of +tsaware and -tsaware.  Can I just set all of them to
+tsaware or is that a Bad Idea(TM)?  (I do want to install Cygwin onto a
Terminal Server.)


Achim.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: peflags warning and tsaware flags

2012-04-26 Thread Corinna Vinschen
On Apr 26 15:16, Achim Gratz wrote:
 What is peflags trying to tell me with this warning, which is only present 
 when
 the -v switch is in effect?
 
 
  ash -c PATH=/bin peflags -t -d -v  /usr/lib/zsh/4.3.12/zsh/zutil.dll
 Warning: file is non-executable but has tsaware set
 (/usr/lib/zsh/4.3.12/zsh/zutil.dll).
 /usr/lib/zsh/4.3.12/zsh/zutil.dll:
 coff(0x230e[+executable_image,+line_nums_stripped,
 +local_syms_stripped,+32bit_machine,+sepdbg,+dll])
 pe(0x8000[-dynamicbase,+tsaware])
 
  ash -c PATH=/bin peflags -t -d  /usr/lib/zsh/4.3.12/zsh/zutil.dll
 /usr/lib/zsh/4.3.12/zsh/zutil.dll: coff(0x230e) 
 pe(0x8000[-dynamicbase,+tsaware])
 
 
 The file(s) in question are most certainly executable, POSIX file permissions
 and cacls are no different than hundreds of other DLL.  Also, I seem to have a
 wild mixture of +tsaware and -tsaware.  Can I just set all of them to
 +tsaware or is that a Bad Idea(TM)?  (I do want to install Cygwin onto a
 Terminal Server.)

The warning might be a bit misleading.  What it really tries to tell you
is that the file in question is not an executable (*.exe).  The tsaware
flag has no meaning for DLLs, it's only evaluated in headers of
executables.

The reason that many DLLs in the distro have the tsaware flag set is
because gcc doesn't differ between creating executables or DLLs, it will
add the flag unconditionally.

So, nobody keeps you from adding the tsaware flag to all DLLs, but it
will neither help nor hurt.


Corinna

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

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: peflags warning and tsaware flags

2012-04-26 Thread Achim Gratz
Corinna Vinschen writes:
 The warning might be a bit misleading.  What it really tries to tell you
 is that the file in question is not an executable (*.exe).  The tsaware
 flag has no meaning for DLLs, it's only evaluated in headers of
 executables.

That explains a lot more than that warning message, thank you.

 The reason that many DLLs in the distro have the tsaware flag set is
 because gcc doesn't differ between creating executables or DLLs, it will
 add the flag unconditionally.

 So, nobody keeps you from adding the tsaware flag to all DLLs, but it
 will neither help nor hurt.

So DLL and other dynamic objects should not have it set (even though it
doesn't hurt), while true executables should have it to run umimpeded
on a terminal server?  Or are there Cygwin applications that should not
have that flag set?


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: peflags warning and tsaware flags

2012-04-26 Thread Larry Hall (Cygwin)

On 4/26/2012 4:28 PM, Achim Gratz wrote:

Corinna Vinschen writes:

The warning might be a bit misleading.  What it really tries to tell you
is that the file in question is not an executable (*.exe).  The tsaware
flag has no meaning for DLLs, it's only evaluated in headers of
executables.


That explains a lot more than that warning message, thank you.


The reason that many DLLs in the distro have the tsaware flag set is
because gcc doesn't differ between creating executables or DLLs, it will
add the flag unconditionally.

So, nobody keeps you from adding the tsaware flag to all DLLs, but it
will neither help nor hurt.


So DLL and other dynamic objects should not have it set (even though it
doesn't hurt), while true executables should have it to run umimpeded
on a terminal server?  Or are there Cygwin applications that should not
have that flag set?


Does this help?
http://msdn.microsoft.com/en-us/library/01cfys9z%28v=VS.80%29.aspx


--
Larry

_

A: Yes.
 Q: Are you sure?
 A: Because it reverses the logical flow of conversation.
 Q: Why is top posting annoying in email?

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple