From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1039) id A4A94385E02F; Wed, 20 Dec 2023 00:32:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4A94385E02F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1703032354; bh=Mix4OSDL4T8kCWp7FRUFgjunDk1HHP1Kv9DWG3s6uOw=; h=From:To:Subject:Date:From; b=H0WUOJg5E5y3ZONQdlcYtIUnMK2eKliinKJLTRII4Cssv4DhhaiwjWKe7C+c7bO3O 005FORA2FQTRU5aP7/yjUob16xZs4XSI8u/Un8MeKZLES/idwZzz2XDYRsJEryZ9qK Oxh6mDJQFeFWUzYJeU9eAePpdYIOxwtPWLmu+tWc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: H.J. Lu To: glibc-cvs@sourceware.org Subject: [glibc] Fix elf: Do not duplicate the GLIBC_TUNABLES string X-Act-Checkin: glibc X-Git-Author: H.J. Lu X-Git-Refname: refs/heads/master X-Git-Oldrev: 46432be2f1d4de962b51ca6b9f80fc37744be9f7 X-Git-Newrev: 50bef9bd63e7fb94f1d2cc8b7809256ffc73b2ef Message-Id: <20231220003234.A4A94385E02F@sourceware.org> Date: Wed, 20 Dec 2023 00:32:34 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=50bef9bd63e7fb94f1d2cc8b7809256ffc73b2ef commit 50bef9bd63e7fb94f1d2cc8b7809256ffc73b2ef Author: H.J. Lu Date: Tue Dec 19 16:01:33 2023 -0800 Fix elf: Do not duplicate the GLIBC_TUNABLES string commit 2a969b53c0b02fed7e43473a92f219d737fd217a Author: Adhemerval Zanella Date: Wed Dec 6 10:24:01 2023 -0300 elf: Do not duplicate the GLIBC_TUNABLES string has @@ -38,7 +39,7 @@ which isn't available. */ #define CHECK_GLIBC_IFUNC_PREFERRED_OFF(f, cpu_features, name, len) \ _Static_assert (sizeof (#name) - 1 == len, #name " != " #len); \ - if (memcmp (f, #name, len) == 0) \ + if (tunable_str_comma_strcmp_cte (&f, #name) == 0) \ { \ cpu_features->preferred[index_arch_##name] \ &= ~bit_arch_##name; \ @@ -46,12 +47,11 @@ Fix it by removing "== 0" after tunable_str_comma_strcmp_cte. Diff: --- sysdeps/x86/cpu-tunables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/x86/cpu-tunables.c b/sysdeps/x86/cpu-tunables.c index ef96148d30..142c6b9240 100644 --- a/sysdeps/x86/cpu-tunables.c +++ b/sysdeps/x86/cpu-tunables.c @@ -39,7 +39,7 @@ which isn't available. */ #define CHECK_GLIBC_IFUNC_PREFERRED_OFF(f, cpu_features, name, len) \ _Static_assert (sizeof (#name) - 1 == len, #name " != " #len); \ - if (tunable_str_comma_strcmp_cte (&f, #name) == 0) \ + if (tunable_str_comma_strcmp_cte (&f, #name)) \ { \ cpu_features->preferred[index_arch_##name] \ &= ~bit_arch_##name; \