This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: glibc 2.24 -- Release blockers


On 07/15/2016 02:45 AM, Paul Eggert wrote:
On 07/14/2016 01:27 PM, Florian Weimer wrote:
GDB does this to disable randomization:

Thanks. Emacs disables ASLR by invoking the 'setfattr -n user.pax.flags
-v er' shell command on the Emacs executable before running it ('paxctl
+a' on older systems). Does this approach not work on ppc64? If not,
what shell command would work?

I have never seen these commands before. On mainline Linux, you need to use setarch (perhaps from a shell script wrapper), and this calls personality internally.

Sinny wrapped the build with setarch on ppc64, and it worked.

As a fallback, Emacs calls personality (PER_LINUX32 | ADDR_NO_RANDOMIZE)
early on. Perhaps the PER_LINUX32 persona does not work on ppc64? If so,
please try the attached patch against the emacs-25 branch, on ppc64 and
ppc64le; this causes Emacs to simply turn on the ADDR_NO_RANDOMIZE flag
instead. If this doesn't work, perhaps we need to migrate this
personality-flag-setting into alloc.c's malloc_initialize_hook function,
so that it operates before 'main' starts up.

The problem is that this happens at dump time only, while the issue occurs when running the dumped Emacs. Furthermore, the personality system call (or at least ADDR_NO_RANDOMIZE) only applies to new process images, it does not affected the randomization decisions made at load time for the current process.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]