Message ID | 20231120105528.760306-3-vschneid@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp2114557vqn; Mon, 20 Nov 2023 02:57:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSZC7NyFoNgBmhHoSITxOaPeyZHjjlK7Xbv0VN1Z6BzFkRj8UJB0sblK9yVKHHB4LQ0gjg X-Received: by 2002:a05:6a21:33a7:b0:187:517a:ff3f with SMTP id yy39-20020a056a2133a700b00187517aff3fmr5100545pzb.11.1700477851947; Mon, 20 Nov 2023 02:57:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700477851; cv=none; d=google.com; s=arc-20160816; b=uUluM/rlHfvI8M8bg0h6IBMly/v+jqT+vs+kWHl92dyf/Ldod/mdHJSknL6EH50OX7 LaczGM0TWx/QK3xLbKIWbtSmVhG68fcu7PqHWC4dbazA0MZccrP7N3uUiS22AT8RzWf5 AcHdewhxjzhiFGabVA4JhENFw2Vb5/FA+/TLdQofeRv4fcbf0kWSp1csMjANcidw84hS GfLGNb7k9wHM8JTOjd87HbknjoDAAldb5DLaGLPq1ioVgnJcMC2VxLQdw2/zpEfPsMqS VR8OLWC4vWR1l1OmX/31CS1mBCUINilcUSQyoQ01giy+PtWadkSRApw/mSXvlImtHX+b 6tSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kLzyis6PUviTtG453OISXCu8S+f029z0hO21me12mCo=; fh=bEaXtmS8lzRItYrE/RfaVyKNdc9i8y6GHBEJVBz/DUE=; b=EV/J72kCknGnMcGsoZgsGBiZW3uHM2RAIE3eTIx4OsvqqKsxx5cHDc9UJuF7Juf0g0 ArDcMVgJKB3X3z07duA8nBgMVDSKmYPaxqV8v9JSPG+z1Or6x6zRQ5tyFXY6THFKP8KA fJvl5Zlfb3b4BXO4j17h79hss7svh1x+pEKEU/HeH63mSBDvH6Ue5EuJaka+ERoXZeIp +mGiF6DlYQtrPqwpRMiT9U1wKwRUzqc7mF+Ed3YGXGdEJ1YyXue8ql5si+w5a4DVoQYF wrLqKyZiv8tcjvpV0IYeAoPUkAioU3OcV5b5h4HZa0p+eJJjsMOtwyHWf5MNqG2PT096 iGiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="RqQ/rzKG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id r12-20020a17090ad40c00b0027d22d5aa7esi8102265pju.46.2023.11.20.02.57.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 02:57:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="RqQ/rzKG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 21815805FD73; Mon, 20 Nov 2023 02:57:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233185AbjKTK4W (ORCPT <rfc822;heyuhang3455@gmail.com> + 27 others); Mon, 20 Nov 2023 05:56:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233180AbjKTK4K (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Nov 2023 05:56:10 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F323AF0 for <linux-kernel@vger.kernel.org>; Mon, 20 Nov 2023 02:56:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700477765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kLzyis6PUviTtG453OISXCu8S+f029z0hO21me12mCo=; b=RqQ/rzKGMZ1xhuwg+8G+PRWcRUCD4YijD4lKSZwvGwoWv5/b4sUjg/zYsfy2zhH+UhwehQ vuEoAQHlHMUnfxhROduNBK1lQtN9vHIqv4OeqQ4bINp+9xVQDfXYCi1VgniGoAVrM5Mc1V u84GmRPC/ZA3jKH4mJeJanLLzPtMMmM= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-425-tGNqKUofPWSoGRXtkEN_5Q-1; Mon, 20 Nov 2023 05:55:58 -0500 X-MC-Unique: tGNqKUofPWSoGRXtkEN_5Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E407338157A4; Mon, 20 Nov 2023 10:55:56 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.195.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8846D2026D4C; Mon, 20 Nov 2023 10:55:52 +0000 (UTC) From: Valentin Schneider <vschneid@redhat.com> To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arch@vger.kernel.org, x86@kernel.org Cc: Thomas Gleixner <tglx@linutronix.de>, Borislav Petkov <bp@alien8.de>, Peter Zijlstra <peterz@infradead.org>, Josh Poimboeuf <jpoimboe@kernel.org>, Pawan Gupta <pawan.kumar.gupta@linux.intel.com>, Ingo Molnar <mingo@redhat.com>, Dave Hansen <dave.hansen@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com>, Paolo Bonzini <pbonzini@redhat.com>, Wanpeng Li <wanpengli@tencent.com>, Vitaly Kuznetsov <vkuznets@redhat.com>, Arnd Bergmann <arnd@arndb.de>, Jason Baron <jbaron@akamai.com>, Steven Rostedt <rostedt@goodmis.org>, Ard Biesheuvel <ardb@kernel.org>, Frederic Weisbecker <frederic@kernel.org>, "Paul E. McKenney" <paulmck@kernel.org>, Feng Tang <feng.tang@intel.com>, Andrew Morton <akpm@linux-foundation.org>, "Mike Rapoport (IBM)" <rppt@kernel.org>, Vlastimil Babka <vbabka@suse.cz>, David Hildenbrand <david@redhat.com>, "ndesaulniers@google.com" <ndesaulniers@google.com>, Michael Kelley <mikelley@microsoft.com>, "Masami Hiramatsu (Google)" <mhiramat@kernel.org> Subject: [PATCH 2/5] context_tracking: Make context_tracking_key __ro_after_init Date: Mon, 20 Nov 2023 11:55:25 +0100 Message-ID: <20231120105528.760306-3-vschneid@redhat.com> In-Reply-To: <20231120105528.760306-1-vschneid@redhat.com> References: <20231120105528.760306-1-vschneid@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 02:57:29 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783080263789947507 X-GMAIL-MSGID: 1783080263789947507 |
Series |
jump_label: Fix __ro_after_init keys for modules & annotate some keys
|
|
Commit Message
Valentin Schneider
Nov. 20, 2023, 10:55 a.m. UTC
context_tracking_key is only ever enabled in __init ct_cpu_tracker_user(),
so mark it as __ro_after_init.
Signed-off-by: Valentin Schneider <vschneid@redhat.com>
---
kernel/context_tracking.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 6ef0b35fc28c5..cc4f3a57f848c 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c @@ -432,7 +432,7 @@ static __always_inline void ct_kernel_enter(bool user, int offset) { } #define CREATE_TRACE_POINTS #include <trace/events/context_tracking.h> -DEFINE_STATIC_KEY_FALSE(context_tracking_key); +DEFINE_STATIC_KEY_FALSE_RO(context_tracking_key); EXPORT_SYMBOL_GPL(context_tracking_key); static noinstr bool context_tracking_recursion_enter(void)