<!DOCTYPE html>
<!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;opacity:0;overflow:hidden;">
On 5 Nov 2026, Kris Van Hees outgrape: > On Thu, Nov 05, 2026 at 04: 53: 53PM +0000, Nick Alcock wrote: >> On 30 Oct 2026, Kris Van Hees spake thusly: >> >> > Stop unloading cached modules in dtrace_update(), including</div>
<!-- Preheader Text : END -->

<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;opacity:0;overflow:hidden;"></div>
<!-- Email Banner : END -->

<!-- BaNnErBlUrFlE-BoDy-end -->
<html>
<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
  #pfptBannernau8bma { all: revert !important; display: block !important;
    visibility: visible !important; opacity: 1 !important;
    background-color: #c2d4d4 !important;
    max-width: none !important; max-height: none !important }
  .pfptPrimaryButtonnau8bma:hover, .pfptPrimaryButtonnau8bma:focus {
    background-color: #a2b1b1 !important; }
  .pfptPrimaryButtonnau8bma:active {
    background-color: #828e8e !important; }
  html:root, html:root>body { all: revert !important; display: block !important;
    visibility: visible !important; opacity: 1 !important; }
</style>

<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><body><pre style="font-family: sans-serif; font-size: 100%; white-space: pre-wrap; word-wrap: break-word">On 5 Nov 2026, Kris Van Hees outgrape:

> On Thu, Nov 05, 2026 at 04:53:53PM +0000, Nick Alcock wrote:
>> On 30 Oct 2026, Kris Van Hees spake thusly:
>> 
>> > Stop unloading cached modules in dtrace_update(), including vmlinux. Keep
>> > discovered symbol tables, ranges, types, and BTF IDs for the handle lifetime
>> > while collecting newly loaded modules. Module disappearance or reloading no
>> > longer replaces cached metadata.
>> 
>> Hm. Interesting. I considered doing this back in the day but more or
>> less immediately hit problems with wanting to remove dtrace.ko and
>> loading a modified one.
>
> Since we no longer have a dtrace.ko, that is not an issue.

My point was that people who are trying to debug kernel modules are
going to want the new one to be picked up if they reload it -- but it
looks like you are doing so, you just keep the old one around as well.

>> I guess we don't care about replacement of modules with bugfixed ones
>> any more? (What happens if someone does it?)
>
> Well, is a module is unloaded and reloaded with a different content, then an
> active tracing session already will face trouble because there is e.g. a
> potential that addresses were put in the trace buffer based on the old version
> of the module, but symbol resolution takes place in the consumer using the new
> version, and thus you get wrong results.  Of ocurse, that would be (possibly)

Yeah.  Ideally this would be a good quality-of-life thing (if you unload
an dmoule and load a new one, of course you want foo` to refer to the
new foo.ko now, not the dead one) -- but given this, it's actually
desirable to keep foo` referring to the old one, since we can't
recompile and re-resolve everything.

> of short duration - but either way, the system changing underneath us is just
> not a case that we can really deal with.  That was something we could deal with

Yeah.

> much better when dtrace had an important piece living in the kernel because we
> could (in a pretty seamless way) re-enable probes based on the enablings that
> were stored in the kernel.  Now we would have to react to a module unloading
> and reloading from userspace which means there would be delays and all kinds of
> side effects that would disrupt ongoing tracing anyway.

I suspect most of those side effects existed anyway, since it's not like
we halted every running process while the enablings were adjusted.
Putting things in userspace just makes them (a lot) more obvious.

>> > Separate failed ELF-load cleanup from module destruction, retaining the
>> > existing handle ownership of shared CTF and BTF. Document the new lifetime
>> > contract and cover incremental discovery with both kernel symbol formats.
>> 
>> (I don't really know what this series is for, or why you're doing this.
>> Is the point of this incremental discovery? Or is it just that the
>> compiler resolves these things to addresses, so having them change just
>> causes trouble because the resolution is already done? If so, this seems
>> reasonable -- one hopes that the verifier would trap cases where the
>> addresses used now resolve to something else.)
>
> Combination of all the above :)  The main purpose is remove complexity that is
> no longer really beneficial to the operation of DTrace, and also to makes it
> easier to simply and streamline the code that handles modules symbol and type
> data - the extra complexity was lowering performance without really offering
> much of a benefit.

Makes sense. If we want to dynamically adjust to changing module sets,
we wouldn't do it like this any more anyway :)


NULL && (void)
</pre></body></html>