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

Re: [PATCH 1/2] m68k: Use vDSO for thread pointer access



* Stefan Reinauer:

> You raise a good point. The current implementation has glibc directly
> reading from the vvar data page, which tightly couples glibc to the
> kernel's internal vDSO memory layout.
>
> The more standard approach would be to export a __vdso_get_thread_area
> function from the vDSO that glibc calls via the normal vDSO symbol
> lookup mechanism. This would:
>
>   1. Follow the established vDSO pattern used by clock_gettime,
> gettimeofday, etc.
>   2. Allow the kernel to change the internal vvar layout without breaking glibc
>   3. Keep the ABI contract at the function level rather than data
> structure level
>
> The tradeoff is a small amount of function call overhead, but that's
> still much faster than the syscall we're replacing.
>
> I can rework this to export __vdso_get_thread_area from the vDSO and
> have glibc use standard vDSO symbol lookup. Would that be the
> preferred approach?

Yes, please do it this way.

Thanks,
Florian


Reply to: