From: Jean Fekry Rizk <jeanfekry@yahoo.com>
To: "Albert D. Cahalan" <acahalan@cs.uml.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linking with kernel code (Makefile)
Date: Mon, 11 Dec 2000 16:34:55 -0800 (PST) [thread overview]
Message-ID: <20001212003455.11975.qmail@web215.mail.yahoo.com> (raw)
The character device is a good idea!!!
But how would the device's mmap be implemented?
I know how the read and write work, but they copy the data from one space
to another, which would be slow if there is much communication. Because
this looses the benifits of shared memory
About the kernel linking, I'm not making a module driver,
I'm trying to recompile the kernel after adding my file (kshared.c)
I guess I should be able to access all structures and functions in the
kernel, if I succeed to link correctly with the files containing those
functions and structures, but I'm not so good at make files.
--- "Albert D. Cahalan" <acahalan@cs.uml.edu> wrote:
> > What I want to do:
> > create a shared memory segment between user space and kernel space
>
> Create a character device.
> Have the driver allocate memory.
> Let the user mmap() it.
>
> > I can't link with the array or the function, this also happens
> with
> > all functions that are not defined in 'ksyms'
> > Even though I declared 'newseg' and 'shm_segs' as 'extern' in my
> file
> ...
> > But while making bzImage, it gives the error unresolved external
> 'newseg'
> >
> > So my question is how can I link to the kernel source code, or am I
> not
> > allowed to?
>
> You are not allowed to use interfaces that are not exported.
> This is partly to prevent you from depending on code that is
> very likely to change, and partly to prevent a Microsoft Linux
> or similar abuse of the GPL.
>
> If you really need it, make a non-module driver. Maybe after
> that gets accepted into the main kernel you could convince
> Linus to export the function you want for module use.
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2000-12-12 1:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-12 0:34 Jean Fekry Rizk [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-12-11 23:31 Jean Fekry Rizk
2000-12-10 23:12 Jean Fekry Rizk
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=20001212003455.11975.qmail@web215.mail.yahoo.com \
--to=jeanfekry@yahoo.com \
--cc=acahalan@cs.uml.edu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®