From nobody Thu Aug 11 18:45:47 2022 X-Original-To: dev-commits-src-all@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 4M3bNl0MJ8z4Y2SH for ; Thu, 11 Aug 2022 18:45:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe36.google.com (mail-vs1-xe36.google.com [IPv6:2607:f8b0:4864:20::e36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M3bNl01kLz4MTW for ; Thu, 11 Aug 2022 18:45:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe36.google.com with SMTP id m67so19112878vsc.12 for ; Thu, 11 Aug 2022 11:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=pepEWBHNjBaO6Rfj0RCroYkgnXW2mnMKhD1Jvw2sJkA=; b=cHKrrcmVxmfgJbffQefqqH5wm3t1p4t00S3jOKeMjiwSwNC1IhVmx2anMUctFZvANC IcY1XQmN57r7dMPQEEoguAplFZ44MdL9gtaeDABoo9qdKJDz2Q+5KtVDSkuItAFLVnXI 6AzGYfgAUx5NXV0tEZYHDjPnazDfH6+H6eihlyleFgnn6IWdL8oa3x0EHI6E9+8cTXR/ pIKso0q7C0sEOcYDp5owcGiYMdHGfRA+0cpP/Rqf6W4tOzneAKypKWozVweKGbXC+hK/ lF9t5SQosGUjWsaRhkccAPIYQg6SE7n+LOLmPIYelH5eOAw7ZzhCcVP1W/InK9wa75s4 hq4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=pepEWBHNjBaO6Rfj0RCroYkgnXW2mnMKhD1Jvw2sJkA=; b=K6GX/I8yQAF4tHB7sfvYsogRm23xj3AiBVV0/Wtz18DMrPEzF0f+/QiRQ5Su/mfm9y vOvuFpwWQun8CZGJIFlDX2ouzRUZJGCFhzgmCqvZ9tvh87T6hovYtF/yQdmTbEwhGg8+ KZFdSkckRwewuOUBwAf5m5zNeTjJss8emOI/MDmOmJCddxaPa9waHzt5HZ7zv1Qn3Nq0 /gMSkYo92UzZD5M6PxWcnUQbhtExxlo0dRp+TUZVrcRLrgaJyIfFlTbWLGHEFJ8bJJOP ArbwgSq6mMnGDXOD++t8EX0DfOjc2JT1IUHwuwUr/9d0df9wLt7oshegl8Ly8Wg9Yncu xqrg== X-Gm-Message-State: ACgBeo0ILiEWcyYEequSIXtPQr6KQImuT0kIJYJrOHt2aBr/qinO7HUO C29eL+qegJpVPQZEVSAfQ465LoGddHUCIqHRX1KMbw== X-Google-Smtp-Source: AA6agR4V/xtjAJMt+2FxnGRWW9jr5jIWbfAISoNVG8HH9Qyeltd65wjkL794mrpXXFEF01ERGpE2i5IH7g4Zzg10rKM= X-Received: by 2002:a05:6102:1494:b0:37e:2dc5:870d with SMTP id d20-20020a056102149400b0037e2dc5870dmr309206vsv.6.1660243558064; Thu, 11 Aug 2022 11:45:58 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202208110331.27B3Va7M007335@gitrepo.freebsd.org> <20220811202204.106f7188@thor.intern.walstatt.dynvpn.de> <20220811204324.00b64b02@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20220811204324.00b64b02@thor.intern.walstatt.dynvpn.de> From: Warner Losh Date: Thu, 11 Aug 2022 12:45:47 -0600 Message-ID: Subject: Re: git: 39fdad34e220 - main - stand: impose 510,000 byte limit for /boot/loader and /boot/pxeldr To: FreeBSD User Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000084f8fb05e5fb93bd" X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Rspamd-Queue-Id: 4M3bNl01kLz4MTW X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --00000000000084f8fb05e5fb93bd Content-Type: text/plain; charset="UTF-8" On Thu, Aug 11, 2022 at 12:43 PM FreeBSD User wrote: > Am Thu, 11 Aug 2022 12:23:59 -0600 > Warner Losh schrieb: > > > On Thu, Aug 11, 2022 at 12:22 PM FreeBSD User > > wrote: > > > > > Am Thu, 11 Aug 2022 03:31:36 GMT > > > Warner Losh schrieb: > > > > > > > The branch main has been updated by imp: > > > > > > > > URL: > > > > https://cgit.FreeBSD.org/src/commit/?id=39fdad34e220c52a433e78f20c8c39412429014e > > > > > > > > > commit 39fdad34e220c52a433e78f20c8c39412429014e > > > > Author: Warner Losh > > > > AuthorDate: 2022-08-11 03:19:01 +0000 > > > > Commit: Warner Losh > > > > CommitDate: 2022-08-11 03:29:20 +0000 > > > > > > > > stand: impose 510,000 byte limit for /boot/loader and > /boot/pxeldr > > > > > > > > The BIOS method of booting imposes an absolute limit of 640k for > the > > > > size of the program being run due to btx. In practice, this > means > > > that > > > > programs larger than about 500kiB will fail in odd ways as the > stack > > > / > > > > heap will overflow. > > > > > > > > Pick 510,000 as the cutoff line semi-arbitrarily. loader_lua is > now > > > > almost too big and we want to break the build when it crosses > this > > > > threshold. In my experience, below 500,000 always works, above > > > 520,000 > > > > always seems to fail with things getting bad somewhere between > > > 512,000 > > > > to 515,000. 510,000 is as close to the line as I think we can > go, > > > though > > > > experience may dictate we need to lower this in the future. > > > > > > > > This is at-best a stop-breakage until we have a better way to > subset > > > the > > > > boot loader for BIOS booting to allow better, more fined-tuned > > > > /boot/loaders for the many different environments they have to > run > > > > in. This likely means we'll have a graphical loader than > understands > > > a > > > > few filesystmes for installation, and a non-graphical loader that > > > > understands the most filesystems possible for everything else in > the > > > > future. Our build infrastructure needs some work before we can > do > > > that, > > > > however. > > > > > > > > At this late date, it likely isn't worth the efforts to move > parts of > > > > the loader into high memory. There's a number of assumptions > about > > > where > > > > the stack is, where buffers reside, etc that are fulfilled when > it > > > lives > > > > in the first 640k that would need bounce buffers and/or other > counter > > > > measures if we were to split it up. All BIOS calls are done in > 16-bit > > > > mode with SEG:OFF addresses, requiring them to be in the first > 640k > > > of > > > > RAM. And nearly all machines in the last decade can boot with > UEFI > > > > (though there's some exceptions, so it isn't worth killing > outright > > > > yet). > > > > > > > > Sponsored by: Netflix > > > > Reviewed by: kevans > > > > Differential Revision: https://reviews.freebsd.org/D36129 > > > > --- > > > > stand/i386/loader/Makefile | 5 +++++ > > > > stand/i386/pxeldr/Makefile | 3 +++ > > > > 2 files changed, 8 insertions(+) > > > > > > > > diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile > > > > index 3685281ffd2c..cde1513aac06 100644 > > > > --- a/stand/i386/loader/Makefile > > > > +++ b/stand/i386/loader/Makefile > > > > @@ -19,6 +19,8 @@ PROG= ${LOADER}.sym > > > > INTERNALPROG= > > > > NEWVERSWHAT?= "bootstrap loader" x86 > > > > VERSION_FILE= ${.CURDIR}/../loader/version > > > > +LOADERSIZE= 510000 # Largest known safe size > > > > + > > > > > > > > .PATH: ${BOOTSRC}/i386/loader > > > > > > > > @@ -79,9 +81,12 @@ CFLAGS+= -I${BOOTSRC}/i386 > > > > 8x16.c: ${SRCTOP}/contrib/terminus/ter-u16b.bdf > > > > vtfontcvt -f compressed-source -o ${.TARGET} ${.ALLSRC} > > > > > > > > + > > > > ${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN} > > > > btxld -v -f elf -e ${LOADER_ADDRESS} -o ${.TARGET} -l > ${BTXLDR} \ > > > > -b ${BTXKERN} ${LOADER}.bin > > > > + @set -- `${SIZE} ${.TARGET} | tail -1` ; > > > x=$$((${LOADERSIZE}-$$4)); \ > > > > + echo "$$x bytes available"; test $$x -ge 0 > > > > > > > > ${LOADER}.bin: ${LOADER}.sym > > > > ${STRIPBIN} -R .comment -R .note -o ${.TARGET} ${.ALLSRC} > > > > diff --git a/stand/i386/pxeldr/Makefile b/stand/i386/pxeldr/Makefile > > > > index a44dc0de2885..f8bc1eae9a31 100644 > > > > --- a/stand/i386/pxeldr/Makefile > > > > +++ b/stand/i386/pxeldr/Makefile > > > > @@ -13,6 +13,7 @@ BOOT= pxeboot > > > > LDR= pxeldr > > > > ORG= 0x7c00 > > > > LOADER= loader > > > > +PXELDRSIZE= 510000 # Largest known safe size > > > > > > > > .if defined(BOOT_PXELDR_PROBE_KEYBOARD) > > > > CFLAGS+=-DPROBE_KEYBOARD > > > > @@ -41,5 +42,7 @@ CLEANFILES+= ${LOADER} > > > > ${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} > > > > btxld -v -f elf -e ${LOADER_ADDRESS} -o ${.TARGET} -l > ${BTXLDR} \ > > > > -b ${BTXKERN} ${LOADERBIN} > > > > + @set -- `${SIZE} ${.TARGET} | tail -1` ; > > > x=$$((${PXELDRSIZE}-$$4)); \ > > > > + echo "$$x bytes available"; test $$x -ge 0 > > > > > > > > .include > > > > > > > > > > On recent CURRENT (FreeBSD 14.0-CURRENT #10 main-n257258-348164aa9e5d: > Wed > > > Aug 10 22:39:17 > > > CEST 2022 amd64), buildworld fails here on several boxes: > > > > > > [...] > > > > > > ===> lib/flua/libjail (all) > > > --- all_subdir_stand --- > > > --- loader --- > > > btxld -v -f elf -e 0x200000 -o loader -l > > > /usr/obj/usr/src/amd64.amd64/stand/i386/btx/btxldr/btxldr -b > > > /usr/obj/usr/src/amd64.amd64/stand/i386/btx/btx/btx > > > /usr/obj/usr/src/amd64.amd64/stand/i386/loader_lua/loader_lua.bin > kernel: > > > ver=1.02 size=690 > > > load=9000 entry=9010 map=16M pgctl=0:84 client: fmt=elf size=8a3f0 > > > text=836bc data=5238 > > > bss=8070 entry=0 output: fmt=elf size=8ae39 text=289 data=8aa80 > org=200000 > > > entry=200000 > > > -58585 bytes available 6.64 real > > > 8.48 user 2.84 sys > > > > > > > I'm sorry, but however you are building /boot/loader, it won't work when > > it's that big. What are your settings that increase its size by so much? > > > > Warner > > Hello, > I have a custom kernel with several drivers enabled, others disabled, but > I'm not aware of any > knowb I triggered by purpose that could change the size. Can you help me > with some hints which > knobs this might trigger? Since it happens on ALL boxes with CURRENT and > different but similar > custom kernel settings (mostly driver and disabling debugging et cetera it > must be something > very trivial that triggers that misbehaviour ... I doubt that kernel > config is the cause, but > anyway, I'll give you some extra configs I put on one box that fails: > The kernel.conf isn't used at all. What do you have on /etc/src.conf, etc that's the only thing that will control this. Warner > [... kernel conf ...] > > # The defaults are 64K and 128K respectively. > options DFLTPHYS=(64*1024) > #options MAXPHYS=(512*1024) > options MAXPHYS=(1024*1024) > > options CC_CDG > options CC_CHD > options CC_CUBIC > options CC_DCTCP > options CC_HD > options CC_HTCP > options CC_VEGAS > options RATELIMIT # TX rate > > options ZFS # ZFS > options GEOM_NOP # NOP GEOM class > options GEOM_ELI > > options LIBICONV # kernels iconv > options LIBMCHAIN # mchain library > options KGSSAPI # Kernel GSS API modulue > > options MSDOSFS_ICONV # MSDOS Filesystem > options CD9660_ICONV # ISO 9660 Filesystem > > options FDESCFS #File descriptor filesystem > options FUSEFS #FUSE support module > options AUTOFS # automounter filesystem > options NULLFS > > #options P1003_1B_SEMAPHORES # POSIX-style semaphores > #options P1003_1B_MQUEUE # POSIX message queue > > options TCPHPTS # TCP High > Precission timer > #options TCPPCAP # keeps the last n packets > #options MROUTING # Multicast routing > options IPSEC # Internet Protocol > Security protocol > #options TCP_SIGNATURE # #include support for RFC > 2385 > options SCTP # Stream Control Transmission > Protocol > > # > options MAC_BSDEXTENDED # ugidfw > options MAC_PORTACL # > options MAC_NTPD # > # > options CAM_IOSCHED_DYNAMIC # CAM iosched NCQ TRIM > > > -- > O. Hartmann > --00000000000084f8fb05e5fb93bd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Aug 11, 2022 at 12:43 PM Free= BSD User <freebsd@walstatt-de.= de> wrote:
imp@bsd= imp.com> schrieb:

> On Thu, Aug 11, 2022 at 12:22 PM FreeBSD User <freebsd@walstatt-de.de>
> wrote:
>
> > Am Thu, 11 Aug 2022 03:31:36 GMT
> > Warner Losh <imp@FreeBSD.org> schrieb:
> >=C2=A0
> > > The branch main has been updated by imp:
> > >
> > > URL:=C2=A0
> > https://= cgit.FreeBSD.org/src/commit/?id=3D39fdad34e220c52a433e78f20c8c39412429014e<= /a>=C2=A0
> > >
> > > commit 39fdad34e220c52a433e78f20c8c39412429014e
> > > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org&g= t;
> > > AuthorDate: 2022-08-11 03:19:01 +0000
> > > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org&g= t;
> > > CommitDate: 2022-08-11 03:29:20 +0000
> > >
> > >=C2=A0 =C2=A0 =C2=A0stand: impose 510,000 byte limit for /boo= t/loader and /boot/pxeldr
> > >
> > >=C2=A0 =C2=A0 =C2=A0The BIOS method of booting imposes an abs= olute limit of 640k for the
> > >=C2=A0 =C2=A0 =C2=A0size of the program being run due to btx.= In practice, this means=C2=A0
> > that=C2=A0
> > >=C2=A0 =C2=A0 =C2=A0programs larger than about 500kiB will fa= il in odd ways as the stack=C2=A0
> > /=C2=A0
> > >=C2=A0 =C2=A0 =C2=A0heap will overflow.
> > >
> > >=C2=A0 =C2=A0 =C2=A0Pick 510,000 as the cutoff line semi-arbi= trarily. loader_lua is now
> > >=C2=A0 =C2=A0 =C2=A0almost too big and we want to break the b= uild when it crosses this
> > >=C2=A0 =C2=A0 =C2=A0threshold. In my experience, below 500,00= 0 always works, above=C2=A0
> > 520,000=C2=A0
> > >=C2=A0 =C2=A0 =C2=A0always seems to fail with things getting = bad somewhere between=C2=A0
> > 512,000=C2=A0
> > >=C2=A0 =C2=A0 =C2=A0to 515,000. 510,000 is as close to the li= ne as I think we can go,=C2=A0
> > though=C2=A0
> > >=C2=A0 =C2=A0 =C2=A0experience may dictate we need to lower t= his in the future.
> > >
> > >=C2=A0 =C2=A0 =C2=A0This is at-best a stop-breakage until we = have a better way to subset=C2=A0
> > the=C2=A0
> > >=C2=A0 =C2=A0 =C2=A0boot loader for BIOS booting to allow bet= ter, more fined-tuned
> > >=C2=A0 =C2=A0 =C2=A0/boot/loaders for the many different envi= ronments they have to run
> > >=C2=A0 =C2=A0 =C2=A0in. This likely means we'll have a gr= aphical loader than understands=C2=A0
> > a=C2=A0
> > >=C2=A0 =C2=A0 =C2=A0few filesystmes for installation, and a n= on-graphical loader that
> > >=C2=A0 =C2=A0 =C2=A0understands the most filesystems possible= for everything else in the
> > >=C2=A0 =C2=A0 =C2=A0future. Our build infrastructure needs so= me work before we can do=C2=A0
> > that,=C2=A0
> > >=C2=A0 =C2=A0 =C2=A0however.
> > >
> > >=C2=A0 =C2=A0 =C2=A0At this late date, it likely isn't wo= rth the efforts to move parts of
> > >=C2=A0 =C2=A0 =C2=A0the loader into high memory. There's = a number of assumptions about=C2=A0
> > where=C2=A0
> > >=C2=A0 =C2=A0 =C2=A0the stack is, where buffers reside, etc t= hat are fulfilled when it=C2=A0
> > lives=C2=A0
> > >=C2=A0 =C2=A0 =C2=A0in the first 640k that would need bounce = buffers and/or other counter
> > >=C2=A0 =C2=A0 =C2=A0measures if we were to split it up. All B= IOS calls are done in 16-bit
> > >=C2=A0 =C2=A0 =C2=A0mode with SEG:OFF addresses, requiring th= em to be in the first 640k=C2=A0
> > of=C2=A0
> > >=C2=A0 =C2=A0 =C2=A0RAM. And nearly all machines in the last = decade can boot with UEFI
> > >=C2=A0 =C2=A0 =C2=A0(though there's some exceptions, so i= t isn't worth killing outright
> > >=C2=A0 =C2=A0 =C2=A0yet).
> > >
> > >=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0Netflix
> > >=C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 kevans
> > >=C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0
htt= ps://reviews.freebsd.org/D36129
> > > ---
> > >=C2=A0 stand/i386/loader/Makefile | 5 +++++
> > >=C2=A0 stand/i386/pxeldr/Makefile | 3 +++
> > >=C2=A0 2 files changed, 8 insertions(+)
> > >
> > > diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/= Makefile
> > > index 3685281ffd2c..cde1513aac06 100644
> > > --- a/stand/i386/loader/Makefile
> > > +++ b/stand/i386/loader/Makefile
> > > @@ -19,6 +19,8 @@ PROG=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0${LOADER}.sym
> > >=C2=A0 INTERNALPROG=3D
> > >=C2=A0 NEWVERSWHAT?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 "boots= trap loader" x86
> > >=C2=A0 VERSION_FILE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 ${.CURDIR}/= ../loader/version
> > > +LOADERSIZE=3D=C2=A0 510000=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 # Largest known safe size
> > > +
> > >
> > >=C2=A0 .PATH:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0${BOOTSRC}/i386/loader
> > >
> > > @@ -79,9 +81,12 @@ CFLAGS+=3D=C2=A0 =C2=A0-I${BOOTSRC}/i386<= br> > > >=C2=A0 8x16.c: ${SRCTOP}/contrib/terminus/ter-u16b.bdf
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0vtfontcvt -f compressed-source -o = ${.TARGET} ${.ALLSRC}
> > >
> > > +
> > >=C2=A0 ${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0btxld -v -f elf -e ${LOADER_ADDRES= S} -o ${.TARGET} -l ${BTXLDR} \
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-b ${B= TXKERN} ${LOADER}.bin
> > > +=C2=A0 =C2=A0 =C2=A0@set -- `${SIZE} ${.TARGET} | tail -1` = ;=C2=A0
> > x=3D$$((${LOADERSIZE}-$$4)); \=C2=A0
> > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0echo "$$x bytes avai= lable"; test $$x -ge 0
> > >
> > >=C2=A0 ${LOADER}.bin: ${LOADER}.sym
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0${STRIPBIN} -R .comment -R .note -= o ${.TARGET} ${.ALLSRC}
> > > diff --git a/stand/i386/pxeldr/Makefile b/stand/i386/pxeldr/= Makefile
> > > index a44dc0de2885..f8bc1eae9a31 100644
> > > --- a/stand/i386/pxeldr/Makefile
> > > +++ b/stand/i386/pxeldr/Makefile
> > > @@ -13,6 +13,7 @@ BOOT=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0pxeboot<= br> > > >=C2=A0 LDR=3D pxeldr
> > >=C2=A0 ORG=3D 0x7c00
> > >=C2=A0 LOADER=3D=C2=A0 =C2=A0 =C2=A0 loader
> > > +PXELDRSIZE=3D 510000=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0# Largest known safe size
> > >
> > >=C2=A0 .if defined(BOOT_PXELDR_PROBE_KEYBOARD)
> > >=C2=A0 CFLAGS+=3D-DPROBE_KEYBOARD
> > > @@ -41,5 +42,7 @@ CLEANFILES+=3D ${LOADER}
> > >=C2=A0 ${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN}
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0btxld -v -f elf -e ${LOADER_ADDRES= S} -o ${.TARGET} -l ${BTXLDR} \
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-b ${BTXKERN} ${LOAD= ERBIN}
> > > +=C2=A0 =C2=A0 =C2=A0@set -- `${SIZE} ${.TARGET} | tail -1` = ;=C2=A0
> > x=3D$$((${PXELDRSIZE}-$$4)); \=C2=A0
> > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0echo "$$x bytes avai= lable"; test $$x -ge 0
> > >
> > >=C2=A0 .include <bsd.prog.mk>
> > >=C2=A0
> >
> > On recent CURRENT (FreeBSD 14.0-CURRENT #10 main-n257258-348164aa= 9e5d: Wed
> > Aug 10 22:39:17
> > CEST 2022 amd64), buildworld fails here on several boxes:
> >
> > [...]
> >=C2=A0
> > =3D=3D=3D> lib/flua/libjail (all)=C2=A0
> > --- all_subdir_stand ---
> > --- loader ---
> > btxld -v -f elf -e 0x200000 -o loader -l
> > /usr/obj/usr/src/amd64.amd64/stand/i386/btx/btxldr/btxldr=C2=A0 -= b
> > /usr/obj/usr/src/amd64.amd64/stand/i386/btx/btx/btx
> > /usr/obj/usr/src/amd64.amd64/stand/i386/loader_lua/loader_lua.bin= kernel:
> > ver=3D1.02 size=3D690
> > load=3D9000 entry=3D9010 map=3D16M pgctl=3D0:84 client: fmt=3Delf= size=3D8a3f0
> > text=3D836bc data=3D5238
> > bss=3D8070 entry=3D0 output: fmt=3Delf size=3D8ae39 text=3D289 da= ta=3D8aa80 org=3D200000
> > entry=3D200000
> > -58585 bytes available 6.64 real
> > 8.48 user=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02.84 sys
> >=C2=A0
>
> I'm sorry, but however you are building /boot/loader, it won't= work when
> it's that big. What are your settings that increase its size by so= much?
>
> Warner

Hello,
I have a custom kernel with several drivers enabled, others disabled, but I= 'm not aware of any
knowb I triggered by purpose that could change the size. Can you help me wi= th some hints which
knobs this might trigger? Since it happens on ALL boxes with CURRENT and di= fferent but similar
custom kernel settings (mostly driver and disabling debugging et cetera it = must be something
very trivial that triggers that misbehaviour ... I doubt that kernel config= is the cause, but
anyway, I'll give you some extra configs I put on one box that fails:

The kernel.conf isn't used at all.

What do you have on /etc/src.conf, etc that's t= he only thing that will control this.

Warner
=
=C2=A0
[... kernel conf ...]

# The defaults are 64K and 128K respectively.
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0DFLTPH= YS=3D(64*1024)
#options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 MAXPHYS=3D(512*1024)
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MAXPHY= S=3D(1024*1024)

options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_CDG
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_CHD
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_CUBIC
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_DCTCP
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_HD
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_HTCP
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_VEGAS
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0RATELIMIT=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# TX rate

options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ZFS=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0# ZFS
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0GEOM_NOP=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # NOP GEOM class
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0GEOM_E= LI

options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0LIBICONV=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # kernels iconv
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0LIBMCHAIN=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# mchain library
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0KGSSAPI=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Kernel GSS API modulue

options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MSDOSFS_ICONV=C2=A0 =C2=A0# MSDOS = Filesystem
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CD9660_ICONV=C2=A0 =C2=A0 # ISO 96= 60 Filesystem

options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FDESCFS=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#File descriptor filesystem
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FUSEFS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #FUSE support module
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0AUTOFS=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # automounter filesystem
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0NULLFS

#options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 P1003_1B_SE= MAPHORES=C2=A0 =C2=A0 =C2=A0# POSIX-style semaphores
#options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 P1003_1B_MQ= UEUE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# POSIX message queue

options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TCPHPTS=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0# TCP High Precission timer
#options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 TCPPCAP=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# keeps the last= n packets
#options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 MROUTING=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Multicast routing options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0IPSEC= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Inte= rnet Protocol Security protocol
#options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 TCP_SIGNATURE=C2=A0 =C2=A0# #include support for RFC 2385=
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0SCTP= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Stream Control Transmission Pro= tocol

#
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MAC_BSDEXTENDED=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0# ugidfw
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MAC_PORTACL=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0#
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MAC_NTPD=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #
#
options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CAM_IOSCHED_DYNAMIC=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# CAM iosched NCQ TRIM


--
O. Hartmann
--00000000000084f8fb05e5fb93bd--