From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6229 invoked by alias); 28 Feb 2009 20:16:43 -0000 Received: (qmail 6221 invoked by uid 22791); 28 Feb 2009 20:16:42 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 28 Feb 2009 20:16:36 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 9F8F76D418F; Sat, 28 Feb 2009 21:16:25 +0100 (CET) Date: Sat, 28 Feb 2009 20:16:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: [1.7] rebaseall doesn't solve the problem Message-ID: <20090228201625.GA8503@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <499F6682.1090204@cwilson.fastmail.fm> <20090224100616.GC6035@calimero.vinschen.de> <49A85971.6070300@cwilson.fastmail.fm> <20090228104337.GG19887@calimero.vinschen.de> <49A986B4.2080501@cwilson.fastmail.fm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49A986B4.2080501@cwilson.fastmail.fm> User-Agent: Mutt/1.5.19 (2009-02-20) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2009-02/txt/msg00719.txt.bz2 On Feb 28 13:47, Charles Wilson wrote: > Corinna Vinschen wrote: > > > Way cool, Chuck. Especially the fact that this tool can also mark > > executables with the TS-aware flag (doesn't make sense for DLLs, afaik). > > This helps to test if setting this flag in Cygwin binaries will > > allow Cygwin to run on 2008 with TS without disabling DEP. > > Well, the tool would need a little tweaking I think. Right now it skips > any image (DLL or exe) that does not contain relocations. Uh, ok. In that case, yes, it needs some tweaking. Actually, maybe the tool should really be named differently. Something suggesting that it in general changes Win32-related PE/COFF header flags. ASLR and TS-aware are just some of them, in theory. > > If so, I'm wondering if setting the TS-aware flag shouldn't become > > default in GCC. What do you say, Dave? Would that be possible? > > I'd probably wait on that for the /next/ release (e.g. after 4.3.2-2), > so we can get aslr integerated into rebase, and the rebaseall changes > tested. Yes, sure. I have to test if the TS-aware flag makes any difference on a 2K8 TS machine anyway. I think (and hope) that this flag will persuade tsappcmp.dll into igoring an executable instead of scrambling its page executable protection flags. If so, we should really set this flag in all applications. Well, not that I gave up the idea that Microsoft should fix that bug in tsappcmp.dll in the first place... > Should I also add a switch to rebaseall that means: ONLY alsr, > NO rebasing. There's already a flag that allows you to add .exe's to > the "rebase" list -- but you can't remove dll's and .so's from the list. Makes sense to me. > > That would also allow to drop the ugly TS hack I added to Cygwin 1.7. > > All newly built binaries would have the flag set already, and older > > binaries could be tweaked with the aslr utility. > > That would be nice. However, ONLY exe's linked with cygwin1.dll should > be marked this way, right? Not cygcheck, strace, and whatever other few > exes we might find in the cygwin installation lists. Hmm, I'm not sure about that one. At least only EXEs should be marked TS-aware automatically. The flag has no meaning on DLLs, afaik. *Iff* the TS-aware flag helps to avoid tsappcmp.dll entirely, it's a big help in all cases. Cygwin applications are TS-aware by default anyway. If somebody actually manages to write a non-TS-aware Cygwin application, I'd say this guy should reset the TS-aware flag manually. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/