Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Aug 2022 12:46:46 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        FreeBSD User <freebsd@walstatt-de.de>
Cc:        Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>,  "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org
Subject:   Re: git: 39fdad34e220 - main - stand: impose 510,000 byte limit for /boot/loader and /boot/pxeldr
Message-ID:  <CANCZdfp5Fog8cVy1fj67zttLsxZKmVHqRFqU0xUk2AwRMCSH_Q@mail.gmail.com>
In-Reply-To: <20220811204518.452625ea@thor.intern.walstatt.dynvpn.de>
References:  <202208110331.27B3Va7M007335@gitrepo.freebsd.org> <20220811202204.106f7188@thor.intern.walstatt.dynvpn.de> <CANCZdfq-Nr2%2B48dJhBq7jz%2BK6iBpGzRko21j3vwgGfNP81JKcA@mail.gmail.com> <20220811204324.00b64b02@thor.intern.walstatt.dynvpn.de> <20220811204518.452625ea@thor.intern.walstatt.dynvpn.de>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000000fc18d05e5fb9709
Content-Type: text/plain; charset="UTF-8"

On Thu, Aug 11, 2022 at 12:45 PM FreeBSD User <freebsd@walstatt-de.de>
wrote:

> Am Thu, 11 Aug 2022 20:42:57 +0200
> FreeBSD User <freebsd@walstatt-de.de> schrieb:
>
> > Am Thu, 11 Aug 2022 12:23:59 -0600
> > Warner Losh <imp@bsdimp.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:
> > > >
> > > > > The branch main has been updated by imp:
> > > > >
> > > > > URL:
> > > >
> https://cgit.FreeBSD.org/src/commit/?id=39fdad34e220c52a433e78f20c8c39412429014e
>
> > > > >
> > > > > commit 39fdad34e220c52a433e78f20c8c39412429014e
> > > > > Author:     Warner Losh <imp@FreeBSD.org>
> > > > > AuthorDate: 2022-08-11 03:19:01 +0000
> > > > > Commit:     Warner Losh <imp@FreeBSD.org>
> > > > > 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 <bsd.prog.mk>
> > > > >
> > > >
> > > > 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:
> >
> > [... 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
> >
> >
> The src.conf:
>
> # more /etc/src.conf
> #
> CPUTYPE?=                       native
> #
> CFLAGS+=                        -O3
> # for the kernel
> COPTFLAGS+=                     -O3
> #
> #CXXFLAGS+=                     -std=c++20
> #
> WITH_CLANG_EXTRAS=              YES
> #WITH_LLVM_BINUTILS=            YES
> #
> #WITH_BSD_GREP=                 YES
> #
> WITH_OFED_EXTRA=                YES
> #WITH_CTF=                              YES
> #
> WITH_BEARSSL=                   YES
>

I think this is the only thing that will affect things. what happens if you
turn this off?

Warner

#
> WITH_SORT_THREADS=              YES
> #
> WITH_ZONEINFO_LEAPSECONDS_SUPPORT=      YES
> #
> WITH_MALLOC_PRODUCTION= YES
> #
> WITHOUT_ASSERT_DEBUG=   YES
> WITHOUT_TESTS=          YES
> WITHOUT_DEBUG_FILES=    YES
> #
> WITHOUT_CLEAN=                  YES
> #
> WITHOUT_REPRODUCIBLE_BUILD=     YES
> #
> INSTALL_NODEBUG=                YES
> #
>
>
>
>
> --
> O. Hartmann
>

--0000000000000fc18d05e5fb9709
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Thu, Aug 11, 2022 at 12:45 PM Free=
BSD User &lt;<a href=3D"mailto:freebsd@walstatt-de.de">freebsd@walstatt-de.=
de</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex=
">Am Thu, 11 Aug 2022 20:42:57 +0200<br>
FreeBSD User &lt;<a href=3D"mailto:freebsd@walstatt-de.de" target=3D"_blank=
">freebsd@walstatt-de.de</a>&gt; schrieb:<br>
<br>
&gt; Am Thu, 11 Aug 2022 12:23:59 -0600<br>
&gt; Warner Losh &lt;<a href=3D"mailto:imp@bsdimp.com" target=3D"_blank">im=
p@bsdimp.com</a>&gt; schrieb:<br>
&gt; <br>
&gt; &gt; On Thu, Aug 11, 2022 at 12:22 PM FreeBSD User &lt;<a href=3D"mail=
to:freebsd@walstatt-de.de" target=3D"_blank">freebsd@walstatt-de.de</a>&gt;=
<br>
&gt; &gt; wrote:<br>
&gt; &gt;=C2=A0 =C2=A0<br>
&gt; &gt; &gt; Am Thu, 11 Aug 2022 03:31:36 GMT<br>
&gt; &gt; &gt; Warner Losh &lt;imp@FreeBSD.org&gt; schrieb:<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt; The branch main has been updated by imp:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; URL:=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D39fdad3=
4e220c52a433e78f20c8c39412429014e" rel=3D"noreferrer" target=3D"_blank">htt=
ps://cgit.FreeBSD.org/src/commit/?id=3D39fdad34e220c52a433e78f20c8c39412429=
014e</a>=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; commit 39fdad34e220c52a433e78f20c8c39412429014e<br>
&gt; &gt; &gt; &gt; Author:=C2=A0 =C2=A0 =C2=A0Warner Losh &lt;imp@FreeBSD.=
org&gt;<br>
&gt; &gt; &gt; &gt; AuthorDate: 2022-08-11 03:19:01 +0000<br>
&gt; &gt; &gt; &gt; Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh &lt;imp@FreeBSD.=
org&gt;<br>
&gt; &gt; &gt; &gt; CommitDate: 2022-08-11 03:29:20 +0000<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0stand: impose 510,000 byte limit for=
 /boot/loader and /boot/pxeldr<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0The BIOS method of booting imposes a=
n absolute limit of 640k for the<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0size of the program being run due to=
 btx. In practice, this means=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; that=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0programs larger than about 500kiB wi=
ll fail in odd ways as the stack=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; /=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0heap will overflow.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0Pick 510,000 as the cutoff line semi=
-arbitrarily. loader_lua is now<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0almost too big and we want to break =
the build when it crosses this<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0threshold. In my experience, below 5=
00,000 always works, above=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; 520,000=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0always seems to fail with things get=
ting bad somewhere between=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; 512,000=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0to 515,000. 510,000 is as close to t=
he line as I think we can go,=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; though=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0experience may dictate we need to lo=
wer this in the future.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0This is at-best a stop-breakage unti=
l we have a better way to subset=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; the=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0boot loader for BIOS booting to allo=
w better, more fined-tuned<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0/boot/loaders for the many different=
 environments they have to run<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0in. This likely means we&#39;ll have=
 a graphical loader than understands=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; a=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0few filesystmes for installation, an=
d a non-graphical loader that<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0understands the most filesystems pos=
sible for everything else in the<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0future. Our build infrastructure nee=
ds some work before we can do=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; that,=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0however.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0At this late date, it likely isn&#39=
;t worth the efforts to move parts of<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0the loader into high memory. There&#=
39;s a number of assumptions about=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; where=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0the stack is, where buffers reside, =
etc that are fulfilled when it=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; lives=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0in the first 640k that would need bo=
unce buffers and/or other counter<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0measures if we were to split it up. =
All BIOS calls are done in 16-bit<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0mode with SEG:OFF addresses, requiri=
ng them to be in the first 640k=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; of=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0RAM. And nearly all machines in the =
last decade can boot with UEFI<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0(though there&#39;s some exceptions,=
 so it isn&#39;t worth killing outright<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0yet).<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0Netflix<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 kevans<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0 <a href=
=3D"https://reviews.freebsd.org/D36129" rel=3D"noreferrer" target=3D"_blank=
">https://reviews.freebsd.org/D36129</a><br>;
&gt; &gt; &gt; &gt; ---<br>
&gt; &gt; &gt; &gt;=C2=A0 stand/i386/loader/Makefile | 5 +++++<br>
&gt; &gt; &gt; &gt;=C2=A0 stand/i386/pxeldr/Makefile | 3 +++<br>
&gt; &gt; &gt; &gt;=C2=A0 2 files changed, 8 insertions(+)<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; diff --git a/stand/i386/loader/Makefile b/stand/i386/lo=
ader/Makefile<br>
&gt; &gt; &gt; &gt; index 3685281ffd2c..cde1513aac06 100644<br>
&gt; &gt; &gt; &gt; --- a/stand/i386/loader/Makefile<br>
&gt; &gt; &gt; &gt; +++ b/stand/i386/loader/Makefile<br>
&gt; &gt; &gt; &gt; @@ -19,6 +19,8 @@ PROG=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0${LOADER}.sym<br>
&gt; &gt; &gt; &gt;=C2=A0 INTERNALPROG=3D<br>
&gt; &gt; &gt; &gt;=C2=A0 NEWVERSWHAT?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;=
bootstrap loader&quot; x86<br>
&gt; &gt; &gt; &gt;=C2=A0 VERSION_FILE=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 ${.CUR=
DIR}/../loader/version<br>
&gt; &gt; &gt; &gt; +LOADERSIZE=3D=C2=A0 510000=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 # Largest known safe size<br>
&gt; &gt; &gt; &gt; +<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;=C2=A0 .PATH:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0${BOOTSRC}/i386/loader<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; @@ -79,9 +81,12 @@ CFLAGS+=3D=C2=A0 =C2=A0-I${BOOTSRC}/=
i386<br>
&gt; &gt; &gt; &gt;=C2=A0 8x16.c: ${SRCTOP}/contrib/terminus/ter-u16b.bdf<b=
r>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0vtfontcvt -f compressed-sourc=
e -o ${.TARGET} ${.ALLSRC}<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; +<br>
&gt; &gt; &gt; &gt;=C2=A0 ${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0btxld -v -f elf -e ${LOADER_A=
DDRESS} -o ${.TARGET} -l ${BTXLDR} \<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-=
b ${BTXKERN} ${LOADER}.bin<br>
&gt; &gt; &gt; &gt; +=C2=A0 =C2=A0 =C2=A0@set -- `${SIZE} ${.TARGET} | tail=
 -1` ;=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; x=3D$$((${LOADERSIZE}-$$4)); \=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0echo &quot;$$x bytes=
 available&quot;; test $$x -ge 0<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;=C2=A0 ${LOADER}.bin: ${LOADER}.sym<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0${STRIPBIN} -R .comment -R .n=
ote -o ${.TARGET} ${.ALLSRC}<br>
&gt; &gt; &gt; &gt; diff --git a/stand/i386/pxeldr/Makefile b/stand/i386/px=
eldr/Makefile<br>
&gt; &gt; &gt; &gt; index a44dc0de2885..f8bc1eae9a31 100644<br>
&gt; &gt; &gt; &gt; --- a/stand/i386/pxeldr/Makefile<br>
&gt; &gt; &gt; &gt; +++ b/stand/i386/pxeldr/Makefile<br>
&gt; &gt; &gt; &gt; @@ -13,6 +13,7 @@ BOOT=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0pxe=
boot<br>
&gt; &gt; &gt; &gt;=C2=A0 LDR=3D pxeldr<br>
&gt; &gt; &gt; &gt;=C2=A0 ORG=3D 0x7c00<br>
&gt; &gt; &gt; &gt;=C2=A0 LOADER=3D=C2=A0 =C2=A0 =C2=A0 loader<br>
&gt; &gt; &gt; &gt; +PXELDRSIZE=3D 510000=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0# Largest known safe size<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;=C2=A0 .if defined(BOOT_PXELDR_PROBE_KEYBOARD)<br>
&gt; &gt; &gt; &gt;=C2=A0 CFLAGS+=3D-DPROBE_KEYBOARD<br>
&gt; &gt; &gt; &gt; @@ -41,5 +42,7 @@ CLEANFILES+=3D ${LOADER}<br>
&gt; &gt; &gt; &gt;=C2=A0 ${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN}<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0btxld -v -f elf -e ${LOADER_A=
DDRESS} -o ${.TARGET} -l ${BTXLDR} \<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-b ${BTXKERN} $=
{LOADERBIN}<br>
&gt; &gt; &gt; &gt; +=C2=A0 =C2=A0 =C2=A0@set -- `${SIZE} ${.TARGET} | tail=
 -1` ;=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; x=3D$$((${PXELDRSIZE}-$$4)); \=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; &gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0echo &quot;$$x bytes=
 available&quot;; test $$x -ge 0<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;=C2=A0 .include &lt;<a href=3D"http://bsd.prog.mk" rel=
=3D"noreferrer" target=3D"_blank">bsd.prog.mk</a>&gt;<br>
&gt; &gt; &gt; &gt;=C2=A0 =C2=A0 <br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On recent CURRENT (FreeBSD 14.0-CURRENT #10 main-n257258-348=
164aa9e5d: Wed<br>
&gt; &gt; &gt; Aug 10 22:39:17<br>
&gt; &gt; &gt; CEST 2022 amd64), buildworld fails here on several boxes:<br=
>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; [...]<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; =3D=3D=3D&gt; lib/flua/libjail (all)=C2=A0 =C2=A0 <br>
&gt; &gt; &gt; --- all_subdir_stand ---<br>
&gt; &gt; &gt; --- loader ---<br>
&gt; &gt; &gt; btxld -v -f elf -e 0x200000 -o loader -l<br>
&gt; &gt; &gt; /usr/obj/usr/src/amd64.amd64/stand/i386/btx/btxldr/btxldr=C2=
=A0 -b<br>
&gt; &gt; &gt; /usr/obj/usr/src/amd64.amd64/stand/i386/btx/btx/btx<br>
&gt; &gt; &gt; /usr/obj/usr/src/amd64.amd64/stand/i386/loader_lua/loader_lu=
a.bin kernel:<br>
&gt; &gt; &gt; ver=3D1.02 size=3D690<br>
&gt; &gt; &gt; load=3D9000 entry=3D9010 map=3D16M pgctl=3D0:84 client: fmt=
=3Delf size=3D8a3f0<br>
&gt; &gt; &gt; text=3D836bc data=3D5238<br>
&gt; &gt; &gt; bss=3D8070 entry=3D0 output: fmt=3Delf size=3D8ae39 text=3D2=
89 data=3D8aa80 org=3D200000<br>
&gt; &gt; &gt; entry=3D200000<br>
&gt; &gt; &gt; -58585 bytes available 6.64 real<br>
&gt; &gt; &gt; 8.48 user=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02.84 sys<br>
&gt; &gt; &gt;=C2=A0 =C2=A0 <br>
&gt; &gt; <br>
&gt; &gt; I&#39;m sorry, but however you are building /boot/loader, it won&=
#39;t work when<br>
&gt; &gt; it&#39;s that big. What are your settings that increase its size =
by so much?<br>
&gt; &gt; <br>
&gt; &gt; Warner=C2=A0 <br>
&gt; <br>
&gt; Hello,<br>
&gt; I have a custom kernel with several drivers enabled, others disabled, =
but I&#39;m not aware of<br>
&gt; any knowb I triggered by purpose that could change the size. Can you h=
elp me with some hints<br>
&gt; which knobs this might trigger? Since it happens on ALL boxes with CUR=
RENT and different but<br>
&gt; similar custom kernel settings (mostly driver and disabling debugging =
et cetera it must be<br>
&gt; something very trivial that triggers that misbehaviour ... I doubt tha=
t kernel config is the<br>
&gt; cause, but anyway, I&#39;ll give you some extra configs I put on one b=
ox that fails:<br>
&gt; <br>
&gt; [... kernel conf ...]<br>
&gt; <br>
&gt; # The defaults are 64K and 128K respectively.<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0D=
FLTPHYS=3D(64*1024)<br>
&gt; #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)<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0M=
AXPHYS=3D(1024*1024)<br>
&gt; <br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_CDG<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_CHD<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_CUBIC<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_DCTCP<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_HD<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_HTCP<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CC_VEGAS<br>
&gt; 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<br>
&gt; <br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Z=
FS=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<br>
&gt; 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<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0G=
EOM_ELI<br>
&gt; <br>
&gt; 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<br>
&gt; 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<br>
&gt; 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<br>
&gt; <br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MSDOSFS_ICONV=C2=A0 =C2=A0# M=
SDOS Filesystem<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CD9660_ICONV=C2=A0 =C2=A0 # I=
SO 9660 Filesystem<br>
&gt; <br>
&gt; 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<br>
&gt; 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<br>
&gt; 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<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0NULLFS<br>
&gt; <br>
&gt; #options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 P1003_=
1B_SEMAPHORES=C2=A0 =C2=A0 =C2=A0# POSIX-style semaphores<br>
&gt; #options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 P1003_=
1B_MQUEUE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# POSIX message queue<br>
&gt; <br>
&gt; 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<br>
&gt; #options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 TCPPCA=
P=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# keeps the =
last n packets<br>
&gt; #options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 MROUTI=
NG=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Multicast routi=
ng<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I=
PSEC=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# =
Internet Protocol Security protocol<br>
&gt; #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<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0S=
CTP=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Stream Control Transmission =
Protocol<br>
&gt; <br>
&gt; #<br>
&gt; options=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MAC_BSDEXTENDED=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0# ugidfw<br>
&gt; 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#<br>
&gt; 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 #<br>
&gt; #<br>
&gt; 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<br>
&gt; <br>
&gt; <br>
The src.conf:<br>
<br>
# more /etc/src.conf<br>
#<br>
CPUTYPE?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0native<br>
#<br>
CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 -O3<br>
# for the kernel<br>
COPTFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0-O3<br>
#<br>
#CXXFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0-std=3Dc++20<br>
#<br>
WITH_CLANG_EXTRAS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 YES<br=
>
#WITH_LLVM_BINUTILS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 YES<br>
#<br>
#WITH_BSD_GREP=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0YES<br>
#<br>
WITH_OFED_EXTRA=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Y=
ES<br>
#WITH_CTF=3D=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 YES<br>
#<br>
WITH_BEARSSL=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0YES<br></blockquote><div><br></div><div>I think this is the only =
thing that will affect things. what happens if you turn this off?</div><div=
><br></div><div>Warner=C2=A0</div><div><br></div><blockquote class=3D"gmail=
_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204=
,204);padding-left:1ex">
#<br>
WITH_SORT_THREADS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 YES<br=
>
#<br>
WITH_ZONEINFO_LEAPSECONDS_SUPPORT=3D=C2=A0 =C2=A0 =C2=A0 YES<br>
#<br>
WITH_MALLOC_PRODUCTION=3D YES<br>
#<br>
WITHOUT_ASSERT_DEBUG=3D=C2=A0 =C2=A0YES<br>
WITHOUT_TESTS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 YES<br>
WITHOUT_DEBUG_FILES=3D=C2=A0 =C2=A0 YES<br>
#<br>
WITHOUT_CLEAN=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 YES<br>
#<br>
WITHOUT_REPRODUCIBLE_BUILD=3D=C2=A0 =C2=A0 =C2=A0YES<br>
#<br>
INSTALL_NODEBUG=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Y=
ES<br>
#<br>
<br>
<br>
<br>
<br>
-- <br>
O. Hartmann<br>
</blockquote></div></div>

--0000000000000fc18d05e5fb9709--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfp5Fog8cVy1fj67zttLsxZKmVHqRFqU0xUk2AwRMCSH_Q>