Re: Want to know something about mlock or shmctl via SHMLOCK
- From: "sorcerer" <nagual.hsu@xxxxxxxxx>
- Date: 24 Dec 2005 07:54:08 -0800
Kasper Dupont wrote:
> > Is that possible?
>
> On some architectures it may seem to work. But in reallity
> you will introduce security holes, race conditions, and
> nonportable code.
Yes. I just considered our own use in the products( not for
other programs).
I need some form of IPC for near realtime messages.
They will look like pthread_cond_wait/pthread_cond_timed_wait
and pthread_cond_signal/pthread_cond_broadcast, but this new
form of IPC is for processes.
Besides, in this architecture, the producer process must pass
messages( ie. via process_cond_broadcast ) to the consumer processes
which wait for the message. So the other consumer processes will not
receive any message from the producer process unless they are ready
for the message.
I want this IPC as fast as possible at any means. Security holes?
yes. Nonportable code? yes. Race conditions? I don't understand. Thanks
if any explainations is given.
I am not a leader and just a programmer and I do not think very
much
due to my limited experience. Other team members develop their own
parts using processes, not threads. Since I am responsible for some
kind of low-level bare bone architecture for them, this is what I can
think about.
I think I will implement this using get_user_pages at last but I
will
always lock the memory in the beginning when the system starts. I ever
implemeted memory copy between two processes using get_user_pages
(in fact, I used it as process_cond_broadcast). And I doubt what I
implemented is buggy since I am no linux VMM expert. I did not take the
reference of ptrace.c while I implemented that.
Sincerely, Joe
.
- Follow-Ups:
- References:
- Want to know something about mlock or shmctl via SHMLOCK
- From: sorcerer
- Want to know something about mlock or shmctl via SHMLOCK
- Prev by Date: Re: How to intercept a sys call.
- Next by Date: Re: How to intercept a sys call.
- Previous by thread: Want to know something about mlock or shmctl via SHMLOCK
- Next by thread: Re: Want to know something about mlock or shmctl via SHMLOCK
- Index(es):