From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72F013F54CB for ; Tue, 31 Mar 2026 14:56:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774968973; cv=none; b=DeVbJE9+gQ6RCpzwm82O+e3BHkKdfsfDMOJVfMTiY7mJqMKMZn0c6jkr+rKmSw2U5KqiESe6pZL2/fq2sq75my/RTWCPPDMCPu/dR8cA4DhHcKIxQ86mCLEDOkQJuS+4GA5CuACAu28kM97uKzqQiuIO4HQudn1rTlR3s80noGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774968973; c=relaxed/simple; bh=jKxaM8XS+QGoasE5LVre1ULC0QIBA1mU1HIQ8CMnbPM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LDPDVIax2v0ABAj5HTyr/p+aym6tn/PRc14hXL1uA4mqhJO3gMi5ukSjiDXU7kh11jKH4DOQ1PgD8bdgm9llQdt7qp5ScFQFkNKCc6TZV4Qbsl3G8Kw0q1OcqtrMiqt+xWgBd6A4jAMrz+IXveduvD8mK+ApjvWbtcLAq5LCbZg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Ja6qDZVD; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Ja6qDZVD" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-43cfde3c3f3so1885303f8f.3 for ; Tue, 31 Mar 2026 07:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1774968970; x=1775573770; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=gOWUdy++pUefUEURVk9zZcOvlfK+YwiTNt/ou4gudNE=; b=Ja6qDZVDy0h/sUo6hcIdYSLoQmmKtNcVxEGyPGUA6v8KdsyMaTbRvRGvNceBj+Y8gd IDZ0LrrZpzJd0aN/rtuU6YcdKfRzjxAufGPR/Y+FfInty758n3UvwMNwV+UTisn1OgVw 6VgagNOntG+VlIHBKByO+p7axUoImoEEHqfFPzGxNQ1AJLi7Z8gXzfNbwYjMP14RNAsW wcwqJPp+kNK3CELbzKKxjA0UyW7IP2O8ohkUsyLmQzUOjOl4UKU2VW8QWjlRp6qQIrUT nZ89/xuIQ/WfFRR168GH7MXgIb3KiEo7N1q6HUIIZD1+91za91We4vnWFx8PFRYGR30R oQ9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774968970; x=1775573770; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gOWUdy++pUefUEURVk9zZcOvlfK+YwiTNt/ou4gudNE=; b=oNQmSg0xmb4SS7rj05v3D6xNhVvVZVCV8N6gRTxuaqIEnklbejD6rYiGYf6I/y7sFp 8++F/9jObGWn3r3auyShKJphu61P6kNQMmwR84XNpHZ6qpkbWSRH/2cS+TVmspuqh0q7 Z1f10JK0aXA+WVCAT2EeO/NlLI7ZmsS1Mzy2yv1m3wxDpif2xi/1BE/WKMCgD6oO0R8X mXKuqD1l4OCkdglYxIi+k6o8ndh1QIdO3t4ZY0xdNhNzjCOUw29KayNADABrpETRt9os ejrw6XQD1cxb9U7jtH4hQj0aVZ74d10q0Xzu2AqhFf2GKPql8eyaxG8Js4sG9N4RQ+Ek Uaew== X-Forwarded-Encrypted: i=1; AJvYcCXYFp0eceR/8A01FBg8gt3udKQH7XCvHyrSy9uCE4PTMwIaTstpXOkS1kusIH9RfYcukBzdbXpToy/i7U4=@vger.kernel.org X-Gm-Message-State: AOJu0YwSaSR1ZJ8DwjbZY0/UG2mpbMtxD3a4e8DMEhyffLU2tpUUcLdq P6VhhptZdMrC4FFzIW8RPI1/0cDhdC6YoF/5wpjJglTx1OyQz9HI+2dnFniubxUNae4= X-Gm-Gg: ATEYQzxz3qK8R30OmabD6IM2wJ4xbIeS3e9zZ1EGaDJTdkugC/xSmhLPXYADdL0XTqm AO6gJXM6cLISjXiH1FB9dZRDq1T6klE+VedNWOya8U/qeg6qyC3ocgvERABsxC6O4/Xe/3VN79b CF6pbHujiuHhTTuu2jNqa3wiOcCohcWwOgepiwf2bzSgohtAzn9QcRY7YJ90wZEJYnV0iHxtl1A jAk0UKujJ00qSEq4WMciPmuw+exDPjTq2sQGs70ihs4bfK5sZ2YvzvJR8mTX0uR4TRxRbj2NBiC KV8uMXkwMEHnxAx2vOjt4itkjPXr20yQRZoIyuxFR/4BdKAAANxuqBQAHLxf4wBXIme4ziRiSHE xhjP/kTl1vrXJjUwXbRAwXbAiI3QC1L+rq0f+dHs9scjNPIpi2RkEmzlx61L/RBz7zeINVZa2zQ EFqV7y94LEmM5jOw2299M1fEy8vw== X-Received: by 2002:a05:6000:2dc9:b0:43b:490a:db51 with SMTP id ffacd0b85a97d-43b9e9fb32cmr29895659f8f.24.1774968966934; Tue, 31 Mar 2026 07:56:06 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d14c53928sm336419f8f.5.2026.03.31.07.56.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2026 07:56:06 -0700 (PDT) Date: Tue, 31 Mar 2026 16:56:04 +0200 From: Petr Mladek To: Arnd Bergmann Cc: Andrew Morton , Nathan Chancellor , Nicolas Schier , linux-kbuild@vger.kernel.org, Andy Shevchenko , Dmitry Torokhov , Arnd Bergmann , Kees Cook , Marco Elver , "Peter Zijlstra (Intel)" , Josh Poimboeuf , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] init.h: discard exitcall symbols early Message-ID: References: <20260331142846.3187706-1-arnd@kernel.org> 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: <20260331142846.3187706-1-arnd@kernel.org> Adding module loader maintainers into Cc to make them aware of this change. On Tue 2026-03-31 16:28:38, Arnd Bergmann wrote: > From: Arnd Bergmann > > Any __exitcall() and built-in module_exit() handler is marked as __used, > which leads to the code being included in the object file and later > discarded at link time. Is this safe for dynamically loaded modules? Honestly, I am not sure what is the exact efect of this change. The dynamically loadded modules just came to my mind... Best Regards, Petr > As far as I can tell, this was originally added at the same time > as initcalls were marked the same way, to prevent them from getting > dropped with gcc-3.4, but it was never actaully necessary to keep exit > functions around. > > Mark them as __maybe_unused instead, which lets the compiler treat > the exitcalls as entirely unused, and make better decisions about > dropping specializing static functions called from these. > > Link: https://lore.kernel.org/all/acruxMNdnUlyRHiy@google.com/ > Signed-off-by: Arnd Bergmann > --- > include/linux/init.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/init.h b/include/linux/init.h > index 5db55c660124..ad5c19763034 100644 > --- a/include/linux/init.h > +++ b/include/linux/init.h > @@ -47,7 +47,7 @@ > #define __initdata __section(".init.data") > #define __initconst __section(".init.rodata") > #define __exitdata __section(".exit.data") > -#define __exit_call __used __section(".exitcall.exit") > +#define __exit_call __maybe_unused __section(".exitcall.exit") > > /* > * modpost check for section mismatches during the kernel build. > -- > 2.39.5