12:48:22 tsoome: does loader efi have some option to load a kernel via http or nfs? I would like to forge a USB EFI image that I can insert into our bHyve and boot. I would like to use static Ip for that. I see our pxeboot would work but I don't want DHCP on that etherstub 12:48:51 you can use tftp or nfs 12:49:28 but, loader enbaled network access on network boot (pxeboot) 12:49:34 enables* 12:50:20 let me check efi version however ... 12:59:20 hm, efi version does list net0:, but apparently we do not have option to set address locally, so it is still expecting the pxe boot to get address from dhcp or rarp 13:18:46 yep, if loader.efi does get dhcp response with root-path (like: option root-path "nfs://192.168.150.37/export/omni";) then you can set currdev=net0: and use that path. 13:19:27 bios version is more complicated, but if we do not provide bios for bhyve, then it does not matter anyhow 13:20:10 we can add support for static config too, ofc. but thats current default. 13:22:47 Yeah, I think we should provide those options. or find a way how we can do EFI stub like linux does so loaders like ipxe can load our kernel wehn in UEFI mode. 13:23:08 HTTP and HTTPS support would be awesome too :) with mTLS 13:27:35 efi stub by itself is totally different thing. 13:27:41 anyhow, need to go afk atm 17:47:12 Can someone confirm that unless you allocate more than 2^48 bytes of memory, 64-bit illumos user programs will have 0xffff as their top 16 bits? 17:49:05 (i.e. we start high and work our way down... yes I know it's actually a figure less than 2^48 because of USERLIMIT but an unnamed piece of software is assuming those high 16-bits are zeroed.) 18:22:36 what is actually happening danmcd? 18:23:46 the stack starts high and grows down, the heap starts low and grows up. 18:23:47 Node 24 is trying to update its v8 engine. The v8 engine, at least the one that is crashing on my local builds and their Jenkins ones, fails because it seems to use in some small place 0xFFFF000000000000ULL as a bitmask for marking pointers. 18:24:05 So with debug-by-printf I see this this: 18:24:10 that sounds like the thing openindiana work around in /etc/system, by poking the kernel limits 18:24:26 https://github.com/nodejs/node/pull/57114#issuecomment-2780190569 18:24:57 I think it bad for a project to assume what bits are and aren't available to them. 18:25:28 Hell, since we start at 0xffff, maybe we should build a "clear-bits-if-in-freelist" version?! 18:25:48 I think you're looking for the openindiana workaround, but I can't remember what it is. 18:26:28 https://github.com/OpenIndiana/oi-userland/blob/b13f3b047006b55004ab5834c5b2a520f19678cb/components/openindiana/illumos-gate/overlay/etc/system.d/reserve_bits_for_tagged_pointers#L2 18:26:47 See $UTS/i86pc/sys/machparam.h for what it does for ifdef xpv... 18:26:59 I bet OI might Just Be Doing That all the damned time. 18:27:07 so openindiana just take the high few bits off the address so that they're spare 18:27:17 Approx line 231 of said file. 18:27:49 yeah, just about 18:28:00 so if you drop that in /etc/system.d, do things change? 18:28:11 if they do, we should probably talk with smart people about doing it properly. 18:28:50 I haven't tried it yet richlowe, but maybe I should build a PI that does? 18:29:03 I would, I think it will work 18:29:17 I'm just not sure if their confidence 128TB of address space is enough holds here in the weird future :) 18:29:47 I'm not sure who the burden of "doing it properly" rests upon, but to my mind, this feels like laziness on the v8 side. 18:33:46 I do see richlowe that the LX brand does this for its own processes in userland. 18:33:58 kebe(src/uts)[0]% git grep -i LX_MAXSTACK64 18:33:58 common/brand/lx/os/lx_brand.c:#define LX_MAXSTACK64 0x7ffffff00000 18:33:58 common/brand/lx/os/lx_brand.c:uint64_t lx_maxstack64 = LX_MAXSTACK64; 18:34:00 common/brand/lx/os/lx_brand.c: args->maxstack = lx_maxstack64; 18:34:02 kebe(src/uts)[0]% 18:41:11 right, to look linux-y and get those bits 18:41:18 ^^^ 19:12:12 What's the QUICKEST (not cleanest/production-ready-ist) CPP symbol to indicate "This is illumos-or-even-Solaris" ? Is it `__sun` ? 19:12:28 * danmcd thinks it's `__sun` but wants some confirmation. 19:15:52 It's __illumos__ if you just want illumos - that should be production ready these days, or __sun if you do want to include Solaris. 19:21:19 that 48-bit pointer mask is clearly not going to play well if you have 5-level paging enabled (which allows up to 57 bits of VA) 19:23:31 default openindiana install does indeed limit user va space to end at 0x7fffc0000000 19:28:21 somewhat complicates writing tests for overflow in pointer math if you can't map stuff in the upper half of the 64-bit space. 19:35:04 We don't have 5-level paging yet, but yeah that would be a problem. 19:35:51 this is all what I meant by "doing it properly" above, I think. 19:36:09 I'm not sure convincing 3rd parties to care about memory maps is necessarily practical, unfortunately. 19:37:29 does x86 have something like ARM's TBI these days? 19:38:38 ("top byte ignore", it completely ignores the high byte of addresses) 19:39:14 so you can look up (user)-tagged pointers without masking 19:54:40 danmcd: we don't have 5-level, but linux does. Surprised that nobody has grumped about it on linux, if only to get more space for ASLR on biggish processes on new machines.. 19:57:05 richlowe: "linear address masking" looks to be the x86-ville equivalent of TBI 19:58:14 It introduced more spectre attack surface: https://ieeexplore.ieee.org/document/10646870 20:04:17 ah, AMD does "UAI" which appears to be closer to TBI (ignores 8 bits in the top byte); UAI_57/UAI_48 do not mask bit 63 (the "sign bit") of the address 20:09:16 I'm engaging v8. This shit's code doesn't match its comments!!! 20:59:19 Uggh, It's a Process over there. I'm gonna screw around locally and see if my local screwings around help. I'm NOT bringing in the big-guns of hacking pointer bases yet. 20:59:38 I mean, look at these pieces of the v8 engine: 20:59:57 https://github.com/v8/v8/blob/main/src/sandbox/js-dispatch-table.h#L81 21:00:07 https://github.com/v8/v8/blob/main/src/sandbox/js-dispatch-table-inl.h#L192-L195 21:00:31 and tell me something's not sketchy here. (Read on down after the first highlighted line link. Code doesn't match comments. 21:40:06 danmcd: on the fdclose() thing - passing NULL is a convenience for when the caller already dknows what fileno(f) is. Doesn't necessarily result in an fd leak. 21:40:27 Okay... it should be in the man page, though. 21:43:39 Yes. 22:26:28 danmcd: and of course, in the upper bits, things are different between SPARC & x64 (though I know illumos proper doesn't care any more) 22:28:29 though if I'm remembering correctly, that may be because later SPARC MMUs already have 53 bits of VA in use 22:31:10 I know with spidermonkey (Mozilla's equivalent to v8) we have to link on SPARC with /usr/lib/ld/map.vas47 to mark anything above the 48-bit limit as "reserved" so the system won't put any pages up there 22:37:01 You can implement that in the v1 language, but not the v2 language as we have it 22:37:06 it would be easy to add to the v2 language though. 22:37:40 I'm pretty sure I mentioned the specifics in a bug report where postwait was trying to wall off all memory below 4G for lua