From: n.borisov.lkml@gmail.com (Nikolay Borisov)
To: kernelnewbies@lists.kernelnewbies.org
Subject: [help] How to test kernel code that I wrote?
Date: Wed, 24 Aug 2016 13:23:28 +0300 [thread overview]
Message-ID: <57BD75A0.3010201@gmail.com> (raw)
In-Reply-To: <CAEQ0BR4f+crD5guww6-868dC8HaJnFzdrq4KFLyZ3NqwzAE2HQ@mail.gmail.com>
On 08/24/2016 01:18 PM, Louie Lu wrote:
> Hi everyone,
>
> I'm now reading *Unreliable Guide To Locking* which came from
> kernelnewbies.org (https://kernelnewbies.org/Documents/Kernel-Docbooks)
>
> What I want to do is trying run the code that in this doc from 7.1 All
> In User Context.
>
> In my knowing for kernel programming,
> I'll need to compile the code to something like
> `main.ko` then insert into kernel space using `insmod`.
>
> Here is the GitHub that I'm doing PoC code:
> https://github.com/grapherd/unreliable_guide_to_locking
>
> My question is,
> Is my knowing right?
> and, how can I use the function in main.ko (e.g. cache_add).
> I'm using these function by test.ko, is that a normal way to use it?
>
> in this doc have mention, there have hardirq, softirq.
> How can I test it from these irq method?
>
You have to create some sort of an interface which utilizes those kernel
function. That might be IOCTL or procfiles or debugfs or any other
number of UM<=>KM interfaces.
>
> Thanks!
> Louie Lu.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
next prev parent reply other threads:[~2016-08-24 10:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 10:18 [help] How to test kernel code that I wrote? Louie Lu
2016-08-24 10:23 ` Nikolay Borisov [this message]
2016-08-24 11:39 ` Louie Lu
2016-08-24 23:27 ` Dave Hylands
2016-08-25 8:04 ` Louie Lu
2016-08-25 13:32 ` Valdis.Kletnieks at vt.edu
2016-08-25 13:35 ` Valdis.Kletnieks at vt.edu
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=57BD75A0.3010201@gmail.com \
--to=n.borisov.lkml@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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.