Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp733289lqt; Fri, 19 Apr 2024 08:51:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW9mA28W2EZd4lj8gjfXuGztr/w0W+YQj7QKmQun3p2T4ZBjS74vFRwt08r7jPjL2s+Xwney/SKeRhuVVE2PL5ZSbmV3OY4Inh/1UM49w== X-Google-Smtp-Source: AGHT+IEnqeDVC53BQMf+8mKNfSjBUButVFgTcb6nfZ770PqPgLgvwsV0PrPR5LDqvdIjcQbfUQgF X-Received: by 2002:a50:cd0b:0:b0:568:d5e7:37a1 with SMTP id z11-20020a50cd0b000000b00568d5e737a1mr1708153edi.36.1713541891880; Fri, 19 Apr 2024 08:51:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713541891; cv=pass; d=google.com; s=arc-20160816; b=Hs9uJcqlKqhIymA2wXL2lE806Xxs44WaRMHD90w0dA8Bw/Ln+6nQqMIdLttUv7MlLF uc6SEBi4jWITQ+8/201KO0HLKOexvwFqJx++jcHZnJlPGC+JWY+G0wFXjzxRvsvZKrvk I89ujRjOJ1P3E1oirMvBVPV+xF6PdXHFRaEigCFpcxQhAYtcQ4MW9ya3uClPEUtb26Fp Cg6T0On9Rjx/rPrqLPCaELGyi+chXhM1mXTyD9a9eUXBIEwG8ckq92zDxGUzR1IK2bYi xJKOSupWHT1DNezzsXMZm6Ed8t2szQFPykVGDUgPT00F7wIVxastbhZCORbAbq1t4Xd4 fSBA== 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=Yusg8BJM3bAIRTaYiOE3/SVhzDGu73eOeqQRgqQfMzg=; fh=PUPJnhMwIvYHh+1NchOFpP7PwvdEywxmly8DgpcdtF4=; b=0BH/RhFW3a94ln/MIhWNRM4j+AJuuHIK0zvldve8UzVxHzMxIqtQj8xwZtFVR2wvTX 5AW5AJ3WSEcoEzuDUC7QlmLVpGSfeFKgYfIZoaKN8m08wyq0x14gvuCHCkRDhETs/wBM K9er76qeIwv9cEtB0aR/ziO/PW0w2I4iuK1opE2kHNTAV2p9DrGI6N67ENSlX/A0D6mc m5kZS09YGcpKy9yhviZ/mXN/AZV4EVGR4TsMrxpwejHdiQ8UxGXI0gXYwZD1JugJhYqq DpiRf4yN4TvSGENqh2/LGmFZzZA0Vnfs93cBMTbJtxv/tZ3sEpnvm+j/m1gLzwRW6JdN 7PAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OHj3fHUB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151707-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151707-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s13-20020a05640217cd00b00570162615a6si2312630edy.455.2024.04.19.08.51.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 08:51:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151707-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OHj3fHUB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151707-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151707-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 9A48B1F23455 for ; Fri, 19 Apr 2024 15:51:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4018130AF9; Fri, 19 Apr 2024 15:50:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OHj3fHUB" 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 A52BC77F13; Fri, 19 Apr 2024 15:50:39 +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=1713541839; cv=none; b=llxUtTwdAiKq8S2FEKL8LydSacvUQ9TpvrR9IJhg6N05U6DgWqyv6AGjaWydIydVEz5g0C0lpIwrVRZkWuNf/mYF7s6xZI1D5eBUk476x9Pph/MxBKWrwKPxcSuyAi/6wqycKbzEIdg91jxUnH9NppKyaWOLzDxaonOTtiP4YfE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713541839; c=relaxed/simple; bh=4syrMVBjLG+mqSAuWdu45onjerLE6hugRcJZYIbTm9w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eRQOzsrj/ljKZqDXeCjzoqjDfNZ7gDiQqNMj/V3zxy6Yy3GW8lNZ8Wpj+4Ze0h9to0OYve361+ZtgU+i+EptEWjNOZhPbTulto8OduVyHbVsfZKROE8yHI0m5CxDzD1YOGYxJOieOXc7RpR1PtGT81f/avI2+EjtzQDf6o8E0W0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OHj3fHUB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B33F9C3277B; Fri, 19 Apr 2024 15:50:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713541839; bh=4syrMVBjLG+mqSAuWdu45onjerLE6hugRcJZYIbTm9w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OHj3fHUBZ5oW6uWZr153zLjsZ6q0yv8DxwxD0Zy4isctsEWry5XXGSfR8Vc3hMrh/ vizLT7qFrrEF533kmJCP3HWtZ7Qzr6mVAw251VXfA8O2WlqLyeSYgvuFfPALuIdv03 8KfWQePVkfruiceot7yZycnjNdoMZw4MifC81l3AU9dBYam0QRDoIaUN7a6lFYb8MN K0Whze6qtl25bkJdh4oiv03gWibiSz5LhY9l5mv+w3PTDhkRKRk4JGDzV2xKnexhV7 tGBMGlG1WEFnNmkggVGWaWOAgxzIa+Avjitv3Mny3kNElAG5XpvzSHnQsEDp7b51Tm Ziw7Ozh3aQ/+w== Date: Fri, 19 Apr 2024 18:49:17 +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. The code in check_kprobe_address_safe() that gets the module and checks for __init functions does not compile with IS_ENABLED(CONFIG_MODULES). I can pull it out to a helper or leave #ifdef in the function body, whichever you prefer. > -- > Masami Hiramatsu -- Sincerely yours, Mike.