Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A9C6C433F5 for ; Fri, 29 Oct 2021 13:35:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 06577610EA for ; Fri, 29 Oct 2021 13:35:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 06577610EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+iT2RNik/YutRhrV4fYYc9sIn+5tlX8K8VPsnZHgjbc=; b=vYegCuv3QcPXIB xdkE1gFefkPBkvzDoQVUxnJiPzPk0mrVz3Zbo4fS8ICNLW0IRHmQ17u1r1mktVUyOzdtjsx8KFr/q BHu2r4U1ItQtiWN+Qp6AwSHEzltncbZQrzCNUg116/Tic4AG9nuHV9iS2+09DP8Zke3D8Xxz0+S5x DRfJol560u7cL6rDuKtWn6eS4idG7mGzAFU8VQE5dq0wTTVPReLdU+EwlGkeqEFXGVp+1xUabap4X FJJ0pCxXR+26R3e+QtvYwuB9R5m0hgQYXNPVYAAI6pD+JiIPC1pDrMVjaXA3AUiz0PekjL08V5NdP +m4i4RKKMJv0EbPSJ6/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mgS19-00B3RF-Oy; Fri, 29 Oct 2021 13:33:59 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mgS15-00B3Qi-UM for linux-arm-kernel@lists.infradead.org; Fri, 29 Oct 2021 13:33:57 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 81BF813D5; Fri, 29 Oct 2021 06:33:52 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9B5F83F73D; Fri, 29 Oct 2021 06:33:51 -0700 (PDT) Date: Fri, 29 Oct 2021 14:33:49 +0100 From: Mark Rutland To: Steven Rostedt Cc: Will Deacon , linux-arm-kernel@lists.infradead.org, broonie@kernel.org, catalin.marinas@arm.com, madvenka@linux.microsoft.com Subject: Re: [PATCH] arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR Message-ID: <20211029133349.GD24060@lakrids.cambridge.arm.com> References: <20211027132529.30027-1-mark.rutland@arm.com> <20211028085225.GA23581@willie-the-truck> <20211028134539.GA48435@lakrids.cambridge.arm.com> <20211029112032.GC24060@lakrids.cambridge.arm.com> <20211029091545.424c8c55@gandalf.local.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211029091545.424c8c55@gandalf.local.home> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211029_063356_048798_CEA22137 X-CRM114-Status: GOOD ( 18.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 On Fri, Oct 29, 2021 at 09:15:45AM -0400, Steven Rostedt wrote: > On Fri, 29 Oct 2021 12:20:34 +0100 > Mark Rutland wrote: > > > > That seems to be the following in __trace_eprobe_create(): > > > > > > | mutex_lock(&event_mutex); > > > | event_call = find_and_get_event(sys_name, sys_event); > > > | ep = alloc_event_probe(group, event, event_call, argc - 2); > > > | mutex_unlock(&event_mutex); > > > | > > > | if (IS_ERR(ep)) { > > > | ret = PTR_ERR(ep); > > > | /* This must return -ENOMEM, else there is a bug */ > > > | WARN_ON_ONCE(ret != -ENOMEM); > > > | ep = NULL; > > > | goto error; > > > | } > > > > > > ... but I haven't yet dug into exactly why that's returning an > > > unexpected error code. > > > > It turns out this is a latent bug when the user requests a bogus event, > > find_and_get_event() fails and returns NULL, causing alloc_event_probe() > > to return -ENODEV. > > > > The right thing to do there is to check the result of > > find_and_get_event(); I have a local patch for that. > > It's been fixed in mainline: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7fa598f9706d40bd16f2ab286bdf5808e1393d35 Ah, even better; thanks for the pointer! Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel