tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: General device properties API



> Date: Sun, 12 Sep 2021 08:57:07 -0700
> From: Jason Thorpe <thorpej%me.com@localhost>
> 
> > On Sep 12, 2021, at 8:17 AM, Jason Thorpe <thorpej%me.com@localhost> wrote:
> > 
> > Doing this with symbols is a mess.
> 
> Here's a way to basically get most of what you want without
> referencing symbols:

Now the linker doesn't detect namespace collisions.  So if two
different subsystems in different modules take the same name you might
silently get runtime memory corruption.  And this happens even though
we have a mechanism to completely rule out that entire class of
mistakes.

What's wrong with using symbols, the standard mechanism we already
have for assigning meanings to names across loadable subsystems in the
kernel and in C generally?


(All that said: this kind of extremely general method dispatch logic
invites deeply nested abstractions that make reasoning and diagnostics
difficult, and I'm still not convinced that that's warranted.  I'd
like to establish that first -- I only brought up making the method
dispatch mechanism type-safe early on because it was already committed
with no opportunity to object beforehand.)


Home | Main Index | Thread Index | Old Index