From mboxrd@z Thu Jan 1 00:00:00 1970 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 4E9551094E; Mon, 25 Mar 2024 19:12:00 +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=1711393921; cv=none; b=t+OznefY40VJeDhhYQkee+dRnAGlnWAHgo40B5MuUX3KJ+p7I83ucrUOgWyd9pogMyeEiLxMuqMq0cdCXqZcfxO1l5Lfsd3JENa/w8TI8Ji0qf4Y5iVFE7Tro6N/srX6nv02CqBCk3oBd8HbaQZbWOIUghdTtHDrMB7LCeXPLmU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711393921; c=relaxed/simple; bh=u7jAwOBoyoEFZf/8d+oD1X/Pe8+N3eKMDolm6R9REw4=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=hbEk1raGE4fbB28ixJn9+ji0edQesNEqk1Q8HXxX7yPtoRMZhK8e4qNCVVVEEZbEUolOnfZAlQo1TAyFGyUmlzEhbeev9jHNaMXu0A5LsARJcYMSZdFYC2r1GSomW83u02g6VtiktEryJ9PeUgk8bff3zQ9muSOhuGAWZyNg/mE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XW1GcPTf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XW1GcPTf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8041BC433F1; Mon, 25 Mar 2024 19:11:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711393920; bh=u7jAwOBoyoEFZf/8d+oD1X/Pe8+N3eKMDolm6R9REw4=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=XW1GcPTfA8aKj6N4r9YfSxGEKxNzrNpo397atjIL1ilMDEIKJv+U3Idjo47Lsy2N2 RZK5elJCDCFXZZ2nwka9ZBbS7uzk03MBwVuq6RuWAlI1lcRcMwgV8wTUKX1bu3TKnL bzrLk5BVgwpxbeJRmuLOyUePw9FBHif2yq/5LJnpiKuRhDCky3OTZeXlMUMUhkZvEp xJEaJDl4kN4rs7aneTZDDecBbeC8C8IPZ1zUnsT7i/cSyTIDuUYZyHEiRED43Mdt1z c8z3jIM0hWHoVQt3I0CTb7Skq2Lrw7WSRYgU0DkGsAGVW/SGCFlbgPcpoMgNscFagb hE9562rX7NzVw== Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 25 Mar 2024 21:11:56 +0200 Message-Id: Cc: , "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , , "Naveen N . Rao" , "Anil S Keshavamurthy" , "David S . Miller" , , "Calvin Owens" Subject: Re: [PATCH v2] arch/riscv: Enable kprobes when CONFIG_MODULES=n From: "Jarkko Sakkinen" To: "Jarkko Sakkinen" , "Masami Hiramatsu" X-Mailer: aerc 0.17.0 References: <20240323232908.13261-1-jarkko@kernel.org> <20240325115632.04e37297491cadfbbf382767@kernel.org> In-Reply-To: On Mon Mar 25, 2024 at 8:37 PM EET, Jarkko Sakkinen wrote: > > You also should consider using IS_ENABLED(CONFIG_MODULE) in the code to > > avoid using #ifdefs. Hmm... I need make a couple of remarks but open for feedback ofc. First, trace_kprobe_module_exist depends on find_module() Second, there is a notifier callback that heavily binds to the module subsystem. In both cases using IS_ENABLED would emit a lot of compilation errors. BR, Jarkko