From patchwork Tue Jun 23 19:57:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 191588 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp1359916ecs; Tue, 23 Jun 2020 14:12:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQeutTnMSzWYq1eUbVApaf1kvL7Ewgncp9MsflTAQKAYkOBNUTmAAANlC9200i4qCejABI X-Received: by 2002:aa7:c15a:: with SMTP id r26mr22948741edp.21.1592946742426; Tue, 23 Jun 2020 14:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592946742; cv=none; d=google.com; s=arc-20160816; b=kja+PVBrcJMDJJEdE72Hn/Y1KBy3kS0mT/nCBO0oN5nY2SfhPwZqjFYoD8WCoWCH3p 7gJSRCQNcuB4SujTaYm3AyFfoEsn0QAPyMLrBez2E8uX7gjnujOlMJ5cyUucEWfUyZF/ FbxutTgKuT74EEt7ALNQr5Mbtol/JkHsCJwb6x2jePkKcDJt6a5Uz/IQ3sA2+H/FMB1B 0drUEwtEQAdsgZj2CAo1mDsXt7gyIoBDePVh8BYkffIEk/LcO8jDRuWVQ2eyruFuHe5Q vU/jVabuC/pPyLKMQdZ4Illf+hgJi1X/F2e3F/FniHlRMuIbAX5w9IfQb0Odz/4rnyZk VQHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cOIHg4rgLepCNpxF9kYf2RrMgSXlK3lHI6qy3SNxhAs=; b=mTF6GWPPvYtL0cPePSSEfMFUX3SsouYucOULRZBzAzSXGrcfq1HcUBgUvbtYDWgDcS ODtS8YYV2gGaaG8oQuhtjHGooSNTl26jmICSPhdkMEYU1DHr8RRvBewAK/RGj+HA8nVG 6APyzOrrme1Kdyw2UoSDoVycuwatwL5G4hVIkongRt9x7ovXt7YdUgpivHkrh9KQFRtM EtLVIDwjPap22xeaUTMfaL9BuU46QtcFhRiYj9w3Db+q5fbFzM+gqoUdgiJsoZmp3W4I +2FFclTFJlIYJSD1fsoY7ESrx5nqpR2C7Zk0lZ8lNr6HxSLt/brj6OZyRiT0c4USuHzf ls2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GfxjkdLf; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u7si11663425ejr.69.2020.06.23.14.12.22; Tue, 23 Jun 2020 14:12:22 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@kernel.org header.s=default header.b=GfxjkdLf; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403835AbgFWVMV (ORCPT + 15 others); Tue, 23 Jun 2020 17:12:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:52294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391220AbgFWUbh (ORCPT ); Tue, 23 Jun 2020 16:31:37 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 AE3B220702; Tue, 23 Jun 2020 20:31:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592944297; bh=DEbBMIJn1vOMYDyhp9S3fXJXMBYm9t2z9zO+SaS04aQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GfxjkdLfR+BdbfeVARJRKTm9Vdj9HrMKMpglwAp4RLiuikJ7GBDLB3PgqZUVhve/l Nb6SXLwdlzcDTybE8a+0YQ5FSCkkag2aAoybXw0f8VH5wvhePm4SIsa2DEt1Gx+ajx TFUcJFE6ft9mF8Z5azUWcM7ecGpRN5+Dtbtf97ZU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jean-Philippe Brucker , Alexei Starovoitov , Yonghong Song , Masami Hiramatsu , Sasha Levin Subject: [PATCH 5.4 249/314] tracing/probe: Fix bpf_task_fd_query() for kprobes and uprobes Date: Tue, 23 Jun 2020 21:57:24 +0200 Message-Id: <20200623195350.825256873@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195338.770401005@linuxfoundation.org> References: <20200623195338.770401005@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jean-Philippe Brucker [ Upstream commit 22d5bd6867364b41576a712755271a7d6161abd6 ] Commit 60d53e2c3b75 ("tracing/probe: Split trace_event related data from trace_probe") removed the trace_[ku]probe structure from the trace_event_call->data pointer. As bpf_get_[ku]probe_info() were forgotten in that change, fix them now. These functions are currently only used by the bpf_task_fd_query() syscall handler to collect information about a perf event. Fixes: 60d53e2c3b75 ("tracing/probe: Split trace_event related data from trace_probe") Signed-off-by: Jean-Philippe Brucker Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/bpf/20200608124531.819838-1-jean-philippe@linaro.org Signed-off-by: Sasha Levin --- kernel/trace/trace_kprobe.c | 2 +- kernel/trace/trace_uprobe.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.25.1 diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index fba4b48451f6c..26de9c6549566 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c @@ -1464,7 +1464,7 @@ int bpf_get_kprobe_info(const struct perf_event *event, u32 *fd_type, if (perf_type_tracepoint) tk = find_trace_kprobe(pevent, group); else - tk = event->tp_event->data; + tk = trace_kprobe_primary_from_call(event->tp_event); if (!tk) return -EINVAL; diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 2619bc5ed520c..5294843de6efd 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c @@ -1405,7 +1405,7 @@ int bpf_get_uprobe_info(const struct perf_event *event, u32 *fd_type, if (perf_type_tracepoint) tu = find_probe_event(pevent, group); else - tu = event->tp_event->data; + tu = trace_uprobe_primary_from_call(event->tp_event); if (!tu) return -EINVAL;