From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21575 invoked by alias); 2 Jan 2020 12:07:59 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 21453 invoked by uid 89); 2 Jan 2020 12:07:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: cadetblue.birch.relay.mailchannels.net X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Wide-Eyed-Cold: 66d5199045a401c3_1577966875238_992648413 X-MC-Loop-Signature: 1577966875238:3380384511 X-MC-Ingress-Time: 1577966875237 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gotplt.org; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=gotplt.org; bh=cKcT0U 387+8c1fpBDcmTT88Gk5c=; b=bx3uHGC6K7lnTQR2ZemVpzLrayc1K/zk0EJPBy EfD0BxqAwjLztiNvAVpRHTudqrirFUpjmpgFGAzdvut/1NejAMD71a9FlDp1kc2f tC/7iQlRiXHNJX2E4Ho2Qxi52Vfx9h5QsCPyGe+7cio8klo8FdqpslawK+66YRQI tWrg8= Subject: Re: [PATCH v3 08/16] elf: Enable relro for static build To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20191217214728.2886-1-adhemerval.zanella@linaro.org> <20191217214728.2886-8-adhemerval.zanella@linaro.org> X-DH-BACKEND: pdx1-sub0-mail-a59 From: Siddhesh Poyarekar Message-ID: Date: Thu, 02 Jan 2020 12:08:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20191217214728.2886-8-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrvdeguddgfeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomhepufhiugguhhgvshhhucfrohihrghrvghkrghruceoshhiugguhhgvshhhsehgohhtphhlthdrohhrgheqnecuffhomhgrihhnpehrvghlrdhrohdpshhouhhrtggvfigrrhgvrdhorhhgnecukfhppeduvdefrddvhedvrddvtddvrddujedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopegludelvddrudeikedruddrleejngdpihhnvghtpeduvdefrddvhedvrddvtddvrddujedvpdhrvghtuhhrnhdqphgrthhhpefuihguughhvghshhcurfhohigrrhgvkhgrrhcuoehsihguughhvghshhesghhothhplhhtrdhorhhgqedpmhgrihhlfhhrohhmpehsihguughhvghshhesghhothhplhhtrdhorhhgpdhnrhgtphhtthhopegrughhvghmvghrvhgrlhdriigrnhgvlhhlrgeslhhinhgrrhhordhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-SW-Source: 2020-01/txt/msg00016.txt.bz2 On 18/12/19 3:17 am, Adhemerval Zanella wrote: > Changes from previous version: > > - The tests were removed and instead I will use the ones proposed > by Florian's patch 'elf: Add tests for working RELRO protection' > [1]. I also plan to send additional coverage for '.data.rel.ro' > which trigger failures for the static case on both partial and > full relro which is fixed by this patch once the patch is > upstream. > > -- > > The code is similar to the one at elf/dl-reloc.c, where it checks for > the l_relro_size from the link_map (obtained from PT_GNU_RELRO header > from program headers) and calls_dl_protected_relro. > > Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, > aarch64-linux-gnu, s390x-linux-gnu, and sparc64-linux-gnu. I also > check with --enable-static pie on x86_64-linux-gnu, i686-linux-gnu, > and aarch64-linux-gnu which seems the only architectures where > static PIE is actually working (as per 9d7a3741c9e, on > arm-linux-gnueabihf, powerpc64{le}-linux-gnu, and s390x-linux-gnu > I am seeing runtime issues not related to my patch). > > [1] https://sourceware.org/ml/libc-alpha/2019-10/msg00059.html > --- > elf/dl-support.c | 18 ++++++++++++++---- > 1 file changed, 14 insertions(+), 4 deletions(-) > OK. Reviewed-by: Siddhesh Poyarekar