From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b1f4420d01b2c4eb X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feeder6.cambrium.nl!feed.tweaknews.nl!news.astraweb.com!border1.a.newsrouter.astraweb.com!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder2.news.saunalahti.fi!newsfeed3.funet.fi!newsfeeds.funet.fi!news.cc.tut.fi!not-for-mail From: Tero Koskinen Newsgroups: comp.lang.ada Subject: Re: LLVM--Low Level Virtual Machine--and Ada Date: Sat, 21 Jul 2007 16:09:40 +0300 Message-ID: <20070721160940.56433a45.tero.koskinen@iki.fi> References: <1184730995.862147.208590@g12g2000prg.googlegroups.com> NNTP-Posting-Host: ip154.otanner14.opintanner.fi Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: news.cc.tut.fi 1185023380 6639 195.148.53.154 (21 Jul 2007 13:09:40 GMT) X-Complaints-To: abuse@tut.fi NNTP-Posting-Date: Sat, 21 Jul 2007 13:09:40 +0000 (UTC) X-Newsreader: Sylpheed 2.4.2 (GTK+ 2.10.12; i386-unknown-openbsd4.1) Xref: g2news1.google.com comp.lang.ada:16527 Date: 2007-07-21T16:09:40+03:00 List-Id: On Fri, 20 Jul 2007 10:06:25 -0400 Robert A Duff wrote: > Another problem is that some modern machines use DEP (which I think > stands for "data execution prevention" or something like that). DEP > means the operating system prevents writeable data from being executed > as code. For example, OpenBSD people call this technique W^X (write xor execute). It is enabled on sparc{,64}, alpha, i386, amd64, and hppa architectures. > But DEP prevents trampolines from working, so users have to turn > it off in order to run some Ada programs (such as the compiler). > It's a pain because users get some mysterious error message > when trampolines are used. Presentation slide(s) at http://www.openbsd.org/papers/ven05-deraadt/mgp00012.html tells how OpenBSD handles trampolines and non-executable stack. In addition, OpenBSD's gcc-local(1) manual page says: - On most architectures, trampoline code marks the smallest possible area around the trampoline stub executable using mprotect(2), since the stack area is by default non-executable. I don't personally know all the technical details, but above information would suggest that it is somehow possible to use trampolines and DEP/W^X together. >From user viewpoint everything "just works". I can compile (almost) vanilla gcc 4.2 with Ada support on OpenBSD and then use it to compile normal Ada code. The operating system and the compiler(s) handle the memory protection details behind the curtains and I don't need to worry about it. No pain involved. :) -- Tero Koskinen - http://iki.fi/tero.koskinen/