From patchwork Mon Jul 16 22:59:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 944620 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-94351-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="E5vkG/OY"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41TzQf0djjz9s0w for ; Tue, 17 Jul 2018 09:00:25 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :mime-version:content-type; q=dns; s=default; b=xgMt4fFXCK1S46ez yExyGNr8Umu2NmPoq8hWeQATmpjIbLdNC2Aar9zp5DXXOTZX1Ubzghk+1Uou+iqQ cIYmMCrtya32F5qVn/unHywgtyGUNbGeJPgMtA7npqUZwfrO4Td7AgaK7qkua1La lW7H6fUi5Chbj25LiQmS9Fh3USI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :mime-version:content-type; s=default; bh=yPrfWvLdcLQ150glrUvkPR /59Lo=; b=E5vkG/OYgGEAunjoL8ENLVZd3M9boTQjU3HyB6PVXfrjnJ/efjQKM8 xdct79yCSte8dd9mCIqjm053IsC6UUS0C+c3mKdhYjcbOEnBrBng3dOR6izHw8vl NdsOQbWtKjJ8cro5m3zX86jOA5fPEjpkxaGfh+vPqBpvtPdvjtP8s= Received: (qmail 121640 invoked by alias); 16 Jul 2018 23:00:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 121419 invoked by uid 89); 16 Jul 2018 23:00:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM autolearn=ham version=3.3.2 spammy= X-HELO: mga17.intel.com Date: Mon, 16 Jul 2018 15:59:54 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] x86: Always include /cet-tunables.h> for --enable-cet Message-ID: <20180716225954.GA28377@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.0 (2018-05-17) Always include and cet-tunables.h> when CET is enabled. Otherwise, configure glibc with --enable-cet --disable-tunables will fail to build. OK for master? H.J. --- * sysdeps/x86/cpu-features.c: Always include and cet-tunables.h> when CET is enabled. --- sysdeps/x86/cpu-features.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index 0627f145e0..8108256c42 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -30,8 +30,6 @@ extern void TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *) attribute_hidden; # if CET_ENABLED -# include -# include extern void TUNABLE_CALLBACK (set_x86_ibt) (tunable_val_t *) attribute_hidden; extern void TUNABLE_CALLBACK (set_x86_shstk) (tunable_val_t *) @@ -39,6 +37,11 @@ extern void TUNABLE_CALLBACK (set_x86_shstk) (tunable_val_t *) # endif #endif +#if CET_ENABLED +# include +# include +#endif + static void get_common_indeces (struct cpu_features *cpu_features, unsigned int *family, unsigned int *model,