Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3006005lqp; Mon, 25 Mar 2024 16:37:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWObKPJIhgvXALIUiE8kGKHsZlHIodaPF1Rtx+ULBzn/NW8sDV6EWxUFuphqOOO8G4d2tkFK8RDz6yYANzMbWrgbiQ5xK2Xj6jU2xy29A== X-Google-Smtp-Source: AGHT+IGyM83UGnXNb810qCf2+QiqQfqzTRPtXYYGjBORcDtUuEPqvl87lF1zJOBkL+bG48VB/P2z X-Received: by 2002:a05:6a20:2d09:b0:1a3:bd67:109b with SMTP id g9-20020a056a202d0900b001a3bd67109bmr6611601pzl.57.1711409849979; Mon, 25 Mar 2024 16:37:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711409849; cv=pass; d=google.com; s=arc-20160816; b=gBsf6oE0pSHtBdBiDo8z8G5b6luqF0dyzylMFPcRcYVTTSDEJCAagFdi91jTOvN+cG 3fL6/iz50rfHhkJCp7zI3TJWqiji5nbR8r33rKR8QFtkm8XGFHBOiYGSZTsJceFLHFNw 32y+N6EU0i5sUweDSxp9nuJC9/9vDf6+VgNqeNr2aBhLp7SCcDOPk83r0gH1JDpeDdz1 HDIz44TQkDvn0sf9LosrREiC+Qh94aXvVYvv45lVnySorvdHEEFcyH8S9Oc+yHdNJn4K lJ/2Q4WRxTAp+bYvgTdw8kpMw24J8AqnHzrY6dhTT2b8LOOcmJPVjccZjoEAW7y+mGhP KttA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=u7jAwOBoyoEFZf/8d+oD1X/Pe8+N3eKMDolm6R9REw4=; fh=wzN1ZE1eegFIqobaDOy1TyBct/9EsQHTC3cwsoSb+V4=; b=Nrzs0kxQEii/bJGNmgTx1dnlvtk7S98/X2tKdQ6XpFKIAb6kX/CN9Dso96PMfPRWsd 482vDHVTy2mFottph8KQZJaq/9mXI2OCA6tLixBgK5VWtpgf/N0xafzuEwtYJygfKetf pzr/UaAZc1RsJW2nU/+UapCdlZsFLcAprT4Fgb40xPSn0EDp5csXU1Tq25p4NkF9+wrU DirZnBKQ+d8HKHpLduSVxKl6g1CfJSiYiH7Qa/WQKxFDiamaS8YvH2b1x9W91fBo2m2A 6LakTHEYIdYetdFp6StlR33N3aZAM4d9ErYeTC3MhdBijvIxlDawtr8NJMMxqR8cFsZL sFSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XW1GcPTf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-117777-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117777-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p4-20020a17090a868400b0029b744a3e48si5886606pjn.119.2024.03.25.16.37.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 16:37:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117777-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XW1GcPTf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-117777-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117777-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9C095B3A7A2 for ; Mon, 25 Mar 2024 19:12:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2BF72125D5; Mon, 25 Mar 2024 19:12:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XW1GcPTf" 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 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-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