From: Pedro Alves <pedro@palves.net>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Don't run personality syscall at configure time; don't check it at all
Date: Wed, 12 May 2021 20:56:30 +0100 [thread overview]
Message-ID: <317fecaf-8a74-605f-410b-7625ca1429b4@palves.net> (raw)
In-Reply-To: <87r1ib6c9s.fsf@tromey.com>
On 2021-05-12 7:24 p.m., Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <pedro@palves.net> writes:
>
> Pedro> "man 2 personality" says:
>
> Pedro> This system call first appeared in Linux 1.1.20 (and thus first
> Pedro> in a stable kernel release with Linux 1.2.0); library support
> Pedro> was added in glibc 2.3.
>
> Pedro> ...
>
> Pedro> ADDR_NO_RANDOMIZE (since Linux 2.6.12)
> Pedro> With this flag set, disable address-space-layout randomization.
>
> Pedro> glibc 2.3 was released in 2002.
> Pedro> Linux 2.6.12 was released in 2005.
>
> It turns out that this caused the build to fail on RH ES5.
Wow, talk about ancient. Sorry about the breakage. That's no longer maintained by RH,
so I don't think we/RH really care about it. But if you have to support it, fine with
me to keep GDB building there, especially as it doesn't block anything or is complicated.
>
> Address space randomization works fine there, and 'personality' exists
> -- but ADDR_NO_RANDOMIZE is only defined in <linux/personality.h>, not
> <sys/personality.h>.
>
> I have a patch to work around this by restoring this check:
>
> Pedro> - AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>])
>
> ... and the corresponding define in nat/linux-personality.c.
>
> (I tried just including the linux/ header but it doesn't declare
> 'personality'.)
Would it work to just include both?
Otherwise, do we really need the configure check? Wouldn't just:
#ifndef ADDR_NO_RANDOMIZE
# define ADDR_NO_RANDOMIZE 0x0040000
#endif
work the same?
>
> I don't know if anybody else cares about this old system. If so, let me
> know and I can send the patch. Otherwise I may not bother.
Up to you.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2021-05-12 19:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 22:43 Pedro Alves
2021-05-07 14:13 ` Tom Tromey
2021-05-07 17:42 ` Lancelot SIX via Gdb-patches
2021-05-08 12:11 ` [pushed] Don't include sys/personality.h in linux-low.cc anymore Pedro Alves
2021-05-12 18:24 ` [PATCH] Don't run personality syscall at configure time; don't check it at all Tom Tromey
2021-05-12 19:56 ` Pedro Alves [this message]
2021-05-12 19:58 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=317fecaf-8a74-605f-410b-7625ca1429b4@palves.net \
--to=pedro@palves.net \
--cc=gdb-patches@sourceware.org \
--cc=tromey@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox