From owner-freebsd-hackers@freebsd.org Tue May 1 18:49:40 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5FC3FB3CAF for ; Tue, 1 May 2018 18:49:39 +0000 (UTC) (envelope-from dcrosstech@gmail.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79B4A6DFCE; Tue, 1 May 2018 18:49:39 +0000 (UTC) (envelope-from dcrosstech@gmail.com) Received: by mail-io0-x22a.google.com with SMTP id p124-v6so14700061iod.1; Tue, 01 May 2018 11:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=NF6xg0+dlnLN1hhMhO3rlh/h6QrW/a1tuZSwUeVyi+Y=; b=sLLwV3cTEpA3XQXSmODBphFJOnUFOOuI0cuoQIY3eHsmzhIt3qEPdBnk/7qHnZRmI5 yDrsJ6HDrYcTE+zkDml+jdz4VOICHITDzA/ijys5mcpcTu2QzuS2WH6t0hSljHMa/eFf VnDJ5Iyl+cvxEIMccPzTC9E3mFnH+MgukEIHDUGOQKUqYf4rrGhKzBpAz7/1AObkY8eO CCgZVyvLemkWcrDj5aNDiBil8LrlNyjDyLTCMxmgVGlN6DNG4x4jXfx4Mw81zLSgb7VM gInLh+j+xLVS5d8vhsFW76yapzcANXWHRqSjvQRiP9nvqF8uchXUMuytQfkZlsVb03eX 8KxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=NF6xg0+dlnLN1hhMhO3rlh/h6QrW/a1tuZSwUeVyi+Y=; b=JsI1ACFQuuzLPNd7kUCUz3RjHk1jBY0RwMREnlSObBaZj4RlZ/Bu5ZYXNydiIezQzE 3+HCVzdKSJE42ljraZdg9eyx3eny6z8uTG9Po0Gza1gzXkaHkCPQATMx0+ilNE/McReL xPj+HLcIFqFcFPbTo+p3WmagT3uJDojxpNocB9pGyXg+mcFxP0xyNcpa5SkDhEd6Q5Ij qsZM7jZe4MTH7eDYy6IOCpC4iOMNYbKiJv5lYtqa6T8+FnYgRB3mnq47D7oMwu5h0Ok6 o67JaWsjuLrmKx4xP/NMFvZF1Vseo71+vR0TF3Zx9ocI4OhJdEEdfYDVm/1ZAB9qfsy+ MFHQ== X-Gm-Message-State: ALQs6tCRuxZg5GPoC5H5n8KId35JGmtEH/nZA6kWAOj6uaxbaUQYl0fz 6P5/cwKS7jh9AKbhWrB0TytraA== X-Google-Smtp-Source: AB8JxZqfajVh9NnhVErki2l9UCMtFEKKnsj6lzMZuRcMy0ZeFmPrw1hpSWoGNdErn8wRkjQvMWKiQg== X-Received: by 2002:a6b:86a7:: with SMTP id q39-v6mr17657053ioi.140.1525200578772; Tue, 01 May 2018 11:49:38 -0700 (PDT) Received: from [10.6.160.144] (rrcs-24-97-15-18.nys.biz.rr.com. [24.97.15.18]) by smtp.gmail.com with ESMTPSA id m14-v6sm4789097iti.1.2018.05.01.11.49.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 11:49:38 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: Bug 207069 (loader password kills boot) From: David Cross X-Mailer: iPhone Mail (15E302) In-Reply-To: Date: Tue, 1 May 2018 14:49:36 -0400 Cc: Warner Losh , FreeBSD Hackers , Devin Teske Content-Transfer-Encoding: quoted-printable Message-Id: References: <7630266D-D078-41B3-BC27-32EBF65540C4@gmail.com> To: Kyle Evans X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2018 18:49:40 -0000 =46rom my investigation when I wrote the patch originally the problem is (as= I recall, its been awhile) the forth dictionary space is limited so parts a= re flushed out (that is the only section at the top) additional dictionarie= s are then explicitly loaded (the also sections. The load_kernel and load_mo= dules are needed from the support-functions dictionaries As for why this is now needed here, there was a change made ~2 years ago to d= efer loading the kernel until the system was just about to boot (after beast= ie menu vs before). Autoboot assumes that kernel is loaded and will not load= for you. Making it load for you conflicts with the menu loading it. So it p= assword is enabled menu and kernel loading doesn=E2=80=99t happen. This reat= ores that and puts it right before autoboot (which is a C portion of loader)= (Going off of memory from ~2 years ago) Apologies for naming the patch works for me. This wasn=E2=80=99t just slap i= t in where it worked, i spent a good amount of time digging into what change= d, why, and to maintain the desired flow, > On May 1, 2018, at 14:22, Kyle Evans wrote: >=20 >> On Tue, May 1, 2018 at 1:17 PM, Warner Losh wrote: >>=20 >>=20 >>> On Tue, May 1, 2018 at 12:12 PM, Kyle Evans wrote: >>>=20 >>>> On Tue, May 1, 2018 at 1:07 PM, David Cross wrot= e: >>>> The aforementioned bug has been open for over 2 years, with attached an= d >>>> tested patches. At least one other has commented. >>>>=20 >>>> Could we please have it for 11.2/12.0? >>>=20 >>> Hi, >>>=20 >>> CC'ing Devin, our local Forth-fu-fighter. If it looks ok to Devin, one >>> of us should go ahead and shuffle this through. >>=20 >>=20 >> Yes. I've looked at this code a fair amount, and I don't understand why t= his >> is needed and why it would make things work. Since it is a security thing= , >> I'm very reluctant to push it in absent better understanding of why it >> works. >>=20 >=20 > Right, it also confuses me. =3D) >=20 > When I was implementing this stuff for Lua, autoboot DTRT as long as > module_path is setup correctly -- this is probably the part that's > missing since IIRC that's usually done in menu setup (that doesn't > happen here). >=20 > I'm not sure if this the right way to fix it in Forth-land, though.