From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iPQ1JQsznGD/ZAAAWB0awg (envelope-from ) for ; Wed, 12 May 2021 15:56:59 -0400 Received: by simark.ca (Postfix, from userid 112) id 965461F11C; Wed, 12 May 2021 15:56:59 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=MAILING_LIST_MULTI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B2AD01E01F for ; Wed, 12 May 2021 15:56:58 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5D56F3853821; Wed, 12 May 2021 19:56:58 +0000 (GMT) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by sourceware.org (Postfix) with ESMTPS id 17BAE3857C75 for ; Wed, 12 May 2021 19:56:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 17BAE3857C75 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wm1-f46.google.com with SMTP id p14-20020a05600c358eb029015c01f207d7so3612733wmq.5 for ; Wed, 12 May 2021 12:56:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=j954zkfSRY62UaffYnQdigxM/gxuYExN7pf1u52g58E=; b=ZERAcFnY1zOL2+HLoZBrIEdcSWWk63w7tTyI8WpdmjiTvdumiZAbKFWuAIh+/iReQL UHWQmZ20OhI1jcT4btBytmjWiJnoqjfiFwGmlTm8fiT6XLJYaN3W63VtM7JIVJs+3T4n jje989uhrYHPAErax7BKkaJ1ZH5xfuJPT6Gg5vEIcDdcx8jZ8mZyOQ3IZffx/YrgFcut SBvw1o+lN/nFgpyhVFpMaf4wD5T9+6R5+47Y0hhT37ROJj0xsxao0YExcjolXiHw4f9K CPiaOK9tcvmTX1pjr5nAEvrvSseDYx6Ov1lDMYG75xMUjiJwXnWYbAtqfk45xY+vEofI ObDQ== X-Gm-Message-State: AOAM532UHOQE3TYDySfvuJyK3nuEJHh0JOLndcqvzeZC1Z8ZLQk4pp7v VvH+LC4cBAdiC+Iwwuh3RFyXORXBpUwhAw== X-Google-Smtp-Source: ABdhPJzKWRL9sqKS8e9TJ8ZVrlXGj8Ze0+llZ0nB//mCUeiP0ifsVRxT6w5SDFm4utQC4pegmRjxNA== X-Received: by 2002:a05:600c:4242:: with SMTP id r2mr160313wmm.140.1620849413373; Wed, 12 May 2021 12:56:53 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:6b6e:c7b6:c5a7:aac3? ([2001:8a0:f932:6a00:6b6e:c7b6:c5a7:aac3]) by smtp.gmail.com with ESMTPSA id y5sm639294wrm.61.2021.05.12.12.56.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 May 2021 12:56:52 -0700 (PDT) Subject: Re: [PATCH] Don't run personality syscall at configure time; don't check it at all From: Pedro Alves To: Tom Tromey References: <20210506224341.398202-1-pedro@palves.net> <87r1ib6c9s.fsf@tromey.com> Message-ID: <317fecaf-8a74-605f-410b-7625ca1429b4@palves.net> Date: Wed, 12 May 2021 20:56:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <87r1ib6c9s.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2021-05-12 7:24 p.m., Tom Tromey wrote: >>>>>> "Pedro" == Pedro Alves 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 , not > . > > I have a patch to work around this by restoring this check: > > Pedro> - AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include ]) > > ... 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