Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2046431imm; Thu, 24 May 2018 05:03:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqwtx6YYXzQhh+gNQlgDhOUicrgY+2SUEzlaMmRQF077JCrwo7NKuJPqIkaqKvmDX0p7NJv X-Received: by 2002:a17:902:e85:: with SMTP id 5-v6mr7167255plx.318.1527163411005; Thu, 24 May 2018 05:03:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527163410; cv=none; d=google.com; s=arc-20160816; b=uVTsNZZAckDQ/t269ckSYZ5xIS2xoBc0tFpMu5QKiz2mYDLNhS0TOjU4K4cyevwQmd OvChhsQgJkWVhQjqukqVrpVNxSsvQ7qmfXcoAkkfuZ1bCAXb7ZNbDFj0usYm49ScUufh BLHZ0DXEkxPJq6K7/mfT/gi22GpH3BsEVaoBzxFtXyDw5t0wgQJl+SFPuKFRY/4SteUG 2URIu9wvycQUefthNb7mpYFIKmFwh5NBCasG8LKscxWvh4600xPkWluziaA/XLJMST7Q MM+VevPaHH8pkLfohr7sPm6ylBj3dmy76EmYJxHywzq7MVr9l9rmLYNRIWlJwVMdFAgm H56g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=WrCrO6LpLPMKD+ZtlUiuKe/3MuHRLWaHrp8DtDgcrM0=; b=k9lWmB/IXNUv5rMNBGhzb1WgRfPD+/ZyewMrzhdVevOI/RUy49hND12cy2Vv/J+3N9 PfdisP5/Wcq8rxVocjgwvWTW5jMfOpU4MFKBeWcWIYEi5NKT+du+nFZZkIOo7ARHiVHS MlTyYUOLK/X9ZxrKn94TNEysnIcbTxQ1NAIDj/nXKexCrM7X+U0mo0N6ss3EyyEUOufG jxVUFW2rb5w904WuZGWQVgszsRta/WnmkAHWCO/i/UFR+yFo/WlBnvvCR/yr8mpeRBsn BWrQ1yBFavL/PbNDiwDfyxWqHxROJ+Y/Pty6lQXpRrrpHdF7s+lkuZUivaYrJkK8X09r nGyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ngfDPH8m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z13-v6si21584053pfc.128.2018.05.24.05.02.53; Thu, 24 May 2018 05:03:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ngfDPH8m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969505AbeEXMCG (ORCPT + 99 others); Thu, 24 May 2018 08:02:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:56108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966367AbeEXJoy (ORCPT ); Thu, 24 May 2018 05:44:54 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7EFE3208DD; Thu, 24 May 2018 09:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155094; bh=XTFqQOBhUMHiYnX9FKrHbqcJWtkR++kfEB1i4cUquIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ngfDPH8mTVf+MasV2sYxWAvmpuZaazKyCpkyv4C/KKNd7tXPQeFOEsEW6+Ok4LJEM F16cARSul90XV65LjM95oZyNfrpwead8zAuL+hwasRPr4Oq3yEi7ukHK6E4K22mxwH BqrQ4X3yG6XqmJOEbPEw1irgKVHjufLPdeqEmUgw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Juergen Gross , "Steven Rostedt (VMware)" Subject: [PATCH 4.4 53/92] tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all} Date: Thu, 24 May 2018 11:38:30 +0200 Message-Id: <20180524093204.465524453@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093159.286472249@linuxfoundation.org> References: <20180524093159.286472249@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Steven Rostedt (VMware) commit 45dd9b0666a162f8e4be76096716670cf1741f0e upstream. Doing an audit of trace events, I discovered two trace events in the xen subsystem that use a hack to create zero data size trace events. This is not what trace events are for. Trace events add memory footprint overhead, and if all you need to do is see if a function is hit or not, simply make that function noinline and use function tracer filtering. Worse yet, the hack used was: __array(char, x, 0) Which creates a static string of zero in length. There's assumptions about such constructs in ftrace that this is a dynamic string that is nul terminated. This is not the case with these tracepoints and can cause problems in various parts of ftrace. Nuke the trace events! Link: http://lkml.kernel.org/r/20180509144605.5a220327@gandalf.local.home Cc: stable@vger.kernel.org Fixes: 95a7d76897c1e ("xen/mmu: Use Xen specific TLB flush instead of the generic one.") Reviewed-by: Juergen Gross Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman --- arch/x86/xen/mmu.c | 4 ---- include/trace/events/xen.h | 16 ---------------- 2 files changed, 20 deletions(-) --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -1316,8 +1316,6 @@ void xen_flush_tlb_all(void) struct mmuext_op *op; struct multicall_space mcs; - trace_xen_mmu_flush_tlb_all(0); - preempt_disable(); mcs = xen_mc_entry(sizeof(*op)); @@ -1335,8 +1333,6 @@ static void xen_flush_tlb(void) struct mmuext_op *op; struct multicall_space mcs; - trace_xen_mmu_flush_tlb(0); - preempt_disable(); mcs = xen_mc_entry(sizeof(*op)); --- a/include/trace/events/xen.h +++ b/include/trace/events/xen.h @@ -377,22 +377,6 @@ DECLARE_EVENT_CLASS(xen_mmu_pgd, DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_pin); DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_unpin); -TRACE_EVENT(xen_mmu_flush_tlb_all, - TP_PROTO(int x), - TP_ARGS(x), - TP_STRUCT__entry(__array(char, x, 0)), - TP_fast_assign((void)x), - TP_printk("%s", "") - ); - -TRACE_EVENT(xen_mmu_flush_tlb, - TP_PROTO(int x), - TP_ARGS(x), - TP_STRUCT__entry(__array(char, x, 0)), - TP_fast_assign((void)x), - TP_printk("%s", "") - ); - TRACE_EVENT(xen_mmu_flush_tlb_single, TP_PROTO(unsigned long addr), TP_ARGS(addr),