Paul Irofti <p...@irofti.net> wrote:

> 
> 
> 
> În 22 iunie 2020 01:26:16 EEST, Christian Weisgerber <na...@mips.inka.de> a 
> scris:
> >Christian Weisgerber:
> >
> >> I tweaked the patch locally to make _timekeep a visible global
> >> symbol in libc.
> >> 
> >> Printing its value has revealed two issues:
> >> 
> >> * The timekeep page is mapped to the same address for every process.
> >>   It changes across reboots, but once running, it's always the same.
> >>   kettenis suggested
> >>   - vaddr_t va;
> >>   + vaddr_t va = 0;
> >>   in exec_timekeep_map(), but that doesn't make a difference.
> >
> >But that's the kernel mapping, and my observation concerns the
> >userland mapping.  So based on this, I moved ps_timekeep up into
> >the fields of struct process that are zeroed on creation.
> >With that, _timekeep is always 0 for all processes. :-/
> 
> 
> I don't understand what problem you are trying to solve. Is it that timekeep 
> is the same? That's because we create only one page and the address gets 
> copied on fork. The diff was not designed to have timekeep zero'd on every 
> process so it doesn't account for it.


And I think you aren't listening.

He is saying it is at the same VA in *every* userland process.  Since most
processes do use this little system call execve, it is implausible for it
to be at the same place, just like it is implausible for the signal tramp
to be same place, or ld.so, or libc.

Reply via email to