9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] using GitHub.com/u-root/cpu on plan9 to connect to linux guests in vmx
       [not found] ` <CAJCpOFxdfW=J0Vi9xu7-zZomfdQ1031Ya4d1+7dP4UDU-TSyew@mail.gmail.com>
@ 2025-06-04 14:55   ` ron minnich
  0 siblings, 0 replies; 3+ messages in thread
From: ron minnich @ 2025-06-04 14:55 UTC (permalink / raw)
  To: 9fans

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] using GitHub.com/u-root/cpu on plan9 to connect to linux guests in vmx
  2025-06-04 16:48 ` Steve Simon
@ 2025-06-04 17:15   ` Lucio De Re
  0 siblings, 0 replies; 3+ messages in thread
From: Lucio De Re @ 2025-06-04 17:15 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]


On 2025/06/04 18:48, Steve Simon wrote:
> maybe i am remembering ancient unix but isn't the zero the 
> inter-variable separator?
>
Not in my recollection: it's an SOH (Ctrl-A, for sure, SOH only if my 
memory is not corrupted).
Lucio.
> Permalink 
> <https://9fans.topicbox.com/groups/9fans/T9b0ff93502ee4130-Mc7e3705592e3e59a1c474f64> 

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T9b0ff93502ee4130-Mdbb776e4d524820de1a363ff
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1576 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] using GitHub.com/u-root/cpu on plan9 to connect to linux guests in vmx
       [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
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Simon @ 2025-06-04 16:48 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/html, Size: 6034 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-04 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAP6exYJ0XRvzEwP8UFsv-kQ7evg3sqcchceRPGJDw3rRk5XCgg@mail.gmail.com>
     [not found] ` <CAJCpOFxdfW=J0Vi9xu7-zZomfdQ1031Ya4d1+7dP4UDU-TSyew@mail.gmail.com>
2025-06-04 14:55   ` [9fans] using GitHub.com/u-root/cpu on plan9 to connect to linux guests in vmx ron minnich
     [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

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).