From: Rodrigo Rosenfeld Rosas <lbocseg@domain.hid>
To: xenomai@xenomai.org
Cc: Jan Kiszka <jan.kiszka@domain.hid>
Subject: Re: [Xenomai-core] [PATCH] provide rtdm_mmap_to_user / rtdm_munmap
Date: Fri, 10 Feb 2006 19:28:52 -0200 [thread overview]
Message-ID: <200602101928.52899.lbocseg@domain.hid> (raw)
In-Reply-To: <200602101858.21108.lbocseg@domain.hid>
Hi Jan, it just happened once and I couldn't reproduce (I didn't want to=20
reproduce it too since I would need to restart my computer because the driv=
er=20
wouldn't unload)...
When it happened I forgot to start the timer running the latency program an=
d=20
my driver failed to load and due to some mistake I've made (I have not=20
indentified it yet), it crashed on rmmoding. I need to check this, but I=20
still think it is a good idea to make the sanity checks...
I have not written the user-space program yet, so you'll have to wait until=
=20
monday, when I'll be able to test it, hopefully. But it seems to be=20
working... I changed my driver design. I do the mmap's on driver=20
initialization and just pass the returned addresses on the IOCTL, so I can =
do=20
them in a RT-context. The problem is that even if the user call an IOCTL to=
=20
munmap, it will still be possible to him to continue using the provided=20
address and this would result in a problem. But, as in all situations, ther=
e=20
are trade-offs and I prefer to rely on the user, while providing a=20
RT-MMAP-IOCTL. Of course it isn't really a mmap, but if the user don't mess=
=20
with the pointers, it will work like if it was...
Hope you understood me, I wrote it a little confusing... :)
Until monday! ;)
Rodrigo.
____________________________________________________________
Em Sexta 10 Fevereiro 2006 18:58, Rodrigo Rosenfeld Rosas escreveu:
>Hi Jan, I started the tests and had problems on unloading the module.
>
>I am probably doing something wrong but I think the driver shouldn't crash.
>Probably it is missing some sanity checks on rtdm_munmap like
>
>if (! (user_info && user_info->mm))
> return -EXXX;
>
>I'll investigate the problems... I had some unexpected things to investiga=
te
>today and haven't had enought time to test the patch but hopefully I'll do
> it on monday...
>
>That was the result:
>
>Unable to handle kernel NULL pointer dereference at virtual address 000000=
30
> printing eip:
>e0a1f2fc
>*pde =3D 00000000
>Oops: 0002 [#1]
>PREEMPT
>Modules linked in: rt_dt3153 parport_pc lp parport af_packet nls_iso8859_1
>nls_cp437 v4l2_common videodev video_buf xeno_rtdm xeno_native xeno_nucleus
>snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event
> snd_seq snd_seq_device snd_intel8x0 snd_ac97_codec snd_ac97_bus snd_pcm_o=
ss
> snd_mixer_oss snd_pcm e100 mii snd_timer evdev snd soundcore snd_page_all=
oc
> hw_random i2c_i801 i2c_core ehci_hcd intel_agp agpgart ide_cd uhci_hcd
> usbcore cdrom
>CPU: 0
>EIP: 0060:[<e0a1f2fc>] Not tainted VLI
>EFLAGS: 00010286 (2.6.15.4-adeos)
>EIP is at rtdm_munmap+0x11/0x44 [xeno_rtdm]
>eax: 00000030 ebx: d2e45a70 ecx: 00000000 edx: ffff0001
>esi: bfd72660 edi: 00000880 ebp: c2b20000 esp: c2b21f4c
>ds: 007b es: 007b ss: 0068
>Process rmmod (pid: 4254, threadinfo=3Dc2b20000 task=3Dd70bf550)
>Stack: e0bfafa0 bfd72660 e0bf7cbc d2e45a70 b7d92000 00096000 e0bfad80
> c0132e0d 645f7472 35313374 c0320033 00000246 c03fa4cc c013c881 00000021
> c0324200 00000246 c2b21fbc 00000021 00000001 c0324200 bfd72660 00d72660
> 00000000 Call Trace:
> [<e0bf7cbc>] cleanup_module+0x24/0x50 [rt_dt3153]
> [<c0132e0d>] sys_delete_module+0x12e/0x15f
> [<c013c881>] __ipipe_dispatch_event+0x56/0xd5
> [<c0102fc8>] syscall_call+0x7/0xb
>Code: 5f 89 e8 81 fd 18 fc ff ff 77 08 8b 5c 24 2c 89 2b 31 c0 59 5b 5b 5e
> 5f 5d c3 56 53 8b 5c 24 0c 8b 4b 78 8d 41 30 ba 01 00 ff ff <0f> c1 10 85
> d2 75 4c ff 74 24 14 ff 74 24 14 ff 73 78 e8 2f 02
>
>Regards,
>
>Rodrigo.
>
>____________________________________________________________
>
>Em Quinta 09 Fevereiro 2006 22:37, Jan Kiszka escreveu:
>>Jan Kiszka wrote:
>>> Hi all,
>>>
>>> this is a first attempt to add the requested mmap functionality to the
>>> RTDM driver API.
>>
>>... and this version is even more useful than the previous one (now with
>>EXPORT_SYMBOL!). Be warned: I just compiled it, I count on third-party
>>testers.
>>
>>Jan
>
>_______________________________________________________
>Yahoo! Acesso Gr=E1tis - Internet r=E1pida e gr=E1tis. Instale o discador =
agora!
>http://br.acesso.yahoo.com
>
>
>_______________________________________________
>Xenomai-core mailing list
>Xenomai-core@domain.hid
>https://mail.gna.org/listinfo/xenomai-core
_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
http://br.acesso.yahoo.com
next prev parent reply other threads:[~2006-02-10 21:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-10 0:09 [Xenomai-core] [PATCH] provide rtdm_mmap_to_user / rtdm_munmap Jan Kiszka
2006-02-10 0:37 ` Jan Kiszka
2006-02-10 20:58 ` Rodrigo Rosenfeld Rosas
2006-02-10 21:28 ` Rodrigo Rosenfeld Rosas [this message]
2006-02-11 0:35 ` Jan Kiszka
2006-02-11 13:11 ` Rodrigo Rosenfeld Rosas
2006-02-11 13:29 ` Jan Kiszka
2006-02-11 19:44 ` Rodrigo Rosenfeld Rosas
2006-02-12 22:45 ` Jan Kiszka
2006-02-13 3:22 ` Rodrigo Rosenfeld Rosas
2006-02-14 0:39 ` Jan Kiszka
2006-02-14 2:04 ` Rodrigo Rosenfeld Rosas
2006-02-14 7:55 ` Jan Kiszka
-- strict thread matches above, loose matches on Subject: below --
2006-02-14 13:14 Rodrigo Rosenfeld Rosas
2006-02-14 19:13 ` Philippe Gerum
2006-02-15 0:30 ` Jan Kiszka
2006-02-15 14:53 ` Rodrigo Rosenfeld Rosas
2006-02-16 17:14 ` Rodrigo Rosenfeld Rosas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200602101928.52899.lbocseg@domain.hid \
--to=lbocseg@domain.hid \
--cc=jan.kiszka@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.