From owner-freebsd-current@freebsd.org  Sun Aug 19 18:25:38 2018
Return-Path: <owner-freebsd-current@freebsd.org>
Delivered-To: freebsd-current@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 03B4E1073791
 for <freebsd-current@mailman.ysv.freebsd.org>;
 Sun, 19 Aug 2018 18:25:38 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: from mail-it0-x231.google.com (mail-it0-x231.google.com
 [IPv6:2607:f8b0:4001:c0b::231])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 7799283FE2
 for <freebsd-current@freebsd.org>; Sun, 19 Aug 2018 18:25:37 +0000 (UTC)
 (envelope-from wlosh@bsdimp.com)
Received: by mail-it0-x231.google.com with SMTP id j81-v6so17696977ite.0
 for <freebsd-current@freebsd.org>; Sun, 19 Aug 2018 11:25:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=bsdimp-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:sender:in-reply-to:references:from:date:message-id
 :subject:to:cc;
 bh=P9LwWQn3pb7LTXTVqbyEUdTXdNuX65iODI3hNkT2fBo=;
 b=C4N/+JLUv0eY7BypWQ6ocoOzll3GRlx/St5M8AojMlA/9zuIKiWzlYAYIhIHTPN3oB
 IRee+zBBR5974WX9gJvvMMWmR+9ErDWNGZOydyLd0qJVKsOvc8PTf559vDUfBsjpvTWe
 nt/YWyqfMNxqiklT/PVbii81OBueoxHn6hkrGHJSybWmhwlU6AXY77IMO0vDY7UOYvzG
 TXkVm8MRJSnRvAIKgIlY+qMrQOfLcq1GSg2uGfcNt0qmJl5nO5vQb78DPhNGh5sJlh80
 5o8cnrmoJpDiBgjVTDPmGRtYshma262+92RczLCCt1OH+KJOrfMsi13HU0ovnK67Bq2u
 BrXw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
 :date:message-id:subject:to:cc;
 bh=P9LwWQn3pb7LTXTVqbyEUdTXdNuX65iODI3hNkT2fBo=;
 b=XwWDFX1RQN99ye3KA519QHnD9HL9r45pxEj+AFDGrwRdjSPfPklPgG3krl8kzfnBGl
 n1eRqGfcOU/Iw2vxN4am6S1BYGEuzy8ravbqi6vByXFaBdpAEWtQeVmwdxIADANuiz4n
 JBpJwyplgwUxcAQ85bNuW27+Lkaex1v+05+C1jsU50il5BXVIL/0u9Ye7ZTExH+RwsZL
 auVBL5Ev5MTmq88YJH4mMNkOHbWcD12L0PzaFMGHqinwyJVVJq8/cYyYr7hWNW9z2QtW
 s0lPjxm0l0ybr5eJt2tnx7JnpLB4D3wyh9Qvfn2ggL2TpdAUTqo/MLU1TDDLwWg5dI8q
 4enQ==
X-Gm-Message-State: AOUpUlGjMUUgghVk/njqxI/01aMkHdRGoFnq1GL/nnGF8DZ+knc82JJC
 YrWBpqXmnUd2Xg/OEEYh7Sh+SKMsc5rpW/u6eeIpHA==
X-Google-Smtp-Source: AA+uWPz54dfOX56HbyB+C2wYUm7grjM4Ui4W0N73AJue2yJjubfEoYRApIXojB1kOjS/aiVTTqqqj6sOWDQizhRr5sU=
X-Received: by 2002:a02:4306:: with SMTP id
 s6-v6mr5382789jab.140.1534703136770; 
 Sun, 19 Aug 2018 11:25:36 -0700 (PDT)
MIME-Version: 1.0
Sender: wlosh@bsdimp.com
Received: by 2002:a4f:2806:0:0:0:0:0 with HTTP; Sun, 19 Aug 2018 11:25:36
 -0700 (PDT)
X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d]
In-Reply-To: <CANCZdfoy602VkTnfg-fwQLdz4z27NF9LGmf11_0b7LuMLik7bg@mail.gmail.com>
References: <20180819152253.bbcrefdvynl7y5ka@ler-imac.local>
 <CANCZdfqHV7Fy+bJAuMv5gfJmPJqh1QmKqjGz-bVH2wh6NyqeVQ@mail.gmail.com>
 <20180819153526.7ruovrpmdsimkmfj@ler-imac.local>
 <CANCZdfr2h=e-4+D9JYR3TkKyaEywYkCnXmyGmVMq6-NpN=GX2w@mail.gmail.com>
 <CACNAnaGh+gpwcDE3TQKd9xCnJpD4GtE2Z0wwjagKMUNVhdHznw@mail.gmail.com>
 <167d1cb1-7232-52bb-9a73-6f109c437a63@FreeBSD.org>
 <CACNAnaHDgXAP-gb7hwmk3z-GRTHz_mdKi3JQT4e3ucR0FP4ZiA@mail.gmail.com>
 <CANCZdfoy602VkTnfg-fwQLdz4z27NF9LGmf11_0b7LuMLik7bg@mail.gmail.com>
From: Warner Losh <imp@bsdimp.com>
Date: Sun, 19 Aug 2018 12:25:36 -0600
X-Google-Sender-Auth: Fcr4S3zP-O0wsUUYti73ebg_Enc
Message-ID: <CANCZdfpK8K=h9iff5CoAwNLiR_5j6d53mmpzPPqXD3_DALy2Zw@mail.gmail.com>
Subject: Re: LUA loader: bhyve now doesn't?
To: Kyle Evans <kevans@freebsd.org>
Cc: John Baldwin <jhb@freebsd.org>,
 FreeBSD Current <freebsd-current@freebsd.org>, 
 Tycho Nightingale <tychon@freebsd.org>
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.27
X-BeenThere: freebsd-current@freebsd.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Discussions about the use of FreeBSD-current
 <freebsd-current.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-current>, 
 <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current/>
List-Post: <mailto:freebsd-current@freebsd.org>
List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-current>, 
 <mailto:freebsd-current-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Aug 2018 18:25:38 -0000

On Sun, Aug 19, 2018 at 11:10 AM, Warner Losh <imp@bsdimp.com> wrote:

>
> I think including both loaders in userboot is probably a no-start
>> based on the current interface.
>>
>
> Yea, it would be a challenge... Sadly, we have POLA violations either way
> we jump here.
>

Just to summarize the IRC conversation:

I just committed r338064 which reverts userboot.so to 4th always. This is a
quick band-aide until a longer term solution happens.

There was the suggestion of adding a hack so that if there was no lua, we
could use the 4th interpreter instead. There's a number of ways to do this,
but they all involve a bit of work.

There was the suggestion of installing a userboot_{lua,4th}.so and hard
linking (but this provides a built-in way to get the right userboot_*.so to
use with a bhyveload -l lessening the burden).

The notion of putting some smarts into bhyveload to cope, since it's also
updated at the same time that userboot.so is, typically.

There may be another notion as well. Working through the details and will
present a plan when I have it.

Warner