Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2582529pxy; Mon, 3 May 2021 03:33:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGfh7MXKMmDl9atASGAelFDsvEHF9ch0miwILpE4C+YP2wg2AMTgpy9nBh8ZH/rrXlnIai X-Received: by 2002:a17:90a:bd13:: with SMTP id y19mr31523045pjr.181.1620038027310; Mon, 03 May 2021 03:33:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620038027; cv=none; d=google.com; s=arc-20160816; b=av8lYYuRgJ0N1BtqZlVmJJEFGqCSbRpd7+fLXSZA1M3x8vjrnS23XO9mfKwvOPZNdl QRLk3Lz86RUS54fhuaqtGLPSnprSunR3t8SwgzbYhke4i6fcRqitglyZFD7Z9mHjbcOT 3V2OFIPEmw35anCXW+CpiGILFgh7iA2TZB5yG6HjxlitNcr2aYIbmom1oLXR+qb46Xai jYpXijfLtxsitHjshmle6vvnUL8443uo++c4dJe/bPnlH7ndhJPNJCx1TwyVPyDt+XQL RcfM+rrOgBuPvpMkHX3ZOLUze7xizKCT2apAoRPQralHw9DloF1nTfTWprC1fMFGvtvI v+uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Rp0dxyamMJPqWsbPUYT+SQ3yUIG6KKjjlLwTjagZ4Ho=; b=cLenTvbEsbbzdmfT8he//7zfDCM/4pFHFjHr0kNmrUphSKAN0xa5vJtK3xmGlhQST0 evNzMOYfYHRH2iQpzc0BqTXQRttksCV2n0pNgICVqoYs9eQnZCuhNh/GCFLAoigAzKHM sPwnzBp+4LhXvHY2SkUxcrc9s7tyLMEz6K0SZ1pMcoFX4nGPUeLh6c/xndtf/gfvonka lKTTjuqBBYL5jTr9w8XWyN4TsrQJKZ+siCd6xBO60lynf89T10rlKHNxZ7n4vcvd5wGS 9PDZ7vJ05tmsxDpfwR93gq3nKC1dXJ38duUNqVhv1HOhOTYFvRUt49JmlPXWCcPPMtJe o9JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gYxuIT2a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p35si14198009pgl.483.2021.05.03.03.33.34; Mon, 03 May 2021 03:33:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gYxuIT2a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233267AbhECKOc (ORCPT + 99 others); Mon, 3 May 2021 06:14:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:43760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233159AbhECKOc (ORCPT ); Mon, 3 May 2021 06:14:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B9093611F0; Mon, 3 May 2021 10:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620036818; bh=VH21PufZUwDIyYfTud1amFvN2W+xniGX/jhz9rO7xmI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gYxuIT2anto6IHJA0jnTYsxUtzipm0TjAFYvthLhpLqX804tTBBS952Er6bgHOqRl U95PgvVzsq6TeUGLV9+0lROGeOqztAyQyE+xdxLjNsbOo1yD5rLKnfCJcn/OxVMjrA EcpkRACl3KZm3pZxxD4Z0EOPjvccELFZREM51cC4S6hnTjQlPYeowuqgGGD5tKIXgL XVPKa3qhhxHvm5aiAmdf5DeNEfbYZ6b5mwVP1b1hUE+8XEsKEv79R6jGF3054BE3Bx IB4m1cC+Tgxp0Ib9uv5KHki1ZCXMSxB5hA7yMae80GT/Q4sXTE69d8vksk7z2fotxT 1pBbFsK6ja1sQ== Date: Mon, 3 May 2021 12:13:34 +0200 From: Jessica Yu To: Linus Torvalds Cc: "Peter Zijlstra (Intel)" , Linux Kernel Mailing List Subject: Re: [GIT PULL] Modules updates for v5.13 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-OS: Linux gunter 5.11.16-1-default x86_64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Linus Torvalds [30/04/21 12:37 -0700]: >On Wed, Apr 28, 2021 at 5:58 AM Jessica Yu wrote: >> >> Therefore, load the __exit sections even when >> CONFIG_MODULE_UNLOAD=n, and discard them after init. Hi Linus, >So I've pulled this, but I have two questions based on reading the patch.. > > (a) Where's that "discard them after init" logic? So the idea is for the exit sections to additionally identify as init sections via module_init_section() when CONFIG_MODULE_UNLOAD=n, so that the existing logic in layout_sections() picks this up and puts the exit sections into the init area of the module (mod->init_layout.base). Then, since we've placed the exit sections in the init region of the module, they will automatically get freed at the end of do_init_module() with the rest of the init sections. Peter has also mentioned that jump_label and static_call want the exit sections to also identify as init via within_module_init(), so this change should satisfy their requirement as well. I should have explained this more in the changelog and apologize that it wasn't clear. > (b) ARM has its own module_init/exit_section() functions, and now >seems to have different logic than everybody else as a result.. No, you are right, I had forgotten that ARM is a special case :-( I will add a similar hunk for ARM and submit that for the next -rc so that all arches are on the same page here. Jessica