From patchwork Sat Jul 14 09:30:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Srivatsa S. Bhat" X-Patchwork-Id: 141952 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp380034ljj; Sat, 14 Jul 2018 02:30:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcHLrRBBY891YaprMwEXj9wcOOFOSkaG6dF/l7nsbCobMMEpLgunDa/X5Aif8XSAg2jwV41 X-Received: by 2002:a17:902:7798:: with SMTP id o24-v6mr9721835pll.165.1531560644664; Sat, 14 Jul 2018 02:30:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531560644; cv=none; d=google.com; s=arc-20160816; b=UVEWoL1xhK94IPYlf8TjY5OqHVb95YVGWjNenY/STUxG1xb2N+VzQd2ZUDV7C48GJ8 44M8kMB/jlXu8WZi2JmMRXljz3kf97j0VCYL6SqyL7Bt9zd5zlduPyOcvj/w2T9JbSes BjA9bd3jQyAIBJ18uYzvhZq1Qdgn6c+6qhyETH0T80qIbgMn+geOJnCkygbRYCjC+mxd CZ8xWsPCjqL7c0dJIxjYi15BjkgK0ojXu26k6wHdzITwvvJur3vNnHBYtjbFStTgOqV9 l9PJjTDad2YRt6cAAsYVllF/jXPB1I7oYAsFkC1SyA7lNkbpEw0ph4zTw3Hw/Kxwmw5J I/Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:arc-authentication-results; bh=+F+zIkPvjVoZWO0R+/sa3vKk+VLvVCkW5r5EQ4wgnc8=; b=orc0BDjOpoAAy5EjdQSzJYBKQ/R3tGXaO8LaD7rSgn0X90InkvekQlVepHbCW4Nts3 UBu9W8iCY+cojNfqlnqvc+ufdwy5nGv3odBDNGxcGQAM+WKGo0JwX/353mrah0hBz5aJ IdywMptiY3Y3S2NKoMTUzj4MweQddYu88koq6mql3xH+/a0zG/f/yVuGGe8/tQpFChhe dACSOX018JmD9c3KqZL+e1m2MuZ63ot/d+SybFktjs+2xdbN5cEM4yNT1L8LLZRmcUHR WzwTcjjYy5tNYGdix5Q+p3n9I+2xTZMViI6F2btfr/GTCkZiECOeNcwyxdSd5RjKxZHE rRnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=csail.mit.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b4-v6si15681349pgg.537.2018.07.14.02.30.44; Sat, 14 Jul 2018 02:30:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=csail.mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726129AbeGNJtL (ORCPT + 13 others); Sat, 14 Jul 2018 05:49:11 -0400 Received: from outgoing-stata.csail.mit.edu ([128.30.2.210]:32970 "EHLO outgoing-stata.csail.mit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726001AbeGNJtL (ORCPT ); Sat, 14 Jul 2018 05:49:11 -0400 Received: from c-71-231-194-96.hsd1.wa.comcast.net ([71.231.194.96] helo=[127.0.1.1]) by outgoing-stata.csail.mit.edu with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1feGsy-000ZH9-FL; Sat, 14 Jul 2018 05:30:40 -0400 Subject: [PATCH 4.4.y 032/101] x86/pti: Mark constant arrays as __initconst From: "Srivatsa S. Bhat" To: gregkh@linuxfoundation.org, stable@vger.kernel.org Cc: Arnd Bergmann , Thomas Gleixner , Ricardo Neri , Andy Lutomirski , Borislav Petkov , Thomas Garnier , David Woodhouse , David Woodhouse , "Matt Helsley \(VMware\)" , Alexey Makhalov , Bo Gan , matt.helsley@gmail.com, rostedt@goodmis.org, amakhalov@vmware.com, ganb@vmware.com, srivatsa@csail.mit.edu, srivatsab@vmware.com Date: Sat, 14 Jul 2018 02:30:37 -0700 Message-ID: <153156063749.10043.1099725675859826316.stgit@srivatsa-ubuntu> In-Reply-To: <153156030832.10043.13438231886571087086.stgit@srivatsa-ubuntu> References: <153156030832.10043.13438231886571087086.stgit@srivatsa-ubuntu> User-Agent: StGit/0.18 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann (cherry picked from commit 4bf5d56d429cbc96c23d809a08f63cd29e1a702e) I'm seeing build failures from the two newly introduced arrays that are marked 'const' and '__initdata', which are mutually exclusive: arch/x86/kernel/cpu/common.c:882:43: error: 'cpu_no_speculation' causes a section type conflict with 'e820_table_firmware_init' arch/x86/kernel/cpu/common.c:895:43: error: 'cpu_no_meltdown' causes a section type conflict with 'e820_table_firmware_init' The correct annotation is __initconst. Fixes: fec9434a12f3 ("x86/pti: Do not enable PTI on CPUs which are not vulnerable to Meltdown") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: Ricardo Neri Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Thomas Garnier Cc: David Woodhouse Link: https://lkml.kernel.org/r/20180202213959.611210-1-arnd@arndb.de Signed-off-by: David Woodhouse Signed-off-by: Greg Kroah-Hartman Signed-off-by: Srivatsa S. Bhat Reviewed-by: Matt Helsley (VMware) Reviewed-by: Alexey Makhalov Reviewed-by: Bo Gan --- arch/x86/kernel/cpu/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 72d7e5a..48499b4 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -817,7 +817,7 @@ static void identify_cpu_without_cpuid(struct cpuinfo_x86 *c) #endif } -static const __initdata struct x86_cpu_id cpu_no_speculation[] = { +static const __initconst struct x86_cpu_id cpu_no_speculation[] = { { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_CEDARVIEW, X86_FEATURE_ANY }, { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_CLOVERVIEW, X86_FEATURE_ANY }, { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_LINCROFT, X86_FEATURE_ANY }, @@ -830,7 +830,7 @@ static const __initdata struct x86_cpu_id cpu_no_speculation[] = { {} }; -static const __initdata struct x86_cpu_id cpu_no_meltdown[] = { +static const __initconst struct x86_cpu_id cpu_no_meltdown[] = { { X86_VENDOR_AMD }, {} };