Em Terça 14 Fevereiro 2006 22:30, Jan Kiszka escreveu:
>>> You cannot mmap before you know precisely for which user this should
>>> take place.
>> Do you mean that if I use the 'current' and current->mm struct of the
>> driver, when mmaping, the user won't be able to use the returned pointer?
>To mmap you need to know the target process, more precisely its mm. This
>is typically derived from the invocation context of the service call
>("current" is a pointer to the current process). But init_module runs in
>the context of modprobe. Even worse, the process later opening and
>mapping some buffer may not even exist at that time!
Right, I've already verified this on practice... I'm mmaping on open handler
for now just for testing the mmap, but I'll change it to the ioctl mmap
It seems to work. I mapped high_memory and could read and modify it from user
space. The memory values mantained betweens the many open calls. I read,
printed the values and increment them by one. On next time, the value shown
was incremented... All seems perfect but I still didn't test with real
acquire code... When I do so, I'll let you know.
I still need to test the vmaops. I think I'll test them tomorrow. I need to
begin writing an article that my advisor asked me to. I need to finish it
until march, 10.
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!