All of lore.kernel.org
 help / color / mirror / Atom feed
* Kernel Module with multiple source files not initializing
@ 2019-10-25  9:14 Irfan Ullah (울라 이르판)
  2019-10-25 16:15 ` Abu Rasheda
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Irfan Ullah (울라 이르판) @ 2019-10-25  9:14 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 3491 bytes --]

Dear All,
I have developed a kernel module consists of one source file that sends and
receives  message to the user space.  I have spitted the source code in two
files, and now I  am trying to develop kernel module from these source
files. After compiling and linking without any problems, I insmod the
module but I didn’t see any of the printk() I wrote, in fact, the module
can be inserted and removed, but it does nothing. Code is in the attached
file zipped file.
I tried many things , e.g.,  link <https://paguilar.org/?p=7>1, link2
<https://www.linuxquestions.org/questions/linux-kernel-70/kernel-module-with-multiple-source-files-not-initializing-886190/>,
and link3
<https://android.googlesource.com/kernel/msm/+/android-msm-dory-3.10-kitkat-wear/Documentation/kbuild/modules.txt>
etc.
but nothings worked out.
I also used *nm* to inspect the module, but, as expected, there was no
signs of "__init and __exit" functions can in the output.
                                 U __alloc_skb
00000000000001c0 T create_socket
0000000000000030 T data_update
                                 U __fentry__
                                 U fortify_panic
0000000000000000 r __func__.5058
                                 U init_net
0000000000000000 t kernel_space_receiver
0000000000000080 T kernel_space_sender
                                  U memcpy
0000000000000038 r __module_depends
0000000000000008 D msg_size
                                 U msleep
                                 U __netlink_kernel_create
                                 U netlink_kernel_release
                                 U netlink_unicast
0000000000000078 B nlh
                                 U __nlmsg_put
0000000000000080 B nl_sk
0000000000000000 r _note_6
0000000000000004 D pid
                                 U printk
0000000000000000 D res
0000000000000000 B s_data
0000000000000070 B skb_out
                                  U __stack_chk_fail
                                  U strlen
0000000000000000 D __this_module
0000000000000000 r __UNIQUE_ID_license381
000000000000004d r __UNIQUE_ID_name240
0000000000000041 r __UNIQUE_ID_retpoline241
0000000000000010 r __UNIQUE_ID_srcversion242
0000000000000068 r __UNIQUE_ID_vermagic239
--------------------
*Following is the output of some useful commands:*
-------------------------------------------------
*ssd@ssd:~/Desktop/Kernel_User_comm$ ls*
Makefile  netlink_kernel_module.c  netlink_kernel_space.c
 netlink_kernel_space.h  netlink_user_module.c
---------------------------------------------------
*ssd@ssd:~/Kernel_User_comm$ make --version*
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
-------------------------------------------------------
*ssd@ssd:~/Kernel_User_comm$ uname -r*
5.2.0-rc6
--------------------------------------------------------
Can you please help me: what's the problem/mistake I am doing?
Thank you very much.

-- 
*Best Regards,*


*Mr. Irfan Ullah*
PhD Candidate
Data and Knowledge Engineering(DKE) Lab
Department of Computer Science and Engineering
Kyung Hee University, South Korea.
 +82-010-591-51651 <+82%2010-3877-8867>
  sahibzada.iu@gmail.com
 sahibzada_irfanullah

[-- Attachment #1.2: Type: text/html, Size: 5970 bytes --]

[-- Attachment #2: Kernel_User_comm.zip --]
[-- Type: application/zip, Size: 4284 bytes --]

[-- Attachment #3: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-11-07  1:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25  9:14 Kernel Module with multiple source files not initializing Irfan Ullah (울라 이르판)
2019-10-25 16:15 ` Abu Rasheda
2019-10-27  7:11   ` Irfan Ullah (울라 이르판)
2019-10-27  8:43 ` Bernd Petrovitsch
2019-10-28  9:43   ` Irfan Ullah (울라 이르판)
2019-10-28 10:04     ` Bernd Petrovitsch
2019-10-29  8:30       ` Irfan Ullah (울라 이르판)
2019-11-05 16:52 ` Aruna Hewapathirane
2019-11-07  1:50   ` Irfan Ullah (울라 이르판)

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.