From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97FBFC63777 for ; Wed, 25 Nov 2020 11:50:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 240C62083E for ; Wed, 25 Nov 2020 11:50:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KnEo0H/9"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="S4IssTE5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 240C62083E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:From:To:Subject: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=q5eA9Iud3ii2VnGk3xjaQ8t4WbOSVoshSxWHhwjGWKo=; b=KnEo0H/9IMDpvWV7RRA7T+DVj6 G2nyWRYeveswURZpCTn7U4btvYpNMd0Z6ypoCRuQTqkLirotblHhSKgauda6SO86Hc3VmdoLSDbfI 7np4ZQpRGZbE0XnyVO21H10vjz1Isn45iDNH/tX7+yzsHHMlq3wn/58Q+uBOcx/mvSe5rTlfaNWkD WYdeJTOU6QUWTG8yLYf9oxL2dpqn58LSkvKpwpMSGWfdYiMv2fO0k92uRszi9TfCaEDKpUL2eZb3V PgJMRzKSarLC+QXWynqGkrGm5WPg84M+8HO003hUZCn8AQYmXYgdTy8PiZlF+aaY/Wy69hYt3DC9S 7M3i86lA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khtII-0004Mu-W3; Wed, 25 Nov 2020 11:49:07 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khtIB-0004KQ-MH for linux-arm-kernel@lists.infradead.org; Wed, 25 Nov 2020 11:49:01 +0000 Received: from localhost (82-217-20-185.cable.dynamic.v4.ziggo.nl [82.217.20.185]) (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 22B292076B; Wed, 25 Nov 2020 11:48:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606304938; bh=jgVCYnZczUknm0Wm7eVav+zB9JN2wrPJhFoD+fwFOYw=; h=Subject:To:Cc:From:Date:From; b=S4IssTE5NaxqEUgfi1rRRNjeuJAXjjua19tLkvE6p3AJRRFu36IMPP0i+4clHeqqC NIIqTmEeC/J9PGtIXj8yLAGjCd+c39P2eIVnmZon0labZ7dpjFJt09ME/y/kelj1Qv fVJMuaQzcbRIeMXpLW79gtdd7hUzRGMQKBob6q6c= Subject: Patch "perf event: Check ref_reloc_sym before using it" has been added to the 4.19-stable tree To: acme@redhat.com, ada@thorsis.com, alexander.shishkin@linux.intel.com, alexey.budankov@linux.intel.com, gregkh@linuxfoundation.org, ilubashe@akamai.com, jmorris@namei.org, jolsa@kernel.org, linux-arm-kernel@lists.infradead.org, mathieu.poirier@linaro.org, namhyung@kernel.org, peterz@infradead.org, suzuki.poulose@arm.com From: Date: Wed, 25 Nov 2020 12:48:56 +0100 Message-ID: <1606304936142179@kroah.com> MIME-Version: 1.0 X-stable: commit X-Patchwork-Hint: ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201125_064859_995691_C95D3A47 X-CRM114-Status: GOOD ( 16.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable-commits@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a note to let you know that I've just added the patch titled perf event: Check ref_reloc_sym before using it to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: perf-event-check-ref_reloc_sym-before-using-it.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From e9a6882f267a8105461066e3ea6b4b6b9be1b807 Mon Sep 17 00:00:00 2001 From: Igor Lubashev Date: Mon, 26 Aug 2019 21:39:12 -0400 Subject: perf event: Check ref_reloc_sym before using it From: Igor Lubashev commit e9a6882f267a8105461066e3ea6b4b6b9be1b807 upstream. Check for ref_reloc_sym before using it instead of checking symbol_conf.kptr_restrict and relying solely on that check. Reported-by: Mathieu Poirier Signed-off-by: Igor Lubashev Tested-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Alexey Budankov Cc: James Morris Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1566869956-7154-2-git-send-email-ilubashe@akamai.com Signed-off-by: Arnaldo Carvalho de Melo Cc: Alexander Dahl Signed-off-by: Greg Kroah-Hartman --- tools/perf/util/event.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -912,11 +912,13 @@ static int __perf_event__synthesize_kern int err; union perf_event *event; - if (symbol_conf.kptr_restrict) - return -1; if (map == NULL) return -1; + kmap = map__kmap(map); + if (!kmap->ref_reloc_sym) + return -1; + /* * We should get this from /sys/kernel/sections/.text, but till that is * available use this, and after it is use this as a fallback for older @@ -939,7 +941,6 @@ static int __perf_event__synthesize_kern event->header.misc = PERF_RECORD_MISC_GUEST_KERNEL; } - kmap = map__kmap(map); size = snprintf(event->mmap.filename, sizeof(event->mmap.filename), "%s%s", machine->mmap_name, kmap->ref_reloc_sym->name) + 1; size = PERF_ALIGN(size, sizeof(u64)); Patches currently in stable-queue which might be from ilubashe@akamai.com are queue-4.19/perf-event-check-ref_reloc_sym-before-using-it.patch _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel