From mboxrd@z Thu Jan 1 00:00:00 1970 From: kkonaka@mac.com Subject: Re: stack -> PROT_EXEC/why? Date: Mon, 05 Aug 2002 10:21:47 -0400 Sender: linux-c-programming-owner@vger.kernel.org Message-ID: References: <15694.23819.46199.920521@cerise.nosuchdomain.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Return-path: In-Reply-To: <15694.23819.46199.920521@cerise.nosuchdomain.co.uk> List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: glynn.clements@virgin.net Cc: linux-c-programming@vger.kernel.org > It is sometimes necessary to execute dynamically generated code which > is placed on the stack. The most common cases are in handling signals, > in a technique called a "trampoline" (this is mentioned in the gcc > Info file), and some emulators (e.g. Executor, the Mac emulator). thank you very much - this helps me a lot. > Yes. There is a patch available to change this, but in the standard > kernel, the primary stack is executable. I'll try {locate/}take a look :) > It isn't portable, but you can get this information from > /proc//maps. tested with my mini-test program - serves the purpose fine :) thanks again! kenji