From patchwork Wed Mar 13 18:01:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 13591779 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B450E5F492 for ; Wed, 13 Mar 2024 18:02:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710352937; cv=none; b=cua1Qax9BfzUVyfLs15mc/4jywFUpT8RiUQevfqOpEFq+BVMVsRsn1/hcxTaYINhyV85TC/FJ+TNlhNgdUw0iMfjx6y3Ov14qQyZkBFYHI05O3Vu3UBZNuH/Cj+YifH88bUW3bXHS+7TqOBYQn6DByiN5oB3ejH84SS5txdk/vk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710352937; c=relaxed/simple; bh=50xel8t0rKQ5mZgwBdBi4oTiLMz8K9bmdH1JSebeqP4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=El0pbNHigER2Jb7/Vlr2WMH7wkTMea26PYRq3toipYqE90TnEdm8N8TXk2JCQBFYOk6vIOY8a3ZQQfHfPVwVIqxDHDV+aLJBgafT1LVWsjNEGmPtk+G6ojK9ujXf60cnOoHYuF5sylPpeTJhneAVWypKhMQR0LFOKYYaXrmAke0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Zufnpqd8; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Zufnpqd8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710352934; 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=L9U5FLzcKopNjW5rXIGV9A4TNmKbW+1drLUIbV112XA=; b=Zufnpqd8MkmOi9LwmEOTfTlLiKcTUKRY6IraqvfCTj9c1o/IOJLxkZT0cz3ZxJ/jRlXTAL ryxEwSMJjXO20izOVmYMqVv72o4c6guavPHReRAOMtZi0IoiODNDlNqq8yhyOPkT4S4Ysz 7l6M9Grb9XrOqojkuedtjFNlS3g+cK4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-628-d_HrhU4oOBSmV6D0XmF9uw-1; Wed, 13 Mar 2024 14:02:11 -0400 X-MC-Unique: d_HrhU4oOBSmV6D0XmF9uw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 AEC481818A21; Wed, 13 Mar 2024 18:02:09 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.194.115]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF556C04223; Wed, 13 Mar 2024 18:02:04 +0000 (UTC) From: Valentin Schneider To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arch@vger.kernel.org, x86@kernel.org Cc: Josh Poimboeuf , Thomas Gleixner , Borislav Petkov , Peter Zijlstra , 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 v3 2/4] context_tracking: Make context_tracking_key __ro_after_init Date: Wed, 13 Mar 2024 19:01:04 +0100 Message-ID: <20240313180106.2917308-3-vschneid@redhat.com> In-Reply-To: <20240313180106.2917308-1-vschneid@redhat.com> References: <20240313180106.2917308-1-vschneid@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 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 Acked-by: Josh Poimboeuf --- 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 70ae70d038233..24b1e11432608 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)