Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2129888rdb; Mon, 20 Nov 2023 02:57:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6d+wFTeS2IWPMdqcro683VWl9LyopLrTq2L6dzJuypC7XQ1ttNVpzQqr40rtCasa7RLSD X-Received: by 2002:aca:1113:0:b0:3b2:e5c6:23bc with SMTP id 19-20020aca1113000000b003b2e5c623bcmr8604830oir.52.1700477831558; Mon, 20 Nov 2023 02:57:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700477831; cv=none; d=google.com; s=arc-20160816; b=kLolo5JRAKb+abN9RR5vMyKb1uNAC2jM6/k53wKGkGPI1BxdJiXG8a1QPtj+WvA0bi woWX7ldl3jaNkiGQlMZLQxwWzxJRjYuJv6UxjImkWI3rAlPUPJ9RzBwZ1J9i7ztFa9/9 /9mcpAVKzoLSrqwkfaIaqZahv4GOrVqok3PxdeQUNm/7N8DcWvKq0VADzecXVQDxbj2Q 6QyCS9EZToTwna5KO7I+hf4r7YJlMTfeS6hxnWrr8Dm95tF0TkH/tyohRvdygxUwL7Qf sOUdHujMkCA9qRi1KyEWSLHCKSRY+DUXtWd5ZFRva4SqfFez8vE5uL+c3coNNY3HCy6Z h1Bg== 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 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h125-20020a636c83000000b00578b4082453si7755513pgc.712.2023.11.20.02.57.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 02:57:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; 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 23.128.96.35 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 F0AC6805FD71; Mon, 20 Nov 2023 02:56:57 -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 S233160AbjKTK4V (ORCPT + 99 others); Mon, 20 Nov 2023 05:56:21 -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 ); 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 ; 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 To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arch@vger.kernel.org, x86@kernel.org Cc: Thomas Gleixner , Borislav Petkov , Peter Zijlstra , Josh Poimboeuf , Pawan Gupta , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , Paolo Bonzini , Wanpeng Li , Vitaly Kuznetsov , Arnd Bergmann , Jason Baron , Steven Rostedt , Ard Biesheuvel , Frederic Weisbecker , "Paul E. McKenney" , Feng Tang , Andrew Morton , "Mike Rapoport (IBM)" , Vlastimil Babka , David Hildenbrand , "ndesaulniers@google.com" , Michael Kelley , "Masami Hiramatsu (Google)" 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: 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:56:58 -0800 (PST) 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 --- 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 -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) -- 2.41.0