From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16322 invoked by alias); 27 Mar 2014 12:40:39 -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 16235 invoked by uid 89); 27 Mar 2014 12:40:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 27 Mar 2014 12:40:36 +0000 Received: from [10.181.179.176] (85-76-66-170-nat.elisa-mobile.fi [85.76.66.170]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: ssuominen) by smtp.gentoo.org (Postfix) with ESMTPSA id A1D6D33FD62; Thu, 27 Mar 2014 12:40:33 +0000 (UTC) Message-ID: <53341B11.6080805@gentoo.org> Date: Thu, 27 Mar 2014 12:40:00 -0000 From: Samuli Suominen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: libffi-discuss@sourceware.org, hardened@gentoo.org, zorry@gentoo.org Subject: Re: libffi 3.1-rc1 needs testing! References: <87eh2liiow.fsf@moxielogic.com> <87a9ce3ry7.fsf@moxielogic.com> In-Reply-To: <87a9ce3ry7.fsf@moxielogic.com> Content-Type: multipart/mixed; boundary="------------060402000800050809050303" X-IsSubscribed: yes X-SW-Source: 2014/txt/msg00039.txt.bz2 This is a multi-part message in MIME format. --------------060402000800050809050303 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 248 On 25/03/14 23:10, Anthony Green wrote: > It's here: ftp://sourceware.org/pub/libffi/libffi-3.1-rc1.tar.gz > > This patch is missing from the 3.1-rc1 release: https://sourceware.org/ml/libffi-discuss/2013/msg00130.html I'll attach it here too. --------------060402000800050809050303 Content-Type: text/x-patch; name="libffi-3.0.13-emutramp_pax_proc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libffi-3.0.13-emutramp_pax_proc.patch" Content-length: 911 2013-05-22 Magnus Granberg #457194 * src/closuer.c (emutramp_enabled_check): Check with /proc. --- a/src/closures.c 2013-03-17 23:27:11.000000000 +0100 +++ b/src/closures.c 2013-04-29 23:26:02.279022022 +0200 @@ -181,10 +181,26 @@ static int emutramp_enabled = -1; static int emutramp_enabled_check (void) { - if (getenv ("FFI_DISABLE_EMUTRAMP") == NULL) - return 1; - else + char *buf = NULL; + size_t len = 0; + FILE *f; + int ret; + f = fopen ("/proc/self/status", "r"); + if (f == NULL) return 0; + ret = 0; + + while (getline (&buf, &len, f) != -1) + if (!strncmp (buf, "PaX:", 4)) + { + char emutramp; + if (sscanf (buf, "%*s %*c%c", &emutramp) == 1) + ret = (emutramp == 'E'); + break; + } + free (buf); + fclose (f); + return ret; } #define is_emutramp_enabled() (emutramp_enabled >= 0 ? emutramp_enabled \ --------------060402000800050809050303--