public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Andreas K. Huettel" <dilfridge@gentoo.org>
To: libc-alpha@sourceware.org
Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: Re: [PATCH 1/2] x86_64: Fix build with --disable-multiarch (BZ 30721)
Date: Tue, 08 Aug 2023 18:00:12 +0200	[thread overview]
Message-ID: <113203001.nniJfEyVGO@pinacolada> (raw)
In-Reply-To: <20230808122755.66307-2-adhemerval.zanella@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 2170 bytes --]

Am Dienstag, 8. August 2023, 14:27:54 CEST schrieb Adhemerval Zanella via Libc-alpha:
> With multiarch disabled, the default memmove implementation provides
> the fortify routines for memcpy, mempcpy, and memmove.  However, it
> does not provide the internal hidden definitions used when building
> with fortify enabled.  The memset has a similar issue.
> 
> Checked on x86_64-linux-gnu building with different options:
> default and --disable-multi-arch plus default, --disable-default-pie,
> --enable-fortify-source={2,3}, and --enable-fortify-source={2,3}
> with --disable-default-pie.

Tested-by: Andreas K. Huettel <dilfridge@gentoo.org>

(both on master and 2.38, thanks!!!) 

> ---
>  sysdeps/x86_64/memcpy.S  | 2 +-
>  sysdeps/x86_64/memmove.S | 3 +++
>  sysdeps/x86_64/memset.S  | 1 +
>  3 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/sysdeps/x86_64/memcpy.S b/sysdeps/x86_64/memcpy.S
> index d98500a78a..4922cba657 100644
> --- a/sysdeps/x86_64/memcpy.S
> +++ b/sysdeps/x86_64/memcpy.S
> @@ -1 +1 @@
> -/* Implemented in memcpy.S.  */
> +/* Implemented in memmove.S.  */
> diff --git a/sysdeps/x86_64/memmove.S b/sysdeps/x86_64/memmove.S
> index f0b84e3b52..c3c08165e1 100644
> --- a/sysdeps/x86_64/memmove.S
> +++ b/sysdeps/x86_64/memmove.S
> @@ -46,6 +46,9 @@ weak_alias (__mempcpy, mempcpy)
>  
>  #ifndef USE_MULTIARCH
>  libc_hidden_builtin_def (memmove)
> +libc_hidden_builtin_def (__memmove_chk)
> +libc_hidden_builtin_def (__memcpy_chk)
> +libc_hidden_builtin_def (__mempcpy_chk)
>  # if defined SHARED && IS_IN (libc)
>  strong_alias (memmove, __memcpy)
>  libc_hidden_ver (memmove, memcpy)
> diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S
> index 7c99df36db..c6df24e8de 100644
> --- a/sysdeps/x86_64/memset.S
> +++ b/sysdeps/x86_64/memset.S
> @@ -32,6 +32,7 @@
>  #include "isa-default-impl.h"
>  
>  libc_hidden_builtin_def (memset)
> +libc_hidden_builtin_def (__memset_chk)
>  
>  #if IS_IN (libc)
>  libc_hidden_def (__wmemset)
> 


-- 
Andreas K. Hüttel
dilfridge@gentoo.org
Gentoo Linux developer
(council, toolchain, base-system, perl, libreoffice)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 981 bytes --]

  reply	other threads:[~2023-08-08 16:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 12:27 [PATCH 0/2] More x86 build fixes Adhemerval Zanella
2023-08-08 12:27 ` [PATCH 1/2] x86_64: Fix build with --disable-multiarch (BZ 30721) Adhemerval Zanella
2023-08-08 16:00   ` Andreas K. Huettel [this message]
2023-08-08 21:16   ` Siddhesh Poyarekar
2023-08-08 12:27 ` [PATCH 2/2] i686: Fix build with --disable-multiarch Adhemerval Zanella
2023-08-08 21:59   ` Siddhesh Poyarekar

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=113203001.nniJfEyVGO@pinacolada \
    --to=dilfridge@gentoo.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).