Em Quarta 15 Fevereiro 2006 12:53, Rodrigo Rosenfeld Rosas escreveu: >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 >handler. > >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.
Ok, I tested the vmaops too and it also worked as expected. I think you could merge rtdm_mmap and related stuff to mainline RTDM. Thank you for your precious work. Unfortunately you'll need to wait a while until I test them on the real video driver. I had to stop working on it for writing the article. When I finish the article I'll test them on real hardware but I see no reasons for not working... Best Regards, Rodrigo. _______________________________________________________ Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com _______________________________________________ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core