Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp994877lqo; Thu, 9 May 2024 01:16:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXzrLC+ibZDqlPaW0OejB+wP2bMpXFbAE4dZl9Irk1tEishcTUrSZyISKDWL5ELErI9M8wX15Ej6J+XsWktIFoup83Ar/bAEZiIWbzgsg== X-Google-Smtp-Source: AGHT+IGtL/Nbn+OxTxtxgO7A0oMqpXPrDczWCccJOFEMYI2TPasaaycNOdp0Ly9EbCET/xMny0Dt X-Received: by 2002:a50:cd91:0:b0:572:795a:b913 with SMTP id 4fb4d7f45d1cf-5731da52d71mr4017692a12.34.1715242598621; Thu, 09 May 2024 01:16:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715242598; cv=pass; d=google.com; s=arc-20160816; b=MMH+5k3aLYUC4iib+927mp4fkg/Qftp0p+FraPAaM2KQm5gONDMlxNdKfKKdgJD7yG sFueyrQlDAdmgZFlkgn+jbNZdNjDiNNcAGZGVwRDbzFHYGx6Pt5m+Scpe6iQxEQ1mjzG 8ZTznqQjHHKdOowq/benPONqbaXqB/5XebKnUutEShgUlzycxXqNOcKrgFuYo73CdK2L d4inpy9aXYcaJ4XQvrQRYu+Im75rw3GqV1yNOdv2S5Vn+mFWeUwfhjKrcNrLuJSNHbyB hNBJmDJsOuntQrXrVv+GNrCL5xCO6yP5IyCZDCE//ej/vu6irlSIMJ+qD25teGnIxEb4 ZwAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=srdbwrmXQ6rD9fDEVis+vK9pkUg2h8unOQKwORt6s6k=; fh=8DbJMpXR9udfe5C+GZ19DbOc1wYjIkrdQuBRCHwlcyc=; b=vPbVskMEKMWt4jNch+4qRBJnLvSAtQrAIhmh7Bu26G2yCmDSEZdjvwCVYhTBpG4fXW 82rtLbXtCK8sKaCgruyY3Pdk5O1R9eywYHIgWbE0+sCljlQqWw0YzryLvzmgHG6XK40j arEkabbPUeHZ/mcIPTt54gzTk3gkfDcaLeWiwqukw9gbEHavGUnKJ2K+Qu8YE5j9AkKi gzKACU1MqNpmwTAjy9sVMelpRfuX60lbiig4Qou8mvWuRHis+8gh+j+RQ9ToaIFAWMpW fpHDlsIKb6CUCrXyoUilaLbKeepv/wJ4D8kOUtYxt893WpzagR4kwxEza6K1RgKNKFPH 8tMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Wqz2DLvV; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-174269-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174269-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733bec15e2si554307a12.169.2024.05.09.01.16.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 01:16:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174269-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Wqz2DLvV; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-174269-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174269-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5C33B1F21DCC for ; Thu, 9 May 2024 08:16:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0C6C149E13; Thu, 9 May 2024 08:16:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Wqz2DLvV" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76E2814A08F for ; Thu, 9 May 2024 08:16:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715242581; cv=none; b=kThB2Of249klWpPKO2fK05bJ6jK1GN+XjkVRmn3GzxKUQdP7vsAI1EPsKoFoFjXOKA/BfbPoY0FK06lMzSSgg8h0XqOHNBK4DcslO8bvMWwx+HAH+Svhi3FZvuO/TdAC0flw2cYNUfKhdDoi4zut3YCsy4nOcw4BQHZg7qKWV4c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715242581; c=relaxed/simple; bh=fP267DkIP/myUWdMqJUAbtAyquv8Vz7o0FzzEuCDv5s=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kXxOsKZxUHaqH5A1kUchDY7KH6+rmenOlY+yOjirUEl0Sd+1m3I2YeAkgzDaqTm06XX8Vertu2ufjYccCIC9wQmzXTSHal6b3ghC7wrxyU1Bfv9w6yZvV2sUUSK/PvHZ/btmb2WPCEdoN1XcmTkODRUcS8YajtyJuQli8yr0k0I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Wqz2DLvV; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 95BE960002; Thu, 9 May 2024 08:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715242572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=srdbwrmXQ6rD9fDEVis+vK9pkUg2h8unOQKwORt6s6k=; b=Wqz2DLvVix20sKlhMnKKl8sK9kTDkD4XB8DYVhHinWfIXvp1bKlFbb9QQJvjAiAIKKkt3t nHP3EOC4CWxNl7SorrcvNFYAQ8eK4K0BtwR9+wl2adXUoyNi6PPEJNklCxT2TfYlB5UVOF TV+VsI1LhQw4H2nMaPyNZFsgJWMBdT79fiOezFwhWS5PRTv9CdClZnEFz05o0ZhFVdE7lq 7ElsQgX41q1ORGyoAjrn7jyxvmOzqvUg9CR9Zhik0Y5TiIBAki0XzJPlDDevhG/5mnzLBU 8PGutuTMsyYTvHPTh4lflLiS9OkCAmwe6l6LxBz6aGwipmRmotDEWxYTlrrvcQ== Date: Thu, 9 May 2024 10:16:10 +0200 From: Luca Ceresoli To: Stephen Boyd Cc: Alexis =?UTF-8?Q?Lothor=C3=A9?= , Konstantin Khlebnikov , Sasha Levin , Thomas Petazzoni , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] scripts/decode_stacktrace.sh: remove find_module recursion and improve error reporting Message-ID: <20240509101610.5b9dc3a9@booty> In-Reply-To: References: <20240311-decode_stacktrace-find_module-improvements-v1-0-8bea42b421aa@bootlin.com> <20240311-decode_stacktrace-find_module-improvements-v1-1-8bea42b421aa@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: luca.ceresoli@bootlin.com Hello Stephen, On Wed, 8 May 2024 17:35:53 -0400 Stephen Boyd wrote: > Quoting Luca Ceresoli (2024-03-11 08:24:54) > > The find_module() function can fail for two reasons: > > > > * the module was not found > > * the module was found but without debugging info > > > > In both cases the user is reported the same error: > > > > WARNING! Modules path isn't set, but is needed to parse this symbol > > > > This is misleading in case the modules path is set correctly. > > > > find_module() is currently implemented as a recursive function based on > > global variables in order to check up to 4 different paths. This is not > > straightforward to read and even less to modify. > > > > Besides, the debuginfod code at the beginning of find_module() is executed > > identlcally every time the function is entered, i.e. up to 4 times per each > > s/identlcally/identically/ Well spotted! Thanks for reviewing, v2 on its way. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com