From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1805 invoked by alias); 3 Dec 2019 20:37:30 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 1790 invoked by uid 89); 3 Dec 2019 20:37:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-18.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-Spam-Status: No, score=-18.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (205.139.110.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Dec 2019 20:37:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575405443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KtY51c+KxZ1P8RbRsOsJYMQceVtJ6gUmkczHmNr4OKk=; b=PphTJW/7/vDIBSdrlrVjPVlHnb+931ffsXGqc+FoRTxMOcW9FzgyMPipCBVjhCP3zS9B12 KGbQQ1uehdzCAvAc0qumsWzEYHr02JJjd7zTdeUw3LzbEOHR8T6XATJHi0VV5yrSyqyIVn N2VpZmp2fJWAvv2Sv9tUABlI/bTHHVk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-zF_cdNrZNlS59gxlgCktVw-1; Tue, 03 Dec 2019 15:37:22 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2A732DBE7 for ; Tue, 3 Dec 2019 20:37:21 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-116-113.ams2.redhat.com [10.36.116.113]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA78B5C240 for ; Tue, 3 Dec 2019 20:37:20 +0000 (UTC) Received: by oldenburg2.str.redhat.com (Postfix, from userid 1000) id B7619824DD4F; Tue, 3 Dec 2019 21:37:18 +0100 (CET) Date: Tue, 01 Jan 2019 00:00:00 -0000 To: libc-stable@sourceware.org Subject: [2.28 COMMITTED] x86: Assume --enable-cet if GCC defaults to CET [BZ #25225] User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20191203203718.B7619824DD4F@oldenburg2.str.redhat.com> From: Florian Weimer X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: zF_cdNrZNlS59gxlgCktVw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00002.txt.bz2 This links in CET support if GCC defaults to CET. Otherwise, __CET__ is defined, yet CET functionality is not compiled and linked into the dynamic loader, resulting in a linker failure due to undefined references to _dl_cet_check and _dl_open_check. (cherry picked from commit 9fb8139079ef0bb1aa33a4ae418cbb113b9b9da7) diff --git a/NEWS b/NEWS index 74efb0e6e8..d488f14ae5 100644 --- a/NEWS +++ b/NEWS @@ -71,6 +71,7 @@ The following bugs are resolved with this release: [24744] io: Remove the copy_file_range emulation. [25203] libio: Disable vtable validation for pre-2.1 interposed handles [25204] Ignore LD_PREFER_MAP_32BIT_EXEC for SUID programs + [25225] ld.so fails to link on x86 if GCC defaults to -fcf-protection Security related changes: diff --git a/configure b/configure index fde57d63fe..c02753c0fe 100755 --- a/configure +++ b/configure @@ -3762,11 +3762,32 @@ else fi +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __CET__ +#error no CET compiler support +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + libc_cv_compiler_default_cet=yes +else + libc_cv_compiler_default_cet=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Check whether --enable-cet was given. if test "${enable_cet+set}" = set; then : enableval=$enable_cet; enable_cet=$enableval else - enable_cet=no + enable_cet=$libc_cv_compiler_default_cet fi diff --git a/configure.ac b/configure.ac index 014e09a5d5..139554b94a 100644 --- a/configure.ac +++ b/configure.ac @@ -464,11 +464,18 @@ AC_ARG_ENABLE([mathvec], [build_mathvec=$enableval], [build_mathvec=notset]) +AC_TRY_COMPILE([], [ +#ifndef __CET__ +# error no CET compiler support +#endif], + [libc_cv_compiler_default_cet=yes], + [libc_cv_compiler_default_cet=no]) + AC_ARG_ENABLE([cet], AC_HELP_STRING([--enable-cet], [enable Intel Control-flow Enforcement Technology (CET), x86 only]), [enable_cet=$enableval], - [enable_cet=no]) + [enable_cet=$libc_cv_compiler_default_cet]) # We keep the original values in `$config_*' and never modify them, so we # can write them unchanged into config.make. Everything else uses