From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 7A3B63858022; Tue, 23 Jan 2024 13:23:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A3B63858022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706016233; bh=rYJUh8H5Qv56vSUcYKUVQkq/5c1OLXO37QWosBtDxEg=; h=From:To:Subject:Date:From; b=LRfx5CSdx6/l+v/TRCgBmYQvdZJ2G36OCM7OYQ1DnEeqlin3R6Pgsl6Vm/lB21PgL IE8G5fk1hwkCbW0aUrcZpOXG/+z1X4ROwXNtXvEM69TBuG8oKwI574amJ4w31xPG19 KZgGSbQd26HR9AKL9XPTURgVwgNmTwpPo92dcyR0= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] string: Disable stack protector for memset in early static initialization X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: dfa3394a605c8f6f25e4f827789bc89eca1d206c X-Git-Newrev: 77c6a2717de1b6a78e79538b2074579ed77839ed Message-Id: <20240123132353.7A3B63858022@sourceware.org> Date: Tue, 23 Jan 2024 13:23:53 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=77c6a2717de1b6a78e79538b2074579ed77839ed commit 77c6a2717de1b6a78e79538b2074579ed77839ed Author: Adhemerval Zanella Date: Mon Jan 22 10:42:19 2024 -0300 string: Disable stack protector for memset in early static initialization For ports that use the default memset, the compiler might generate early calls before the stack protector is initialized (for instance, riscv with -fstack-protector-all on _dl_aux_init). Checked on riscv64-linux-gnu-rv64imafdc-lp64d. Reviewed-by: Florian Weimer Diff: --- string/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/string/Makefile b/string/Makefile index 3ba77e1b2f..8f31fa49e6 100644 --- a/string/Makefile +++ b/string/Makefile @@ -270,6 +270,7 @@ CFLAGS-memcpy.c += $(no-stack-protector) CFLAGS-wordcopy.c += $(no-stack-protector) # Called during static initialization CFLAGS-strncmp.c += $(no-stack-protector) +CFLAGS-memset.c += $(no-stack-protector) CFLAGS-argz-next.c += $(config-cflags-wno-ignored-attributes) CFLAGS-basename.c += $(config-cflags-wno-ignored-attributes)