From nobody Sat Jul 29 08:05:06 2023 X-Original-To: freebsd-current@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 4RCcVz2fghz4qFFS for ; Sat, 29 Jul 2023 08:05:15 +0000 (UTC) (envelope-from bsd@orsolic.org) Received: from mail-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RCcVx0NTbz3hdt for ; Sat, 29 Jul 2023 08:05:12 +0000 (UTC) (envelope-from bsd@orsolic.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=orsolic.org header.s=protonmail header.b=o9itt2YD; spf=none (mx1.freebsd.org: domain of bsd@orsolic.org has no SPF policy when checking 185.70.43.23) smtp.mailfrom=bsd@orsolic.org; dmarc=pass (policy=none) header.from=orsolic.org Date: Sat, 29 Jul 2023 08:05:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orsolic.org; s=protonmail; t=1690617908; x=1690877108; bh=lfSGJeUUPqkl4AFRHh88KeYLG0108Wd87p5uOj24WxQ=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=o9itt2YDzOpEKl0u8fQEQs0GkuiObDmSuKMdlUQIhfQWYsW9NWdtE1TVWU77kxG0N NLGjEZ3aqKZ5d1xZiKR0WozQERlkQb8fVYgWQW5Kt5u5UOSB4+5QKG1H+D9Bdg0BkK ZSVBM8sIPnFX/nT60yxVDeJnnVkJELf27rWEmFVN2esPhp2Pd+ZNu5bKz8M9XtTUO7 fRnSsVPZLx1JBWfaJLg9SeLPp3Zk2JCxYWiq+uEpxIqNBwUk4GiF+r1VbNsXJUBG5f 03sL90RfYuvYTCA7WQUKnppHQJOdCvvTPoq+xdCWYWse9mGQgh6pHnFjMCPo+hvLM2 /tzGhdmKcgc6w== To: "freebsd-current@freebsd.org" From: Pero Orsolic Subject: CURRENT with ZFS not bootable when built with LLVM from ports Message-ID: Feedback-ID: 80848137:user:proton List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-4.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[orsolic.org,none]; RWL_MAILSPIKE_EXCELLENT(-0.40)[185.70.43.23:from]; R_DKIM_ALLOW(-0.20)[orsolic.org:s=protonmail]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+]; TO_DN_EQ_ADDR_ALL(0.00)[]; DKIM_TRACE(0.00)[orsolic.org:+]; RCPT_COUNT_ONE(0.00)[1]; FREEFALL_USER(0.00)[bsd]; ASN(0.00)[asn:62371, ipnet:185.70.43.0/24, country:CH]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4RCcVx0NTbz3hdt X-Spamd-Bar: ---- Building -CURRENT (2023-07-17 be4c7f273508) without system compiler (with L= LVM16 from ports) results in unbootable system:Preloaded elf kernel "/boot/= kernel/kernel" at 0xffffffff82328000. Preloaded elf obj module "/boot/kernel/zfs.ko" at 0xffffffff82329090. Preloaded boot_entropy_cache "/boot/entropy" at 0xffffffff823298f8. Preloaded elf obj module "/boot/kernel/cryptodev.ko" at 0xffffffff82329950. Preloaded hostuuid "/etc/hostid" at 0xffffffff8232a140. kldload: unexpected relocation type 42, symbol index 8662 link_elf_obj: symbol __stack_chk_guard undefined KLD file zfs.ko - could not finalize loading Patching and rebuilding LLVM16 with this patch results in bootable system: Patch was taken from: https://cgit.freebsd.org/src/commit/?h=3Dstable/13&id=3De8e5d75e6a9676e76c3= bfd6d1d52561ffbb40846 Few months ago it was possible to use LLVM from ports to build kernel and w= orld, but I don't remember the details. This patch was tested in bhyve VM and on real hardware. On real hardware it was possible to boot system without patched compiler wh= en zfs.ko (options ZFS and GEOM_ELI with devices crypto and cryptodev) is b= uilt into the kernel. But then other modules (acpi_ibm, iic, drm, i915kms, acpi_video, ... pf, va= rious ng_* and so on) will fail to load with same reason. Didn't try including zfs.ko into the kernel in the VM. Bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272740