From nobody Fri Aug 02 14:28:55 2024 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 4Wb7W11CBMz5Rpsg; Fri, 02 Aug 2024 14:29:01 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wb7W06TYzz52Qf; Fri, 2 Aug 2024 14:29:00 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-7a3574acafeso18511885a.1; Fri, 02 Aug 2024 07:29:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722608939; x=1723213739; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=AT3ty5fAAh+pcwPjDTBlcvA8cZZnnmjcI3f/sWaDzOU=; b=evmA1n9yA/X1WZl6YbV1aL+CzPsIpdDUxM9UrOr+GqvlgMAJ3K7yyZ+u/OPyOolC4a F1B5UgYD/nbbqXOETGzfkRPDdPZW0WhzICJAaAL2VRcIEB1/L7o0eV/Ze/pABKQkFZ+J G9ovoI3jRrmmRnvOe0z03T46cTljsX48rgSN9f7QkVOQ/zzJyf0aTuMgZHmqSozz/Rt9 /QfGZM6duLuJy/wcbTE6SBFhiQvgzcVMu6+vmKFOPIMIIA5da84lkZPzRcwNv/MtE2Cd T6M1/sONW3CVrKdww6j7UiywdYFxwswcZGr20JUox97xv0GDx75ZODwDO4bV6oSC2sve oxig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722608939; x=1723213739; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AT3ty5fAAh+pcwPjDTBlcvA8cZZnnmjcI3f/sWaDzOU=; b=toezbx8//cK7FJE1onKpguqzoGD6C3rOzFby1ZZjtERqzGbkzZf1nZQMLq1TzADMIl OI3MDcDZt1X4kSkwFm96EtTvm0S1rLndpzTEm4ttd2X00msIc7AA82W77siXxYPrPwKs pZOnuThuieuQxVo8yrfF/FIUYjp0tg+QszS2EqrjAFqSLelJ1JAxj4A/OHQsca1ssIO6 RQoTRYr73+7lk+ZwFldOp9uWfJ6BWK7ANLh584wEebe8C11lpzMj0bM3gumA59FbV7ig YDg/lB62P4fvIppfduQLfvNKe7doZ7YZGFnSr+r2u+8lq0HXv8wCDMM+9L9lIJbmJZLy 4XIQ== X-Forwarded-Encrypted: i=1; AJvYcCW5/sf4x4/xFXPcRJq1HgQYXTdKQ/0oOxcjg2jw/fJePD2tOaq57H9ybH7Pryj9w6T8fzVr1egA0PbFGI0mYCxhPa0yLNjhYsU5b5slYMr+SQ7ZSQ0+fIddXu5CSg4EDzW/jte8SbuCOI6VFAtjPs1ZnA== X-Gm-Message-State: AOJu0YyalvLWgF/gd+XWrc1RM9o3YOcvCU1zl0wJRMGTPNubIUP07cQQ B1+eN2SirK9zrGsxfBs12KXhUTM+v69j1AIlw4soewnvFFj5lWqF6/LWTy07 X-Google-Smtp-Source: AGHT+IFHQnQJYkfrOm5n3GjklhaIT6r8hJtdoxV25pd3KxTLemgUJGC5XlKFXzaDwD/c7qH95z6yAw== X-Received: by 2002:a05:620a:4149:b0:79f:1105:be3 with SMTP id af79cd13be357-7a34ef54184mr416380985a.40.1722608938886; Fri, 02 Aug 2024 07:28:58 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a34f797ebdsm88908585a.127.2024.08.02.07.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 07:28:58 -0700 (PDT) Date: Fri, 2 Aug 2024 10:28:55 -0400 From: Mark Johnston To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 46ea2ffc3fbc - main - stand: Reduce limit to 500k for x86 loader Message-ID: References: <202408012131.471LVOGC039269@gitrepo.freebsd.org> 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202408012131.471LVOGC039269@gitrepo.freebsd.org> X-Spamd-Bar: ---- 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)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4Wb7W06TYzz52Qf On Thu, Aug 01, 2024 at 09:31:24PM +0000, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 > > commit 46ea2ffc3fbc42089d8322a65fdee8476d2b00d6 > Author: Warner Losh > AuthorDate: 2024-08-01 21:24:51 +0000 > Commit: Warner Losh > CommitDate: 2024-08-01 21:30:26 +0000 > > stand: Reduce limit to 500k for x86 loader > > The largest loader that works for PXE boot is about 500k. PXE needs low > memory for packets and other driver state, so the largest safe size for > the loader is about 500k. Reduce the size from 560k to 500k so we don't > accidentally break PXE in the future. > > Add a comment for people with special needs. If you control the > hardware, it can be safe to have boot loaders as large as 580k or 600k > in some cases. Since the BIOS loader is becoming more and more of a > legacy item, the build variable LOADERSIZE isn't documented. This change > doesn't change that: there's been little demand for this documentation > and in general, users shouldn't change it lightly. > > PR: 257018 > Sponsored by: Netflix > --- > stand/i386/loader/Makefile | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile > index a4aa3a3c4d45..efd442977780 100644 > --- a/stand/i386/loader/Makefile > +++ b/stand/i386/loader/Makefile > @@ -32,7 +32,12 @@ VERSION_FILE= ${.CURDIR}/../loader/version > # > # will tell you how many kiB of lomem are available. > # > -LOADERSIZE?= 560000 # Largest known safe size for loader.bin > +# We further reduce this to 500k, though, to give PXE an additional 64k of space > +# so pxeloader will fit. If you have special needs that do not include pxeboot, > +# you can safely set this as high as 560000 generally, or a bit higher if you > +# have tight control over the machines you are booting on. > +# > +LOADERSIZE?= 500000 # Largest known safe size for loader.bin Hi Warner, This breaks the WITH_BEARSSL (which implies WITH_LOADER_VERIEXEC) build. When enabled, the loader ends up being just slightly larger than the limit.