-
gitomat
[illumos-gate] 16525 TCP_MD5SIG listening socket should degrade gracefully -- Andy Fiddaman <illumos⊙fn>
-
jbk
is there anything that documents what is 'normal' (or i guess expected) differences from wsdiff?
-
rmustacc
If run correctly, aka you use the same version across both, then I usually see nothing with a -nd build.
-
jbk
oh this is a debug build..
-
rmustacc
The default version uses the git sha so that will cause stuff.
-
rmustacc
I think it may be true for a debug build too.
-
rmustacc
But when version is off, I see probably a half dozen related things.
-
jbk
a while back, i had talked about trying to split the rather massive sata.c into smaller bits (it's probablt #2-3 in size behind sd.c)... but as an initial step i went through and created mapfiles -- both to expose the sata 'api' (I don't think it's ever been formalized, but the things sata drivers require from the framework) as well as adding them for the sata drivers (to hopefully catch 'can't find symbol
-
jbk
X' errors during the build instead of getting a surprise at boot).. also used nm on the few closed source sata drivers to see what sata symbols they appeared to be using
-
jbk
just doing that though, it appears that now the sata modules as well as the sata drivers now get .SUNW_{syminfo,version,versym} while previously they apparently did not
-
jbk
and maybe it's lack of caffeine, but not sure if that was expected
-
jbk
(I kinda thought every elf object got those, but also not really something i've needed to pay attention to previously)
-
rmustacc
Hmm, how did you rig up the mapfile?
-
rmustacc
In general we've tried to not use the mapfiles to constrain symbol visibility.
-
rmustacc
But rather in the current kernel mapfiles we use it as a thing you can define to get the undefined symbol processing turned on.
-
rmustacc
So I think I'd want to see how it was done.
-
rmustacc
The way we do the mapfile checking today for undefined symbols basically doesn't create those sections.
-
jbk
i can throw it up on github.. it's not that large of a chance..
-
jbk
i tried to model it after the few other drivers that use them.. the thought (and maybe this isn't the intention) was to have it so that when splitting sata.c into multiple files, it'd be easier to tell there's no changes in symbol visibility since it's a driver that used by other things
-
jbk
also seems like it makes any non-ddi stuff used by the driver more explicit which seems like it might be useful
-
jbk
e.g. nv_sata uses 'hz, psm_map_phys_new, prom_printf' (among others)..
-
jbk
-
sommerfeld
jbk: what I use is a different version that's the same length (bugXXXXX vs basXXXXX) and there are only a handful of things different (one or two kernel files plus a couple acpi-related programs).
-
gitomat
[illumos-gate] 16511 vioif_reclaim_tx() is holding lock across calling mac_tx_update -- Dan McDonald <danmcd⊙mi>
-
jbk
the other slightly interesting to look into is a few things that weren't touched noted some differences in .rela.data, but i think it's just an ordering change because those were already using mapfiles, so wouldn't be a concern.. just may take a bit to go through all of them to confirm that
-
jbk
i've also been trying to find a way to do the split that preserves history more easily, but haven't had much luck -- all the solutions end up having to do a merge to make it work (so you see the interim commit in the history)
-
jbk
so may end up just abandoning splitting things up and dealing with the 21,000+ line file
-
jclulow
the long files are so terrible lol
-
richlowe
the mapfile approach to constrain visibility would be fine, if it's what you really wanted
-
richlowe
but it's separate to what Robert did with Makefile.mapfiles
-
richlowe
but symbol _versioning_ wouldn't work
-
richlowe
(that is, you could do public: foo\nlocal: *, but you couldn't do SYMBOL_VERSION foo { } around them)
-
richlowe
it would be silently ignored
-
richlowe
jclulow: I don't mind the long files, I mind the files that piss off smatch
-
jclulow
I can be irritated at more than one thing at a time haha
-
richlowe
(their's overlap, but the ordering changes)
-
jclulow
I feel like emacs saves you from long files
-
richlowe
big files I have to go where M-. takes me
-
richlowe
or... C-] in vim I think
-
jclulow
editors that can't have two totally separate windows open in the same file make long files shit
-
richlowe
smatch-y files I have to freak out when my 'small' build takes ages, and I don't know if it was my fault.
-
richlowe
jclulow: oh, yes, that would be awful
-
jclulow
I have a giant monitor that can do 6 columns of 80x87 at my current font size
-
jclulow
If all my code is in one file, I can only use one of those columns haha
-
richlowe
but for whatever reason, sata.c isn't a smatch offender
-
Woodstock
do you use that with one big emacs frame?
-
jclulow
I don't use emacs at all
-
richlowe
josh is of one of the other clans
-
Woodstock
thats unfortunate
-
jclulow
I'm one of the vim people
-
jclulow
Alas!
-
Woodstock
:->
-
jclulow
I tried helix recently haha
-
jclulow
and
-
richlowe
but yeah, sata.c is "fine" though I don't know how, nvme.c is "incredibly toxic"
-
richlowe
though I again don't know how
-
jclulow
... I'm back to vim
-
Woodstock
richlowe: eh.
-
jclulow
from an smatch perspective specifically?
-
richlowe
yes
-
jclulow
it might be type heavy?
-
richlowe
it takes me 4 seconds to build sata, it takes me 1:20 to build nvme
-
jclulow
haha wow
-
richlowe
basically all of that is smatching it
-
jclulow
Is this in the VM on the Gimlet?
-
richlowe
Yes
-
jclulow
jesus
-
jclulow
That's a pretty fast box
-
jclulow
all things considered
-
jclulow
there are client parts that can burst much faster obviously but yeha
-
jclulow
It's C, right, so you could flamegraph it haha
-
richlowe
yeah, it needs investigation when I have some time, or someone else does
-
richlowe
(to be clear, it's smatch's fault, and there are other toxic files. That's just the one I remember that _we still allow to run_)
-
richlowe
there are parts of the tree we guard off, because smatch just... doesn't finish
-
sommerfeld
so for wrapping up
illumos.org/issues/15691 I think I've wrapped my brain around how libc uberdata and multiple link maps (and their respective libc instances) interact. with the change I'm proposing I think I need we need to disable setlocale(), duplocale() and newlocale() in non-primary link maps. Given that malloc() is disabled in non-primary link maps, that doesn't seem unreasonable to me.
-
richlowe
If you propose that because _they_ need to allocate, there is `lmalloc()`
-
richlowe
if you propose that because it vastly simplifies things, and that's a really weird corner case: I agree
-
sommerfeld
it vastly simplifies things.
-
sommerfeld
well, it vastly simplifies things if you can fetch the current locale from the thread base pointer because it's in `struct ulwp` instead of having to call tsdalloc() every time you want the current locale.
-
sommerfeld
but then because struct ulwp is not link-map-specific it really means that locales have to be owned by the primary link map's libc..
-
richlowe
yeah, that makes sense, and I agree.
-
sommerfeld
we could throw function pointers to the primary link map's setlocale/duplocale/newlocale into the uberdata, and have non-primary libc's call there but it seems like nobody would use that mechanism
-
sommerfeld
and it would be simpler to just have them fail if not in the primary link map.
-
jclulow
I feel like link maps are for people doing weird shit already?
-
jclulow
e.g., LX brand style stuff, or other oddball auditing things
-
jperkin
speaking of *locale(), folks might be interested in
TritonDataCenter/pkgsrc-extra 51e7c8f
-
richlowe
I think the most normal way into link map stuff is rtld_audit(3ext)
-
richlowe
after that things get increasingly baroque (brand libs, rtld, libc)
-
sommerfeld
if you just want to experiment with code running in alternate link maps, dlmopen(LM_ID_NEWLM, ...) is the way to go.
-
richlowe
more software than I expected uses it to isolate plugins, but I'm not sure what any of it is.
-
richlowe
(I just used github search)
-
jclulow
So if you do use it for plugins, your alt-link-map plugins just end up using the primary map's locale?
-
richlowe
I think what sommerfeld is trying to avoid is fundamentally a confused thing to do
-
richlowe
though I don't think any online search has the ability to check nobody tries
-
richlowe
so I'm still fine with it, until proven wrong
-
sommerfeld
jclulow: yes.
-
sommerfeld
well, they use the locale structures built by the primary map's locale code but the locale code in their libc.
-
jbk
richlowe: i did clean things up in sata.c a while back to get rid of all the compiler and smatch warnings...
-
richlowe
does that make smatch markedly faster?
-
jbk
oh taht i don't know.. just that it used to be disabled on it before i cleaned things up
-
jbk
so i guess technically i made it slower :)