Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 346850 Details for
Bug 457194
dev-libs/libffi-3.0.12 - test killed by PaX
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
use /proc for pax mark check
libffi-3.0.13-emutramp_pax_log.patch (text/plain), 1.41 KB, created by
Magnus Granberg
on 2013-04-29 01:01:20 UTC
(
hide
)
Description:
use /proc for pax mark check
Filename:
MIME Type:
Creator:
Magnus Granberg
Created:
2013-04-29 01:01:20 UTC
Size:
1.41 KB
patch
obsolete
>--- a/src/closures.c 2013-03-17 23:27:11.000000000 +0100 >+++ b/src/closures.c 2013-04-29 02:51:01.820465762 +0200 >@@ -175,16 +175,39 @@ selinux_enabled_check (void) > /* On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC. */ > #ifdef FFI_MMAP_EXEC_EMUTRAMP_PAX > #include <stdlib.h> >+#include <syslog.h> > > static int emutramp_enabled = -1; > > static int > emutramp_enabled_check (void) > { >- if (getenv ("FFI_DISABLE_EMUTRAMP") == NULL) >- return 1; >- else >- return 0; >+ char *buf = NULL; >+ size_t len = 0; >+ FILE *f; >+ int ret; >+ f = fopen ("/proc/self/status", "r"); >+ if (f == NULL) >+ { >+ /* We can't read the needed info from /proc */ >+ syslog (LOG_INFO, "Can't read /proc/self/status"); >+ 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'); >+ if (ret == 0) >+ syslog (LOG_INFO, "Emutramp in not enable."); >+ break; >+ } >+ free (buf); >+ fclose (f); >+ return ret; > } > > #define is_emutramp_enabled() (emutramp_enabled >= 0 ? emutramp_enabled \ >@@ -197,6 +220,7 @@ emutramp_enabled_check (void) > > /* Cygwin is Linux-like, but not quite that Linux-like. */ > #define is_selinux_enabled() 0 >+#define is_emutramp_enabled() 0 > > #endif /* !defined(X86_WIN32) && !defined(X86_WIN64) */ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 457194
:
338826
|
338828
|
338946
|
343064
|
344008
|
346610
|
346832
| 346850