X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.4 required=5.0 tests=AWL,BAYES_20,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4C5DED62.6030606@cs.umass.edu> Date: Sat, 07 Aug 2010 19:33:54 -0400 From: Eliot Moss Reply-To: moss AT cs DOT umass DOT edu User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: cbsa01 AT bangor DOT ac DOT uk CC: llio AT testun DOT co DOT uk, cygwin AT cygwin DOT com Subject: Re: Moses with Cygwin on Windows 7 References: <009b01cb3572$08902780$19b07680$@co.uk> <4C5C1C67 DOT 8060508 AT cs DOT umass DOT edu> <20100807222339 DOT gwq7fz62o04g8w8s AT webmail DOT bangor DOT ac DOT uk> In-Reply-To: <20100807222339.gwq7fz62o04g8w8s@webmail.bangor.ac.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 8/7/2010 5:23 PM, cbsa01 AT bangor DOT ac DOT uk wrote: > many thanks for your reply. On why we need cygwin: the language model we use is IRSTLM. The native > windows build of Moses does not currently use IRSTLM LMs. I know next to nothing about Moses, so I'll just trust you on this one! > I have been reading up a bit about debasing DLLs, and I gather from > http://www.codeproject.com/KB/DLL/RebaseDll.aspx that the purpose is to avoid either two or more > DLLs using the same preferred base addresses, or the overheads of relocation. However, on > http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/bac7e300-f3df-4087-9c4b-847880d625ad, > it is suggested that from Vista onwards, it is better to leave this to the operating systems's ASLR > (Address space layout randomization) in order to help defeat a ?return-to-libc? attack. Do you agree > with this? If it is still necessary to do a rebase, what does your script do that rebaseall doesn't? The problem is that the address space randomization interferes with how cygwin support fork(). Suppose a parent process maps library A at address X, but does not map library B at all. Then suppose a forked process is not yet using library A, and ends up mapping library B at an address that overlaps X. Then the child reaches a point where it needs to use library A. The implementation of cygwin requires that if a parent and child use the same library, it must be at the same address. Therefore the child's mapping attempt will block. That gives a sense of the scenario. That may not be the exact case, but it's like that. Basically, we need to guarantee that all cygwin dlls map to different preferred places. Yes, this defeats the OS attempt to defeat a security attack. My script finds and rebases every dll file that cygwin 'find' can locate, while rebaseall only does certain directories. For me, the difference lies in (at least) some perl-related dlls that are not where rebaseall looks. Another important thing is that the distance between preferred locations needs to be a little bigger than the default for rebase, on Vista (and Windows 7). This is an obscure thing that Corinna found a while back and took me quite a while to locate in old email threads, but before I set that parameter, rebasing did not work right for me and after adding that it did. Maybe they have changed the default by now, but I don't think so. > Re UAC prompts: this does look annoying but corporate security regulations may prevent us from > turning it off completely. Is there some way to turn it off for individual programs without using > third-party software? That lies outside my expertise. I just turned it off. Best wishes -- Eliot Moss -- 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