On Thu, 28 Aug 2025 13:38:33 -0700
Linus Torvalds <[email protected]> wrote:

> On Thu, 28 Aug 2025 at 13:17, Steven Rostedt <[email protected]> wrote:
> >  
> > >
> > > That should be simple and straightforward, and hashing two pointers
> > > should be simple and straightforward.  
> >
> > Would a hash of these pointers have any collisions? That would be bad.  
> 
> What? Collisions in 64 bits when you have a handful of cases around?
> Not an issue unless you picked your hash to be something ridiculous.
> 

Since I only need a unique identifier, and it appears that the
vma->vm_file->f_inode pointer is unique, would just using that be OK?

I could run it through the same hash algorithm that "%p" goes through so
that it's not a real memory address.

As getting to the path does require some more logic to get to. Not to
mention, this may later need to handle JIT code (and we'll need a way
to map to that too).

-- Steve

Reply via email to