Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2903825lqp; Mon, 25 Mar 2024 12:32:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKTMaQ4mILpO5tZJGx8WPhDyCFmWlMQCygTXK/GPn4mAQqfdNdNWnlf4Nc9xbec0d66r44HDM79OcToF80q9BE4z4eYjEDtu6Qfuvaog== X-Google-Smtp-Source: AGHT+IFtycyLfYOjqxyIa5YzIBsFseK8FEw53HwUf4cvum2OdKoj2QpazDSHLIKAuUalFTwlhmZy X-Received: by 2002:a17:902:d2cf:b0:1de:f840:fb22 with SMTP id n15-20020a170902d2cf00b001def840fb22mr8704161plc.12.1711395176584; Mon, 25 Mar 2024 12:32:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711395176; cv=pass; d=google.com; s=arc-20160816; b=YGa0st6MtNI5vXx1hRmZvQA1t9NCsZixtCNvaNAhKP+zOfCLcL4r5c176O+UZ27Ijq 6dDQb3VkP8q05ElKntinipEQppw9cBqcYF+evhDIOK8sLQlQSzGDkQUq4nC2tZCbj+hd XqnsizE1HTFFr9H8CrooyqoKtemRP8B8/QwLx1qe9BhPXbB/ny192+gfPePogSFq9rXw +wFQZMKmEoA8cqgARqVHln19z/S1wQ1G1ht5dmZ7oTmJHz7TFX6NrF2N7mn6MD/1JLw0 gLbEit9SNMV8fNK9d8UhAG+iTNo+R4fsVq7ZA45aGiRfDrShO1d6Gr4SOW3RM81DHBFi W1kQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=hii92yni5m4VfZz2P67wncTjXZJRmTHvfpwyMPi4358=; fh=NibFGl39KQMG93tNkUQTXTWfaouAXMbd3oreIiL8zuM=; b=gCw87Lr7eu+Knz4s0WIqgwVBCc+ptMrSXmBeRl04m+ulWFKnZFuJymKd0DCqa6um9x uSSVahZIh8yFPy0JzeU3LPohY/KGsZbr+gO6fjSa5kKdACH+ni6Qw0o9j/oBASemZoG4 /udvsOkLjcilzp+FO9udL+Me/rL96kspGUiZk8DdOZic8BgIeIsBsZcyVsFYHVOYbsX3 CmqpS8eFgDI6zyquFoXth0MuVa3OcegSqop+jmv2yE4xxFOLJ9zWVZtQIw144dXqu0Dc Yf9XQYl/MoBI8hOzo4JOaxtJjY7cfqZZ4RBSavCLLl3836E4wZStmq6btZtOG7/HRfZx 7LWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gvHK54vC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-117796-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117796-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y1-20020a170902ed4100b001e037850f5dsi5485243plb.515.2024.03.25.12.32.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 12:32:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117796-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gvHK54vC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-117796-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117796-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 71495321D68 for ; Mon, 25 Mar 2024 19:17:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE82618659; Mon, 25 Mar 2024 19:17:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gvHK54vC" 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 03CDF1CAAA; Mon, 25 Mar 2024 19:16:59 +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=1711394220; cv=none; b=AVG4jf3vGOrJryF8nu9vSKYRfttdD3xiIB70rIMNFhhb1wOSfFPE8+8isgzDCbHJ5Os5SKleOKBx6IM/CMcd5H0g0NiJXcVVQRRQYmtIgBTFUPklSHSZJV3XYJ/eU8sGF0B8wcHAbJUsq/2fbx5TKLF/LQ42J1mVd7c3KvT0RVg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711394220; c=relaxed/simple; bh=hii92yni5m4VfZz2P67wncTjXZJRmTHvfpwyMPi4358=; h=Mime-Version:Content-Type:Date:Message-Id:From:To:Cc:Subject: References:In-Reply-To; b=BM7ILefssegu7/EisV1x66dkfwY+aLy8b9iysp2iJdL1QSJc5pLi0oC7dE6B/5l5ezY2SRt/6qdyEtB3ys0gUu/LjlvQryd0LdDj0AkVJJFUlugp+dCHZAlPZfWF11/i0cnGDp447rm6Yoo3Kv3xzibpjwO/+Wgb6X7mtBJXtrI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gvHK54vC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25FEDC433C7; Mon, 25 Mar 2024 19:16:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711394219; bh=hii92yni5m4VfZz2P67wncTjXZJRmTHvfpwyMPi4358=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gvHK54vCdibf8Bx3wsJsAhxLlpKrBU2MsRU/IPvCTu6oTcuXEieM7ySmo+I/P16YC /DdrWdwGtdEN5Q5T12edc/DsKmVXyuiWybT/F9vnLo9t+zrDP9e4E1BK6qw0K4j+aZ OmDi+tUZ7HmB9qQPQ8i7epvDcgkX/G4cC0jPiy1nsWBNAGndu+kQdJlHsKOLZ9vJUK 3F2xfv/uj+L8hL++3pnZtwWAVmYQjKG2iI5g8uu4CmtfeVBtGAbS/XWo92bbRT4aSG PLdDhVg5aIR938fsKUCBoiodr3ZQ3xPoFvE42SkRe/nQW4ppf6bleuUOBQaLXPoeUs Snh0j5cU67dMQ== 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:16:55 +0200 Message-Id: From: "Jarkko Sakkinen" To: "Jarkko Sakkinen" , "Masami Hiramatsu" 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 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 9:11 PM EET, Jarkko Sakkinen wrote: > 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. Also I think adding 'gfp' makes sense exactly at the point as it has a use case, i.e. two call sites with differing flags. It makes sense but should be IMHO added exactly at that time. Leaving it from my patch set does not do any measurable harm but please correct if I'm missing something. BR, Jarkko