From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16293 invoked by alias); 4 Nov 2013 23:39:57 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 16283 invoked by uid 89); 4 Nov 2013 23:39:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.6 required=5.0 tests=BAYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail.comstyle.com Received: from Unknown (HELO mail.comstyle.com) (206.51.28.2) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 04 Nov 2013 23:39:55 +0000 Received: from users-mac-pro.home.comstyle.com (speedy [IPv6:2001:470:1d:8c::2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: brad) by mail.comstyle.com (Postfix) with ESMTPSA id 56A4F92273 for ; Mon, 4 Nov 2013 18:39:43 -0500 (EST) Message-ID: <52782F89.3090605@comstyle.com> Date: Mon, 04 Nov 2013 23:39:00 -0000 From: Brad Smith User-Agent: Mozilla/5.0 (Macintosh; PPC Mac OS X 10.5; rv:17.0) Gecko/20130918 Thunderbird/17.0.9 TenFourFox/Debugging MIME-Version: 1.0 To: libffi-discuss@sourceware.org Subject: Re: Mark libffi as not requiring executable stack on FreeBSD References: <20120729011435.GN2676@deviant.kiev.zoral.com.ua> In-Reply-To: <20120729011435.GN2676@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-comstyle-MailScanner-Information: Please contact the ISP for more information X-comstyle-MailScanner-ID: 56A4F92273.A123D X-comstyle-MailScanner: Found to be clean X-comstyle-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (not cached, score=-2.9, required 6, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_00 -1.90) X-comstyle-MailScanner-From: brad@comstyle.com X-IsSubscribed: yes X-SW-Source: 2013/txt/msg00194.txt.bz2 On 28/07/12 9:14 PM, Konstantin Belousov wrote: > Hi, > libffi on FreeBSD uses assembler source src/x86/freebsd.S which lacks > .note.GNU-stack section. As result, libffi shared library and any code > that links with libffi statically ends up with executable stack. > > Patch below fixes the issue. Please apply. ping. > commit 2b8152f633c6debae0b6076b0c39eb326ceb09e2 > Author: Konstantin Belousov > Date: Sun Jul 29 04:06:39 2012 +0300 > > On FreeBSD, mark the assembler source as not requiring executable stack. > > diff --git a/src/x86/freebsd.S b/src/x86/freebsd.S > index afde513..ee6fc45 100644 > --- a/src/x86/freebsd.S > +++ b/src/x86/freebsd.S > @@ -456,3 +456,4 @@ ffi_closure_raw_SYSV: > #endif > > #endif /* ifndef __x86_64__ */ > + .section .note.GNU-stack,"",%progbits > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.