* IPC usage inside of kernel module
@ 2001-04-17 16:46 Yaroslav Rastrigin
0 siblings, 0 replies; only message in thread
From: Yaroslav Rastrigin @ 2001-04-17 16:46 UTC (permalink / raw)
To: linux-kernel
Hello everybody !
I needed to implement an IPC connectiovity between module and
userspace daemon, and came to this horrible code (after looking to
sys_msgsnd() ):
...
copy_to_user(msg_buf, &hlb1, sizeof(struct linfs_buffer));
hi1 = sys_ipc(MSGSND, msgq_id, message_size, 0, \
(struct msgbuf *)msg_buf, 0);
...
msg_buf is in userspace, hlb1 - module's prepared message (struct msgbuf ).
Well, it works :) . Messages are delivered,
but the whole construction looks rather ugly. The worst part of it is
sys_msgsnd() does then copy_from_user to kmalloc()'ed buffer, just to enqueue
message. Can somebody tell me, is there any other way to implement IPC
functionality , without rewriting sys_msgsnd() and accompanying functions
(load_msg etc.) inside of my module ?
With all the best, yarick at relex dot ru
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-04-17 16:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-17 16:46 IPC usage inside of kernel module Yaroslav Rastrigin
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.