Re: Accessing a user space variable from a kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi,

There is a function move_addr_to_kernel() used by sys_bind() system call.
You can see the definition of this function in net/socket.c file. This in
fact used the call copy_from_user().

Hope this helps.

Regards
--gb

Never trust an operating system you don't have sources for. ;-)

On Thu, 1 Aug 2002, Jeremy Andrus wrote:

>
> Hello,
>   I have written a custom netfilter target that sends a small amount of
> data out over the PCI bus. To get this to work I also wrote an
> associated iptables shared library. Both the kernel netfilter module
> and the user space shared library have "entry" functions that run when
> the kernel module is mod-probed.
>   Here is my dilemma: I can discover the host computer's IP address in
> the user-space function, but I want to send that data out to the PCI
> card. In order to do this, it needs the kernel-mapped, base IO address
> of the card. This is stored in the kernel module. How can I either send
> (make available?) the IP address to the kernel module, or send (make
> available?) the base IO address of the PCI card to the user space
> library function?
>
> Thanks,
>
> 	-Jeremy
>
> --
> ----------------------------
> Jeremy C. Andrus
> http://www.jeremya.com/
> ----------------------------
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
>
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux