From: ron minnich <rminnich@gmail.com>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] using GitHub.com/u-root/cpu on plan9 to connect to linux guests in vmx
Date: Wed, 4 Jun 2025 07:55:01 -0700 [thread overview]
Message-ID: <CAP6exYLX=kF7DL9hms52rAKw7-gvdT8H_Y0G8io12mqrGp07jg@mail.gmail.com> (raw)
In-Reply-To: <CAJCpOFxdfW=J0Vi9xu7-zZomfdQ1031Ya4d1+7dP4UDU-TSyew@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3448 bytes --]
I'll be submitting a PR to fix it, we'll see how that goes, because the
code, as written, doesn't even give you some idea how many variables had
the problem.
I don't see that exposing those names is that big a deal, but we'll see.
On Tue, Jun 3, 2025 at 5:15 PM Daniel Maslowski via 9fans <9fans@9fans.net>
wrote:
> The author of that error message might have chosen to not expose/disclose
> the information.
>
> Anyway, interesting - would be really nice to see both systems integrate
> seamlessly!
> I have a good collection of hardware by now that would really like to see
> this.
>
> On Wed, Jun 4, 2025 at 1:57 AM ron minnich <rminnich@gmail.com> wrote:
>
>> well, here's a fun one.
>>
>> I've got my golang cpu command working on plan 9. So I'm working to have
>> my plan 9 cpu connect to a linux vmx guest running my golang cpud.
>>
>> The linux kernel has the initramfs builtin, so ... one file for vmx to
>> worry about, and 0 disk images.
>>
>> side note: qemu was choking on this kernel somehow, but vmx ran it just
>> fine. I like vmx much more than qemu at this point. I prefer to test these
>> linux kernels on vmx now.
>>
>> The goal is to have a linux appliance process, where it is easy to (e.g.)
>> run python3. So the only thing embedded in the linux kernel is u-root
>> programs and a cpud. You should be able to cd to the root of a linux file
>> system, and say
>> linux usr/bin/python3
>> where linux is a wrapper for vmx, and have it work. We had this on
>> akaros. It's handy.
>>
>> The only big problem will be the plethora of symlinks in linux images,
>> but I have a workaround for that, so we'll see.
>>
>> Anyway, plan 9 cpu was connecting to linux cpud, mounts were happening,
>> and so on, then I got this on the cpud side:
>> "exec: environment variable contains NUL"
>> and the cpud exec failed.
>> WTH? Well, it turns out, it's this in src/os/exec/exec.go.
>>
>> // Reject NUL in environment variables to prevent
>> security issues (#56284);
>> // except on Plan 9, which uses NUL as
>> os.PathListSeparator (#56544).
>>
>> The problem is, this doesn't work if you are communicating plan 9
>> environment variables to Linux, and that's what we're doing. You kind of
>> have to for cpu. I will guess I'm the first person to see this ... kind of
>> funny. Working on it.
>>
>> I'm a bit annoyed that whoever wrote the test and error did this:
>> err = errors.New("exec: environment variable contains NUL"
>> instead of this:
>> err = fmt.Errorf"%q:exec: environment variable contains NUL", kv)
>> since it's always kind of nice to produce useful error messages :-)
>> but at least I got something!
>>
>> btw, my talk, the paper, and the code for vmthreads is mirrored to
>> github.com/rminnich/vmproc.
>>
>>
>>
>> *9fans <https://9fans.topicbox.com/latest>* / 9fans / see discussions
> <https://9fans.topicbox.com/groups/9fans> + participants
> <https://9fans.topicbox.com/groups/9fans/members> + delivery options
> <https://9fans.topicbox.com/groups/9fans/subscription> Permalink
> <https://9fans.topicbox.com/groups/9fans/T9b0ff93502ee4130-Md4b8196b2c60d8452ba63203>
>
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T9b0ff93502ee4130-M1a2e5e940ad63c142cd423a6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
[-- Attachment #2: Type: text/html, Size: 4824 bytes --]
next parent reply other threads:[~2025-06-04 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAP6exYJ0XRvzEwP8UFsv-kQ7evg3sqcchceRPGJDw3rRk5XCgg@mail.gmail.com>
[not found] ` <CAJCpOFxdfW=J0Vi9xu7-zZomfdQ1031Ya4d1+7dP4UDU-TSyew@mail.gmail.com>
2025-06-04 14:55 ` ron minnich [this message]
[not found] <CAP6exYJzs0=eMHopNZ=_EGu+SQVUf5b3m0SWCX=Yf4__Tp5x4g@mail.gmail.com>
2025-06-04 16:48 ` Steve Simon
2025-06-04 17:15 ` Lucio De Re
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAP6exYLX=kF7DL9hms52rAKw7-gvdT8H_Y0G8io12mqrGp07jg@mail.gmail.com' \
--to=rminnich@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).