Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754074AbbBYVuR (ORCPT ); Wed, 25 Feb 2015 16:50:17 -0500 Received: from mail.kernel.org ([198.145.29.136]:46480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752907AbbBYVuK (ORCPT ); Wed, 25 Feb 2015 16:50:10 -0500 Date: Wed, 25 Feb 2015 18:50:05 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: Peter Zijlstra , namhyung@kernel.org, Ingo Molnar , Linux Kernel Mailing List Subject: Re: [PATCH perf/core ] perf-probe: Check kprobes blacklist when adding new events Message-ID: <20150225215005.GL18705@kernel.org> References: <20150211204220.GM24251@kernel.org> <20150219143113.14434.5387.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150219143113.14434.5387.stgit@localhost.localdomain> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1648 Lines: 49 Em Thu, Feb 19, 2015 at 11:31:13PM +0900, Masami Hiramatsu escreveu: > Recent linux kernel provides a blacklist of the functions which > can not be probed. perf probe can now check this blacklist before > setting new events and indicate better error message for users. > > Without this patch, > ---- > # perf probe --add vmalloc_fault > Added new event: > Failed to write event: Invalid argument > Error: Failed to add events. > ---- > With this patch > ---- > # perf probe --add vmalloc_fault > Added new event: > Warning: Skipped probing on blacklisted function: vmalloc_fault > ---- > > Signed-off-by: Masami Hiramatsu > Reported-by: Arnaldo Carvalho de Melo Ok, I really need to use a newer kernel on this RHEL7 box, a 4.0-rc one, as when trying this I saw no difference, but probably that is because it didn't find the kprobes blacklist, tried inserting the probe and then failed with the exact previous message... A follow up patch could try to improve the situation by saying something like: "Failed to insert the probe, maybe this is a blacklisted function and you're running an old kernel? Please check the function definition, it should not be marked as, for instance: NOKPROBE_SYMBOL(vmalloc_fault);" Anyway, applying your patch, clearly an improvement when the blacklist is available. Thanks, - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/