Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp69729lqt; Thu, 18 Apr 2024 08:40:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXOCdG6nSkT+GL4FwjyuUuTliMqFnzZ2S71IddvFxHnw2vBoPXzOJ+8XLbTlREqD7+iOkyyq2y1h5w8ZAtCTNdOzt+8NQL4+/eCW1VAPQ== X-Google-Smtp-Source: AGHT+IHOOXwlmDF1d7Aln5XTR5h08OTrh0CUgUjqqNsAk7IKkj5iuAahCPFq2GywdZkTwABnlw3/ X-Received: by 2002:a50:c04b:0:b0:56e:bad:36b with SMTP id u11-20020a50c04b000000b0056e0bad036bmr2071916edd.21.1713454813675; Thu, 18 Apr 2024 08:40:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713454813; cv=pass; d=google.com; s=arc-20160816; b=Vb8bNuWA/4gMWoB3+PakfinjmKza2gdFJ2HhhF34jPwr9GqOrfO4EtBhTBKMhi15zY 4p8SxLs1NaKUvSqn5z5VVBsZEPoMU3j+qBqnlbBDuuTEuA204v8B4Oj760hh0Ki68jdt Sdo8q0Hg4U5hNrcUs9OV4aYURsj7sv7nyEWfvkiDwYF1LPLdHdprE7ChJ4Xph/J3VOo4 VoqEt2xJfhrOMLCkgq7D6iGUXXXxWEo/UoHk4oxGuzuhgbnlKTj89b1H2FTSnEZj4M1T qxSEjAP2FAoKU03sglSyWGzDJ5vFw2kD6V7opzCMk5l1H28gBWTi/9WLCSx3cwCgRpZg s47Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WgOF53jdDU/WmRaQuxCUC8tFuIKqA6KqlxEAowN7EYQ=; fh=PUPJnhMwIvYHh+1NchOFpP7PwvdEywxmly8DgpcdtF4=; b=jKzpb4v0l8xsTFalFntiRVKIf4TKAdBO5zTsNatKInaVFEXv2ZnewXipH68X7bLkkR 8VuXY3tnKkSal1w6+X0ix5UOmhtR7yqb8Z/BxGuHAiL9+pCxr/RLzVWu13Q3mVKazo3q RKeF7Y8X8yWkA9NDaT03xswY6o+hLH7u2a9neFukhpepVoh4+eKajG+BabOA2m2pq/cd IqgTdUAmkUG96HSW0RNP7EjXLQBTXJHAJs1Rznyf1Yfn35kI68vlNNvlMaL613B8NCZ1 i6FnKF8qyD2nW1cl8JGAZ/LLCL8GpYPvmVKKWWj0Kgiebd7sbNhIujqtLOe74kFfrPj2 L1rg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Dhagt/Ds"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-150411-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150411-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c22-20020a50f616000000b0056e860bd85bsi1003376edn.355.2024.04.18.08.40.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 08:40:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150411-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=@kernel.org header.s=k20201202 header.b="Dhagt/Ds"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-150411-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150411-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 am.mirrors.kernel.org (Postfix) with ESMTPS id CD5A51F22B06 for ; Thu, 18 Apr 2024 15:40:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13B7E16F91A; Thu, 18 Apr 2024 15:39:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Dhagt/Ds" 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 0957416EBEA; Thu, 18 Apr 2024 15:39:11 +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=1713454752; cv=none; b=fKijyL+YYIiI+2sHng86TTZ55fJqZJEsIPnOrNa4VH5pEC0ALjUcIWO6jNfKcRswB+TWwcZ3gjiGeW69Z6Un9wnv2gaRXQHO0xp20ZZ+MfVJuSgbmwX8IoZRr1VGS9aId5sbF1pr2+O8Q6IroJUNnZtLzal/6hj31YzYzxNDBFE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713454752; c=relaxed/simple; bh=poikjUesrlZvYhdkYUVTGKAXtyh6o27VwcY88bzAEGE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fgUz23QpKjmd6XW7OENeB6X87D6AebhPYH9qWBnL7uAo2vMfbECw0MbCyKL/bAz6SZfNYydUEIia4+9G0e68sWR7lR9uZdZZ7t2yDDzxkdxpydxE/fi3zCEWwMLyyO25ow7PUeEIAXZKMJOH/b+5mEmgIoyjWss3DYxy82O3aqM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Dhagt/Ds; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDB10C113CC; Thu, 18 Apr 2024 15:38:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713454751; bh=poikjUesrlZvYhdkYUVTGKAXtyh6o27VwcY88bzAEGE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dhagt/DsCV508bBCSM8PQFh0KZ4ChVYVPTqwgApoowoaluDog1pdK/qIVJU1bAfJ1 yTHdqpTqCwsTRyfpVzaQYmToVgTGF005G8P5bcBRn51+TfjO6upp0QzeXZdpRVmP9T DyDQSEZc+G77sXhvEvzJVgEwHd81+hiEegtvxJRrNRYHrUsgJx5AWmHmLJX+3OoPI9 DgUEekwf3Gv6AvfsAJ1j1lmBPCAVlRdxF5BEqB76VwjdS5tGiPR4UhLWWIRbIEiDfd AIVB7M07XTdJ0VLvAnDkmSjg91AV2IlHsKb94RwxZ2UFTajWhnfg+q+QMNKv4wdsDX 0LvSLkPCKaqng== Date: Thu, 18 Apr 2024 18:37:52 +0300 From: Mike Rapoport To: Masami Hiramatsu Cc: linux-kernel@vger.kernel.org, Alexandre Ghiti , Andrew Morton , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Catalin Marinas , Christophe Leroy , "David S. Miller" , Dinh Nguyen , Donald Dutile , Eric Chanudet , Heiko Carstens , Helge Deller , Huacai Chen , Kent Overstreet , Luis Chamberlain , Mark Rutland , Michael Ellerman , Nadav Amit , Palmer Dabbelt , Puranjay Mohan , Rick Edgecombe , Russell King , Song Liu , Steven Rostedt , Thomas Bogendoerfer , Thomas Gleixner , Will Deacon , bpf@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, netdev@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v4 14/15] kprobes: remove dependency on CONFIG_MODULES Message-ID: References: <20240411160051.2093261-1-rppt@kernel.org> <20240411160051.2093261-15-rppt@kernel.org> <20240418061615.5fad23b954bf317c029acc4d@gmail.com> 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-Disposition: inline In-Reply-To: <20240418061615.5fad23b954bf317c029acc4d@gmail.com> Hi Masami, On Thu, Apr 18, 2024 at 06:16:15AM +0900, Masami Hiramatsu wrote: > Hi Mike, > > On Thu, 11 Apr 2024 19:00:50 +0300 > Mike Rapoport wrote: > > > From: "Mike Rapoport (IBM)" > > > > kprobes depended on CONFIG_MODULES because it has to allocate memory for > > code. > > > > Since code allocations are now implemented with execmem, kprobes can be > > enabled in non-modular kernels. > > > > Add #ifdef CONFIG_MODULE guards for the code dealing with kprobes inside > > modules, make CONFIG_KPROBES select CONFIG_EXECMEM and drop the > > dependency of CONFIG_KPROBES on CONFIG_MODULES. > > Thanks for this work, but this conflicts with the latest fix in v6.9-rc4. > Also, can you use IS_ENABLED(CONFIG_MODULES) instead of #ifdefs in > function body? We have enough dummy functions for that, so it should > not make a problem. I'll rebase and will try to reduce ifdefery where possible. > Thank you, > > > > > Signed-off-by: Mike Rapoport (IBM) > > --- > > arch/Kconfig | 2 +- > > kernel/kprobes.c | 43 +++++++++++++++++++++---------------- > > kernel/trace/trace_kprobe.c | 11 ++++++++++ > > 3 files changed, 37 insertions(+), 19 deletions(-) > > > > -- > Masami Hiramatsu -- Sincerely yours, Mike.