Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3477232lqp; Tue, 26 Mar 2024 10:06:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhA+YD73blCM0iYOyHWGMZYgrM3AE2xckSbD5noOKKJlrctvN7+15x3jifLlJ0l2jd4y+Pi9OgYp+PeiZsCJh2SgSD3G7nhDEjnu/FVA== X-Google-Smtp-Source: AGHT+IG5gp2UjKSG8ZbwUrH8dRhh+cBm3YXZhV6j2NpVYM/jH/zz9MIWyvm5CO4lNW7DYJHHfmHi X-Received: by 2002:a17:906:a996:b0:a46:d5b9:c2ae with SMTP id jr22-20020a170906a99600b00a46d5b9c2aemr268272ejb.32.1711472769758; Tue, 26 Mar 2024 10:06:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711472769; cv=pass; d=google.com; s=arc-20160816; b=YpwWQ4X0YSzDtpUzF0r/NAbqhzPB6V1Jk6hOdKUL6fZE+afYQmyf8r4fJOYbgzekJ4 qdaoq527GFCeAJKr/Ej6E04qr3+qG5Qr579sD9vy8+c7R1XnyfjZnvGAlnSKOFkuQeIp s/U23iWcdwJ5LRMwfvfF3srA9E+FftVUi/GrLUwWnNnYsElY1J0IN7x7OfsxehAOqi6o Vgyd8zgJ5NNqlS3k5DjwOPU/uKFeU7s7nfA9LX3c4qqgkBB8+2rAQdK9Jds6S1dnWZRN TLwSLEQn8DZ7WLtgv24X3gKwEWp/U6EekEcqExA3ZtkYT8FY9wg/HXkTWZ0w/RxhlcvB UiUg== 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:references:in-reply-to:message-id :subject:cc:to:from:date; bh=ep375dnBlbpHA4dih13qf6CKTUsT7oG44O3qXp9XfX4=; fh=MEx9r2CjFzdEKSNsvxOpOTqogRAHKcbEsGLANVuP1k4=; b=MIHD09k8OilkMpsNkCD8tqNr/1KNcm1SOKF1bzOv7Loc34yj1T4vq1o1hCxxqnHElE voLZKvjKvTkzvlIRxU4PDrujD1qwxFolMb2jygaJO5FR8u4gQ28fPc9NIHzYWzsMLgjL h/MBU3wb7O2KA4Mk4IwcT7RLfM7NpJSSNf8wCYSdM94vFCgyOVmPSMRY47UrqN/yCyYz 1Ivqj/ynjFsjhuamL8pos1mnnMQOy7qHLdmTvZLwSz2khvFbIBr8wJgMr/7RVhCSPQqo 7h2i2V17s139dsHQy3F6NBPH9B/ditgEjLMH23IsZgkCm37h8cSn1IWCgcr//dRZ+Xpr BjWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-119543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119543-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y9-20020a1709063da900b00a46dac752f1si3729668ejh.738.2024.03.26.10.06.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 10:06:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-119543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119543-linux.lists.archive=gmail.com@vger.kernel.org" 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 6DBE71F81C8D for ; Tue, 26 Mar 2024 17:06:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 27E3B82D64; Tue, 26 Mar 2024 17:04:12 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8C44941238; Tue, 26 Mar 2024 17:04:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711472651; cv=none; b=Tn2+tC819viwCEo9IMk15gIC69rUMEJD2J128NSkq9b45C3dLjSmzifRcPM7p4bvo0u9X9lIVLu5IypjQitNgcwHC25N0q1+IXNrcDTsOIVU90+U+J8svcR8dsUtMwqWoQfBY1MjIUIXUtMp6R3VLg5gCgWsoNrbtgtryc0Ck6E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711472651; c=relaxed/simple; bh=pZjdj3qeK+xf3fVi93MKDUGc+A4DhhKeTEO96yEhaMI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=paVZFEbw2V22cCliaKhe4JN7BySgf0x6gpqjexoRa6W/SsNNlfcFbegwtN7rmfW+xMnDoYtzftDBylvCJmXzf1CKfP17oprVp8q+8DC9+8/7jnnUqcD3vFrXwD6PMdZplqivXdbyuADfzW111ZHpGlLyyPXDIFVrYpGoPpJee0M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDCEDC43390; Tue, 26 Mar 2024 17:04:08 +0000 (UTC) Date: Tue, 26 Mar 2024 13:06:47 -0400 From: Steven Rostedt To: Arnd Bergmann Cc: linux-kbuild@vger.kernel.org, Masahiro Yamada , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Masami Hiramatsu , Luis Chamberlain , Nicolas Schier , Nathan Chancellor , Arnd Bergmann , Eduard Zingerman , Song Liu , Yonghong Song , Kees Cook , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-modules@vger.kernel.org Subject: Re: [PATCH 11/12] [v4] kallsyms: rework symbol lookup return codes Message-ID: <20240326130647.7bfb1d92@gandalf.local.home> In-Reply-To: <20240326145348.3318887-2-arnd@kernel.org> References: <20240326144741.3094687-1-arnd@kernel.org> <20240326145348.3318887-2-arnd@kernel.org> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.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 On Tue, 26 Mar 2024 15:53:38 +0100 Arnd Bergmann wrote: > -const char * > +int > ftrace_mod_address_lookup(unsigned long addr, unsigned long *size, > unsigned long *off, char **modname, char *sym) > { > struct ftrace_mod_map *mod_map; > - const char *ret = NULL; > + int ret; This needs to be ret = 0; > > /* mod_map is freed via call_rcu() */ > preempt_disable(); As here we have: list_for_each_entry_rcu(mod_map, &ftrace_mod_maps, list) { ret = ftrace_func_address_lookup(mod_map, addr, size, off, sym); if (ret) { if (modname) *modname = mod_map->mod->name; break; } } preempt_enable(); return ret; } Where it is possible for the loop never to be executed. -- Steve