Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3729231pxb; Mon, 24 Jan 2022 16:31:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGO9yO+UVT5B02sFiJuPTjDbqLqgR1UkFdQk1cD+773GDViW5f79PfrB7XI0Twwm/0fL+v X-Received: by 2002:a17:902:74c1:b0:14a:d9fa:d8a3 with SMTP id f1-20020a17090274c100b0014ad9fad8a3mr16696065plt.119.1643070713139; Mon, 24 Jan 2022 16:31:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643070713; cv=none; d=google.com; s=arc-20160816; b=aZ1g46q1X9/lZ48uXePbFZt18GzDRLZh4JjISUecVmEl++K+0JwLyBXDyiEiFl8LyG +xuTj75ynlS9xp3nWVCi92spLq5AM+shhQdbLa0PZeQpSAoZr3Otd1OeXFkApZPd0uPN hFpUFT8EQTWTPsjywwQ4++AMaArx3iH7BAt5MG/UxIXUVTdGdH4Heo7P0X22BrwzWL7S ayvxt2LqCcVUar3wu8lv2B2fo3MgGhET+w0SjS+iQK4voeu04dl+1fn/sMZv5sdW75xW PvuecD8dXgD6ySTREKtr82x4aR4s8Tu/tTshjtvgZXk77mtANi2sxLQ8sBho8Ou45M5Q nNsw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MV+MFkBcl9FY5CIhtSk6BY2JfWNTLk/PX6jQzvsBwZs=; b=AA2JsylTK7xAloKNZ9NhGirxS8OYG75pQuYBZWuV24V6eqbfgZb+/k+LLN/ekYosLw bNv6K2H34RUxlrPihSBGV6D3QNxjFcKrUtMljFgoj3ZKlS1sfCIve4MvS+A5YbCYpkkM xS45TdBPAA0SJ+2Yi28hW9WO74bPV8xllhfr+USxNi6E1bJvrFRksRr/omfIywjaxKRw m7TorCEtewaTfAU3LXSYqrN7NiRTCU5NXPaZ35JwGfv/PIonJ7tzQI28zH4pNHUUboeq dFjMyQ9Yh9OTUIlZUiUPYs7KhLafqDE3sUMdzZ/ws/iPDhFi7ob7IMzCTUG2hOrGgdzn JkPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jqgolr7M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si3934196plx.483.2022.01.24.16.31.41; Mon, 24 Jan 2022 16:31:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jqgolr7M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S3409881AbiAYA1o (ORCPT + 99 others); Mon, 24 Jan 2022 19:27:44 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:47836 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1455642AbiAXVfs (ORCPT ); Mon, 24 Jan 2022 16:35:48 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B9D1FB80CCF; Mon, 24 Jan 2022 21:35:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1CD5C340E4; Mon, 24 Jan 2022 21:35:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060146; bh=RYKL0195HNgCJWuQDIBJ5AxoBVK81NvUTBgz1ofwYFw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jqgolr7MBIkK6VwJNFfXZmKUk0AskFhjuZlWGJjyyg8N1oTWGlDoivsSWvIQ8Ve5/ IHNhgThfk50YiNJK6dol4MvVmlnZLZpKxOG+ZNvIknKwaqQjZtTgDtndUGY4vVDv8k QNj+bBjziJncuk/P1cWIJ5uJC+ouSv+0zYTbLSzU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ingo Molnar , Andrew Morton , Tom Zanussi , Masami Hiramatsu , Steven Rostedt Subject: [PATCH 5.16 0854/1039] tracing: Have syscall trace events use trace_event_buffer_lock_reserve() Date: Mon, 24 Jan 2022 19:44:03 +0100 Message-Id: <20220124184153.986599946@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steven Rostedt commit 3e2a56e6f639492311e0a8533f0a7aed60816308 upstream. Currently, the syscall trace events call trace_buffer_lock_reserve() directly, which means that it misses out on some of the filtering optimizations provided by the helper function trace_event_buffer_lock_reserve(). Have the syscall trace events call that instead, as it was missed when adding the update to use the temp buffer when filtering. Link: https://lkml.kernel.org/r/20220107225839.823118570@goodmis.org Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Andrew Morton Cc: Tom Zanussi Reviewed-by: Masami Hiramatsu Fixes: 0fc1b09ff1ff4 ("tracing: Use temp buffer when filtering events") Signed-off-by: Steven Rostedt Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace_syscalls.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace/trace_syscalls.c @@ -323,8 +323,7 @@ static void ftrace_syscall_enter(void *d trace_ctx = tracing_gen_ctx(); - buffer = tr->array_buffer.buffer; - event = trace_buffer_lock_reserve(buffer, + event = trace_event_buffer_lock_reserve(&buffer, trace_file, sys_data->enter_event->event.type, size, trace_ctx); if (!event) return; @@ -367,8 +366,7 @@ static void ftrace_syscall_exit(void *da trace_ctx = tracing_gen_ctx(); - buffer = tr->array_buffer.buffer; - event = trace_buffer_lock_reserve(buffer, + event = trace_event_buffer_lock_reserve(&buffer, trace_file, sys_data->exit_event->event.type, sizeof(*entry), trace_ctx); if (!event)