Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3662739imm; Mon, 10 Sep 2018 23:21:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYNlvDWYUt5VZBCGjVZ9luQeDiTnFXwTtsummTautin/QU+ltnN1nVvjfLmy/EeHaITlOI0 X-Received: by 2002:a17:902:7586:: with SMTP id j6-v6mr25452842pll.295.1536646874469; Mon, 10 Sep 2018 23:21:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536646874; cv=none; d=google.com; s=arc-20160816; b=RwS8d6nK0eQPRMSV56UV74XJvChkgtMHqn21CWCrRoZkGjyX9n3cfdz2mAxHtLbfLv 4H646IxcEodfvvP/9CJ6XVcLYXgjmfDV/QM4+DpZf290lNJqRYy1lnduLxSpfy3ydqOK 9hrqxpu/lnu8un97yTKCR9Mu88X+OfGdsE3+TCA2rPWxqsdPqQuy2uanmwmpTxXgJ1Lj G5b0b83xeVhFY0DgZlc1yhbEp4UjxsjdVDkoNuit1LK++hHZFjUO7HtXhcTTW/hBZB3T dHQG7aNsWFEERyctv/c1VNi3YLwF6FRTQMTMOXdPYl12Kqtg3v9O2yhBX11Cy7l49Ut7 b/IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=5jFMQhW4hRROG6NP4NJNrU7n5NTrr2kS7lMYI3h3sLk=; b=MHGKXzhxTJdoXqDugL64M9OvfqQRWbxOS+kKk739BChJFEGuD71OyuA2Md2jYkE3ku 2ZN5x0MGkcuTYwch8W7RQfba+Qtskv6EyeIY3UIJ43tGrf4QagyqDStopWtVODpIppRf 46F5pw/5FDI+QiV33eoXVy21T5tkAbC8De83lL2fOvhXaczANXEzVcowcA8aeFewxTcX jHJUlVLplBdcVGAtEWt6+dPxj8Qp/HSFMy985v4J6NUu5s7bwHuk5k4FTBL8gMg/cOhf Zspkg6orfcbp12TkTiexDNmMQje8S8X3ehcUodV9I/YI5HxjAuiWLEQ4vO9XYz8eM9Do 9yoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si7160098pgl.308.2018.09.10.23.20.59; Mon, 10 Sep 2018 23:21:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727566AbeIKLSI (ORCPT + 99 others); Tue, 11 Sep 2018 07:18:08 -0400 Received: from terminus.zytor.com ([198.137.202.136]:34241 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726332AbeIKLSH (ORCPT ); Tue, 11 Sep 2018 07:18:07 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w8B6K5qI2135587 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 10 Sep 2018 23:20:05 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w8B6K5dr2135584; Mon, 10 Sep 2018 23:20:05 -0700 Date: Mon, 10 Sep 2018 23:20:05 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Zubin Mithra Message-ID: Cc: zsm@chromium.org, keescook@chromium.org, tglx@linutronix.de, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, mingo@kernel.org, peterz@infradead.org, hpa@zytor.com Reply-To: hpa@zytor.com, peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, zsm@chromium.org, keescook@chromium.org In-Reply-To: <20180810154314.96710-1-zsm@chromium.org> References: <20180810154314.96710-1-zsm@chromium.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf/x86: Add __ro_after_init annotations Git-Commit-ID: 2766d2ee960c52adc415931130dd6910158dd04d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 2766d2ee960c52adc415931130dd6910158dd04d Gitweb: https://git.kernel.org/tip/2766d2ee960c52adc415931130dd6910158dd04d Author: Zubin Mithra AuthorDate: Fri, 10 Aug 2018 08:43:14 -0700 Committer: Ingo Molnar CommitDate: Mon, 10 Sep 2018 14:55:36 +0200 perf/x86: Add __ro_after_init annotations x86_pmu_{format,events,attr,caps}_group is written to in init_hw_perf_events and not modified after. This makes them suitable candidates for annotating as __ro_after_init. Signed-off-by: Zubin Mithra Reviewed-by: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: alexander.shishkin@linux.intel.com Cc: groeck@chromium.org Link: http://lkml.kernel.org/r/20180810154314.96710-1-zsm@chromium.org Signed-off-by: Ingo Molnar --- arch/x86/events/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index dfb2f7c0d019..7a6fb9b2bec5 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c @@ -1584,7 +1584,7 @@ static void __init pmu_check_apic(void) } -static struct attribute_group x86_pmu_format_group = { +static struct attribute_group x86_pmu_format_group __ro_after_init = { .name = "format", .attrs = NULL, }; @@ -1715,7 +1715,7 @@ static struct attribute *events_attr[] = { NULL, }; -static struct attribute_group x86_pmu_events_group = { +static struct attribute_group x86_pmu_events_group __ro_after_init = { .name = "events", .attrs = events_attr, }; @@ -2230,7 +2230,7 @@ static struct attribute *x86_pmu_attrs[] = { NULL, }; -static struct attribute_group x86_pmu_attr_group = { +static struct attribute_group x86_pmu_attr_group __ro_after_init = { .attrs = x86_pmu_attrs, }; @@ -2248,7 +2248,7 @@ static struct attribute *x86_pmu_caps_attrs[] = { NULL }; -static struct attribute_group x86_pmu_caps_group = { +static struct attribute_group x86_pmu_caps_group __ro_after_init = { .name = "caps", .attrs = x86_pmu_caps_attrs, };