From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,HTML_OBFUSCATE_05_10, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE356CA9EBC for ; Fri, 25 Oct 2019 16:18:15 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 809C321872 for ; Fri, 25 Oct 2019 16:18:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Br45hk50" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 809C321872 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1iO2HU-0000Zs-9O; Fri, 25 Oct 2019 12:17:40 -0400 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) (envelope-from ) id 1iO2HR-0000Zj-4v for kernelnewbies@kernelnewbies.org; Fri, 25 Oct 2019 12:17:37 -0400 Received: by mail-il1-x133.google.com with SMTP id f13so2311724ils.11 for ; Fri, 25 Oct 2019 09:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Anr1+vKIvo2U5Zkd1vh4zgkpNaKCTvlOqP5eG2Ucscw=; b=Br45hk50Pyb/gYu4mGlQisc+enHpptfbqls7WkY1lyQkWxNnxgxt/MJk50IifuFg4r ysWElxY2bOdugzml2Ows7vYfw4ELPhJKTZtzZByP/vjUgsa/+fKVO4Qp2WlceQPEpcJq quZFTrWxVoOM36vr2x+9wY9S2ZuqHJsN6axVmuaEFhRXIGLcQNJ987vAiprheG3em4RY ACFcKUUyD/Lo35cq1+VRCelMk8JyWuEpYJeDjj6YvqCwaZ9HIIw8G1JDpEPlyd9C433j iN7B8zrDQeRQUIdusmxW8XWvlUQolW8VJycuiOnFxyJ32744BxNjmmZoG+CVKzcvKLOM upGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Anr1+vKIvo2U5Zkd1vh4zgkpNaKCTvlOqP5eG2Ucscw=; b=kHU7HPGT55xtZOZw1ea39Ykpr6bZeO4Kw+eRidLvjav+lShAJ1P6cuEo6480axPk3u 665P1U+1+STQd5GbCuvLzjlpGiZsdFbq47Hbm6MHUzc+DQd7naRN2KA8Negt59kssPup OPxVOEcVs9XtAkpA/WXpQ8vRzaovV0Ra2Z+zikr36bsfF1vU5x/KLnimQU+NJ9EhnmrU PE9PNNgIatiL1szkxSeLlKiKEExdMMixR8V/lWVacSTw/yUTQePh7YkNUd6TNB5kJWV3 uc+VqdKTFGrSwHyGh1EjpnE3uYFYxz4yWkF0hSgE86Y3l2haB4/eqyXOM8EnK+1vFGUf xnXQ== X-Gm-Message-State: APjAAAVo+tv8QVjpQhYwQjPaVaXaP4d3SVoYIpjNo2mHfYTnpxdVsDDd jQF6ziSKtzWksig1ptK7GfS8boDQpQl8/MK/ly2lSl0H X-Google-Smtp-Source: APXvYqyqehZ1cSCU9AHxL+7BcBTokCvxrXie4n2Z6z5dgYx2Hz+G8TfdbPXR4kh9iuIE9qix0Qn0YJie1Rq8VZbSm4o= X-Received: by 2002:a92:85:: with SMTP id 127mr5208840ila.118.1572020194411; Fri, 25 Oct 2019 09:16:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Abu Rasheda Date: Fri, 25 Oct 2019 09:15:58 -0700 Message-ID: Subject: Re: Kernel Module with multiple source files not initializing To: =?UTF-8?B?SXJmYW4gVWxsYWggKOyauOudvCDsnbTrpbTtjJAp?= Cc: Linux Kernel List X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0438777861771753024==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============0438777861771753024== Content-Type: multipart/alternative; boundary="000000000000448bd90595be7907" --000000000000448bd90595be7907 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Oct 25, 2019 at 2:16 AM Irfan Ullah (=EC=9A=B8=EB=9D=BC =EC=9D=B4= =EB=A5=B4=ED=8C=90) wrote: > 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 sourc= e > files. After compiling and linking without any problems, I insmod the > module but I didn=E2=80=99t 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 1, link2 > , > and link3 > 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. > I assume you have verified that your module is loaded by something like lsmod | grep your_module_name and log level allows KERN_ALERT printing. --000000000000448bd90595be7907 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Oct 25, 2019 at 2:16 AM Irfan Ull= ah (=EC=9A=B8=EB=9D=BC =EC=9D=B4=EB=A5=B4=ED=8C=90) <irfan@dke.khu.ac.kr> wrote:
Dear All,
I have developed a kernel module consists of one sou= rce file that sends and receives=C2=A0 message to the user space.=C2=A0 I h= ave spitted the source code in two files, and now I=C2=A0 am trying to deve= lop kernel module from these source files. After compiling and linking with= out any problems, I insmod the module but I didn=E2=80=99t see any of the p= rintk() I wrote, in fact, the module can be inserted and removed, but it do= es nothing. Code is in the attached file zipped file.
I tried man= y things , e.g.,=C2=A0=C2=A0link1,=C2=A0link2, and=C2=A0link3=C2=A0etc.=C2=A0 but n= othings worked out.=C2=A0
I also used=C2=A0nm=C2=A0to insp= ect the module, but, as expected, there was no signs of "__init and __= exit" functions can in the output.=C2=A0
=
I assume you have verified that your module is loaded by som= ething like

lsmod | grep your_module_name

and log level allows=C2=A0KERN_ALERT printing.
= --000000000000448bd90595be7907-- --===============0438777861771753024== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============0438777861771753024==--