mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pascal Schmidt <der.eremit@email.de>
To: nf <nf2@scheinwelt.at>
Cc: kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: Nonotify 0.3.2 (A simple dnotify replacement)
Date: Sun, 22 Aug 2004 18:04:13 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0408221757100.7831@neptune.local> (raw)
In-Reply-To: <1093181664.4542.47.camel@lilota.lamp.priv>

On Sun, 22 Aug 2004, nf wrote:

> But i didn't want to bother people with asking to assign me a
> syscall-number before even knowing if they like my idea. And changing it
> to use a syscall lateron would be no problem at all from the concept of
> nonotify.

Right. It's just something to consider if you aim for inclusion in
the mainline tree later.

> Also - as a kernel newbie - i didn't find any good documentation how to
> add my own syscall into the kernel. I just wanted to get nonotify
> working as an 'optional patch', without changing tons of files.

Adding a syscall should roughly work like this:

- write your sys_foo() function
- add your syscall number to include/asm-i386/unistd.h, don't forget
  to change the "#define NR_syscalls" accordingly
- add ".long sys_foo" to sys_call_table in arch/i386/kernel/entry.S,
  in the right place (i.e. syscall 290 would need to be element 290
  in the list)
- arrange for the object file with sys_foo in it to be linked into
  the kernel

You're right, your going to have to touch a couple of files for
this approach.

> But you could help me if you have a look at my ioctl function. I'm using
> a structure which contains a char* pointer and four timespec fields. Do
> you know if this causes problems with 32/64bit compatibility.

I don't think the timespecs will be a problem. However, the char
pointer will have different sizes and alignment requirements on
32bit and 64bit system. I'm no expert in how that can be handled
in the compat layer, though.

-- 
Ciao,
Pascal

  reply	other threads:[~2004-08-22 16:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2vRn8-1D3-9@gated-at.bofh.it>
2004-08-22 12:29 ` Pascal Schmidt
2004-08-22 13:34   ` nf
2004-08-22 16:04     ` Pascal Schmidt [this message]
2004-08-22  3:37 nf

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=Pine.LNX.4.58.0408221757100.7831@neptune.local \
    --to=der.eremit@email.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nf2@scheinwelt.at \
    /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®