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 2C2E5C56202 for ; Wed, 25 Nov 2020 11:50:13 +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 A582C2083E for ; Wed, 25 Nov 2020 11:50:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dSVCRQgo"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DOWjqj9O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A582C2083E 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=U+MjSffYRUMxt31NDNv3lP6Y/w18e2tyzsY5awlrZxY=; b=dSVCRQgoKKD15J8gSCPNZV+YcX P19m9ljhYDA8cx4iXm7L5Ip7SjfmJgIUivueECY5XXCcE8dRC/AuBe+XJAx00tp50LJivttrT0f4K mAAJHFSW3KX6h4Ct4oZRkeBqGBECrhPX/O7TLhvRs0WFoivEyAAYOtf6FhIa85ihiwZqc1QcHem4J omuOFXoNMVJ8dUMtV161LUrsb0wvvPHTRrvo4hYaUP47aNajg6y1E4/5tomizFG/0wq+2HWmat4l8 KLPu/afAa0ZE3qvWQ8DeBtyutoC9iWyQVuV+z2g8ED528u9LLIAgdxobqaehS6ZRoLJUYhh3dSsnF CJTQfo4Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khtI8-0004JZ-Lr; Wed, 25 Nov 2020 11:48:56 +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 1khtI4-0004Hf-PJ for linux-arm-kernel@lists.infradead.org; Wed, 25 Nov 2020 11:48:54 +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 6D8CA206D9; Wed, 25 Nov 2020 11:48:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606304931; bh=UmSGnrgewWoeq4XYEDnwIl9nP0nvgK3hlQg8oCwnrp4=; h=Subject:To:Cc:From:Date:From; b=DOWjqj9OEm49SmK+R904Wj0YzG12xLN49S/2EDixYaOPGlmUFZL12ykNpy5M5Y3rI ogEwQM/dlO4w6iKNUgP8zbzt8awhCpT3YPDTvs4CaLdzZOcrmQUIDgaAcsxaNWl/a7 0ukwgqeub7xyD0rX5m0fsY/GlFBvFMWf66kf88/o= Subject: Patch "perf event: Check ref_reloc_sym before using it" has been added to the 4.14-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:41 +0100 Message-ID: <16063049212820@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_064853_041784_C67383CB X-CRM114-Status: GOOD ( 15.80 ) 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.14-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.14 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 @@ -794,11 +794,13 @@ int perf_event__synthesize_kernel_mmap(s 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 @@ -822,7 +824,6 @@ int perf_event__synthesize_kernel_mmap(s event->header.misc = PERF_RECORD_MISC_GUEST_KERNEL; } - kmap = map__kmap(map); size = snprintf(event->mmap.filename, sizeof(event->mmap.filename), "%s%s", 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.14/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