Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3682870pxb; Mon, 24 Jan 2022 15:15:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/iPQNgnOfXIYvaqFHkxVg5KlY4Dh5kZd2p57HJzx+1ql0BAJHt9+FxE9wyRCu1dgckZw1 X-Received: by 2002:a17:902:b414:b0:142:431f:3d1c with SMTP id x20-20020a170902b41400b00142431f3d1cmr16555301plr.32.1643066109771; Mon, 24 Jan 2022 15:15:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643066109; cv=none; d=google.com; s=arc-20160816; b=eCOAffmETY9kbdbkC4GDqjjWL1hrVwNL5mccLLEifyyZJaPqtZ/EJjoL8gu3OWi7aX ZfgxPSJqfbyy2vd20poOgopP3Xyixf4RtJqcO/P2LuGRbtSRxrow4PzJ4q0Pk8vjKovb OnpCeI0qrIjm8UB2qHxa/nCz+ZPMjNwSv6a1H5T/wpWl3oIw/bmukvwFyF4IkDo1kBqd XLGnRddmMsIQC0ECNUxM7NjAefjUvowvJ8oCT+iJdhLiWDcFC5Ss4ZNHbiLXBZm8Huho Q90SeNyi64Gd5zoqJwy8dl6ozbv+DKYpD+TeyMMvh0Z3zWLATWi39prOwrRlbCMCCGXq 5Fcg== 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=fDPbMOoDYnR27eyCEDVW2jLbACTlTwHVZe91BvhMvgyEHNw/U8l73Du9wfIqozjH1x 3QAPPTfxKQzChOXrbituXZFGg46eOBxuPP8zbzJ4JF0ZEpiOGfbQYzlLb/qwHyEkB+2H T2UEUAnYXDC0NDDSWcbkvoCogR2wLvQdgaK44KSsiIttb4V10arAW3GLlnkpgpluPP7z qFOZjrN5+kOkIfQ2FEsCc7uKhGGzRg6OPy/c12E5NOO+3HRAbM909AWS0b6eLjJX7POj eWPkD/D20apTmmi7swlf29FXubGQ4kR75RSvTe6pqVprSbSI+79mtnMFJDFXRCDDbeen k7QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RRyGF9Mo; 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 z20si14747978pgh.564.2022.01.24.15.14.57; Mon, 24 Jan 2022 15:15:09 -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=RRyGF9Mo; 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 S1844563AbiAXXJk (ORCPT + 99 others); Mon, 24 Jan 2022 18:09:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1583165AbiAXWRW (ORCPT ); Mon, 24 Jan 2022 17:17:22 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC192C04A2E0; Mon, 24 Jan 2022 12:45:52 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 451D960C2A; Mon, 24 Jan 2022 20:45:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C9D8C340E5; Mon, 24 Jan 2022 20:45:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057151; bh=RYKL0195HNgCJWuQDIBJ5AxoBVK81NvUTBgz1ofwYFw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RRyGF9Mo2pgGJ9PPvoBJcKSV9bd6ub7OlUSD+XLfWmNkz9i7ZCGXBAfw6YAxqDLw+ wO/A2eoDGaUaDjtiFgIzS5t82abfPA5haqebN/8x2bN9a6RiMSyxcRh8DaM7UAT8Ni cV+2i4c9l/461TOwcKyQJ5DPqhop9DeQnTzhy5Fw= 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.15 685/846] tracing: Have syscall trace events use trace_event_buffer_lock_reserve() Date: Mon, 24 Jan 2022 19:43:22 +0100 Message-Id: <20220124184124.693915947@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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)