From: Yaroslav Rastrigin <yarick@relex.ru>
To: linux-kernel@vger.kernel.org
Subject: IPC usage inside of kernel module
Date: Tue, 17 Apr 2001 20:46:30 +0400 [thread overview]
Message-ID: <01041720463000.28962@yarick> (raw)
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
reply other threads:[~2001-04-17 16:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=01041720463000.28962@yarick \
--to=yarick@relex.ru \
--cc=linux-kernel@vger.kernel.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.