From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117591 invoked by alias); 14 Jun 2017 18:38:29 -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 117576 invoked by uid 89); 14 Jun 2017 18:38:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-7.6 required=5.0 tests=BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f182.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YQnxb1iw8PK8Yam8IpLbt8AJVZ2zZOnJQK7sEFvjmu8=; b=NIlpHtkZfWinA4vmgqBQ1kuSkO1whFBoxfQeZMhYr8X6Y8KaSFKe9vMdANVPw/shHq rMehJW/Xl+Rg3YWtsO0wTnViBnG63k+pY9onNck6hmLdEJmv2PdCqZ8KstZnjWnDGIKx aFsGtwFMN2jjPbTLAOslh76yMtSCzH/3GiJ+6LUNC0RBr7K5eNkKGc5Kzg0pMKN2cCPl H3OCZCisYLxBp7jh3hZKiQ4+jrqdaNCqtVhUlbcMeweLtwDZ+QxVt7Foa42TrwQJf6iD qSS+r0IevRQ4t6MHCL8hmiTdqRxsSyzyzFNFxAeMmSQLaJlpWArk1OlAEA8cUkyyzMyI v9Vw== X-Gm-Message-State: AKS2vOzC9wMf2pt4oVzryIgoyS5Syn5Jq7NJuRq7U3wObVZJjoCFaPKb 0n3E2OtkDPTeBfQcARljqw== X-Received: by 10.237.53.205 with SMTP id d13mr1799324qte.46.1497465507069; Wed, 14 Jun 2017 11:38:27 -0700 (PDT) Subject: Re: [PATCH] x86-64: Implement memmove family IFUNC selectors in C To: libc-alpha@sourceware.org References: <20170612160930.GA25262@gmail.com> From: Adhemerval Zanella Message-ID: <2866dd6e-9cfd-6991-0fb2-a57e97e6a9ba@linaro.org> Date: Wed, 14 Jun 2017 18:38:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170612160930.GA25262@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-06/txt/msg00635.txt.bz2 On 12/06/2017 13:09, H.J. Lu wrote: > Implement memmove family IFUNC selectors in C. > > All internal calls within libc.so can use IFUNC on x86-64 since unlike > x86, x86-64 supports PC-relative addressing to access the GOT entry so > that it can call via PLT without using an extra register. For libc.a, > we can't use IFUNC for functions which are called before IFUNC has been > initialized. Use IFUNC internally reduces the icache footprint since > libc.so and other codes in the process use the same implementations. > This patch uses IFUNC for memmove family functions within libc. > > Any comments?> > H.J. > --- > 2017-06-07 H.J. Lu > Erich Elsen > Adhemerval Zanella > > * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add > memmove-sse2-unaligned-erms, memcpy_chk-nonshared, > mempcpy_chk-nonshared and memmove_chk-nonshared. > * sysdeps/x86_64/multiarch/ifunc-impl-list.c > (__libc_ifunc_impl_list): Add tests for __memmove_chk_erms, > __memcpy_chk_erms and __mempcpy_chk_erms. Update comments. > * sysdeps/x86_64/multiarch/ifunc-memmove.h: New file. > * sysdeps/x86_64/multiarch/memcpy.c: Likewise. > * sysdeps/x86_64/multiarch/memcpy_chk-nonshared.S: Likewise. > * sysdeps/x86_64/multiarch/memcpy_chk.c: Likewise. > * sysdeps/x86_64/multiarch/memmove-sse2-unaligned-erms.S: Likewise. > * sysdeps/x86_64/multiarch/memmove.c: Likewise. > * sysdeps/x86_64/multiarch/memmove_chk-nonshared.S: Likewise. > * sysdeps/x86_64/multiarch/memmove_chk.c: Likewise. > * sysdeps/x86_64/multiarch/mempcpy.c: Likewise. > * sysdeps/x86_64/multiarch/mempcpy_chk-nonshared.S: Likewise. > * sysdeps/x86_64/multiarch/mempcpy_chk.c: Likewise. > * sysdeps/x86_64/multiarch/memcpy.S: Removed. > * sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise. > * sysdeps/x86_64/multiarch/memmove.S: Likewise. > * sysdeps/x86_64/multiarch/memmove_chk.S: Likewise. > * sysdeps/x86_64/multiarch/mempcpy.S: Likewise. > * sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise. > * sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S > (__mempcpy_chk_erms): New function. > (__memmove_chk_erms): Likewise. > (__memcpy_chk_erms): New alias. LGTM, thanks.