From nobody Tue Nov 25 16:32:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dG7XB64cFz6HQNS for ; Tue, 25 Nov 2025 16:32:42 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp6.goneo.de (smtp6.goneo.de [85.220.129.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dG7X95BWxz3m1F for ; Tue, 25 Nov 2025 16:32:41 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=walstatt-de.de header.s=DKIM001 header.b=FprXRNE6; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@walstatt-de.de designates 85.220.129.31 as permitted sender) smtp.mailfrom=freebsd@walstatt-de.de Received: from hub2.goneo.de (hub2.goneo.de [IPv6:2001:1640:5::8:53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp6.goneo.de (Postfix) with ESMTPS id 03628240519 for ; Tue, 25 Nov 2025 17:32:39 +0100 (CET) Received: from hub2.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPS id 13963240252 for ; Tue, 25 Nov 2025 17:32:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1764088357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SYVXZ/vKuwA4Qu9pJMr+uS9/IulLvi2WQ+6/n72ZTAM=; b=FprXRNE6k4I5VRLMD92ZWzcs1Hl860c6ZIZBIC3jAUedJsv/edCjjygkRXC2A/V5ZZVItv CK2Scdvxlacg/kcJaPJhA1Nr7Lg44Y10/Xc+iiFwirnRWtadyAbejxz2e+CWVcqHHJE69b 5pFxdCoJ4Nm4ZJWghAkf1GRwyTtYPbXHCbje+oZHdCQZaHmilW2u9XGqkqq1xr0p2h3D16 FA63upaZMvrby9eZ3aPCuQmDZwske0wJygNtDvL3bivB0qfgTdrpSq3FDvstpJ/tpeGfGI FyPPfLoxqLfjFBpsSq+nVzW8r6YTMfCmD2diZdjx95FyrievNrnKao4kd2RO+g== Received: from hermann (dynamic-2a02-3100-25be-c602-cbba-c700-f3fc-258f.310.pool.telefonica.de [IPv6:2a02:3100:25be:c602:cbba:c700:f3fc:258f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPSA id B609F240240 for ; Tue, 25 Nov 2025 17:32:36 +0100 (CET) Date: Tue, 25 Nov 2025 17:32:32 +0100 From: FreeBSD User To: dev-commits-src-main@freebsd.org Subject: Re: git: 9562994a7aac - main - kernel linker: Disable local sym resolution by default Message-ID: <20251125173232.7da258c1@hermann> In-Reply-To: <6925b3f4.2c48c.61345a6b@gitrepo.freebsd.org> References: <6925b3f4.2c48c.61345a6b@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-UID: 7c337b X-Rspamd-UID: d9db76 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.08 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.984]; MID_RHS_NOT_FQDN(0.50)[]; R_DKIM_ALLOW(-0.20)[walstatt-de.de:s=DKIM001]; R_SPF_ALLOW(-0.20)[+ip4:85.220.129.0/25]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[85.220.129.31:from]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; RCVD_TLS_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[walstatt-de.de]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[walstatt-de.de:+] X-Rspamd-Queue-Id: 4dG7X95BWxz3m1F On Tue, 25 Nov 2025 13:49:40 +0000 Ed Maste wrote: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=9562994a7aacee2baae6ddee1a7b558b48ae39ef > > commit 9562994a7aacee2baae6ddee1a7b558b48ae39ef > Author: Ed Maste > AuthorDate: 2024-11-25 19:05:54 +0000 > Commit: Ed Maste > CommitDate: 2025-11-25 13:49:20 +0000 > > kernel linker: Disable local sym resolution by default > > In 95c20faf11a1 and ecd8245e0d77 kib introduced support to have the > kernel linker stop resolving local symbols from other files, but did > not enable it by default to avoid surprises. Flip the default now, > before FreeBSD 16.0. > > The debug.link_elf_leak_locals and debug.link_elf_obj_leak_locals > sysctls are available to revert to the previous behaviour if necessary. > > PR: 207898 > Reviewed by: bz > Relnotes: Yes > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D47742 > --- > UPDATING | 9 +++++++++ > sys/kern/link_elf.c | 2 +- > sys/kern/link_elf_obj.c | 2 +- > 3 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/UPDATING b/UPDATING > index aaef0e5b4cd3..7f0cb44181d3 100644 > --- a/UPDATING > +++ b/UPDATING > @@ -27,6 +27,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: > world, or to merely disable the most expensive debugging functionality > at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > > +20251125: > + The `debug.link_elf_leak_locals` and `debug.link_elf_obj_leak_locals` > + sysctls now default to 0, so the kernel module linker no longer > + performs symbol resolution against local symbols from other modules. > + > + If a kernel module now fails to load because of an unresolved symbol, > + set these sysctls to 1 and file a bug report including details about > + the affected module. > + > 20251115: > The FreeBSD-base repository is now defined in /etc/pkg/FreeBSD.conf, > disabled by default. In -CURRENT and -STABLE this points at nightly > diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c > index ebd203858b66..f910fc3d5df5 100644 > --- a/sys/kern/link_elf.c > +++ b/sys/kern/link_elf.c > @@ -203,7 +203,7 @@ static struct linker_class link_elf_class = { > link_elf_methods, sizeof(struct elf_file) > }; > > -static bool link_elf_leak_locals = true; > +static bool link_elf_leak_locals = false; > SYSCTL_BOOL(_debug, OID_AUTO, link_elf_leak_locals, > CTLFLAG_RWTUN, &link_elf_leak_locals, 0, > "Allow local symbols to participate in global module symbol resolution"); > diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c > index a3a53a39bfd6..759cd75cba31 100644 > --- a/sys/kern/link_elf_obj.c > +++ b/sys/kern/link_elf_obj.c > @@ -192,7 +192,7 @@ static struct linker_class link_elf_class = { > link_elf_methods, sizeof(struct elf_file) > }; > > -static bool link_elf_obj_leak_locals = true; > +static bool link_elf_obj_leak_locals = false; > SYSCTL_BOOL(_debug, OID_AUTO, link_elf_obj_leak_locals, > CTLFLAG_RWTUN, &link_elf_obj_leak_locals, 0, > "Allow local symbols to participate in global module symbol resolution"); > After updating recent CURRENT, x11/nvidia-driver (nvidia-modeset) fails to load. Setting both debug.link_elf_leak_locals=1 debug.link_elf_obj_leak_locals=1 in /etc/sysctl.conf results in a stuck system: No graphics, stuck keyboard (no change to console possible). Shutting down the box leaves me with a stuck system (need to shutoff power the hard way, no reboot). Regards, oliver