Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 346610 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]
Patch that use /proc for pax check
libffi-3.0.13-emutramp_pax_log.patch (text/plain), 1.52 KB, created by
Magnus Granberg
on 2013-04-25 22:51:12 UTC
(
hide
)
Description:
Patch that use /proc for pax check
Filename:
MIME Type:
Creator:
Magnus Granberg
Created:
2013-04-25 22:51:12 UTC
Size:
1.52 KB
patch
obsolete
>--- a/src/closures.c 2013-03-17 23:27:11.000000000 +0100 >+++ b/src/closures.c 2013-04-19 22:16:53.030220812 +0200 >@@ -175,16 +175,40 @@ 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> >+#define LINE_BUFFER 1024 > > static int emutramp_enabled = -1; > > static int > emutramp_enabled_check (void) > { >- if (getenv ("FFI_DISABLE_EMUTRAMP") == NULL) >- return 1; >- else >+ if (getenv ("FFI_DISABLE_EMUTRAMP") != NULL) > return 0; >+ FILE *f; >+ char first[LINE_BUFFER], second[LINE_BUFFER]; >+ char conf_line[LINE_BUFFER]; >+ f = fopen("/proc/self/status", "r"); >+ if (f == NULL) >+ { >+ /* We can't read the needed info from /proc */ >+ /* So log it and make may day. */ >+ syslog (LOG_INFO, "Can't read /proc/self/status"); >+ return 0; >+ } >+ while (fgets (conf_line, LINE_BUFFER, f) ) >+ { >+ sscanf (conf_line, "%s %s", first, second ); >+ if( !strcmp (first, "PaX:" ) ) >+ { >+ if( second[1] != 'E' ) >+ syslog (LOG_INFO, "Emutramp in not enable."); >+ fclose (f); >+ return 1; >+ } >+ } >+ fclose (f); >+ return 0; > } > > #define is_emutramp_enabled() (emutramp_enabled >= 0 ? emutramp_enabled \ >@@ -197,6 +221,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