* Syscall trouble
@ 2004-11-30 13:55 Søren Nøhr Christensen
2004-11-30 21:03 ` Chris Wright
0 siblings, 1 reply; 2+ messages in thread
From: Søren Nøhr Christensen @ 2004-11-30 13:55 UTC (permalink / raw)
To: linux-kernel; +Cc: umbrella
Hi all!
I have implemented a systemcall against linux-2.6.8.1 using the following
patches:
--- linux-2.6.8.1-clean/arch/i386/kernel/entry.S 2004-08-14
12:55:09.000000000 +0200
+++ linux-2.6.8.1/arch/i386/kernel/entry.S 2004-11-30 14:48:36.000000000
+0100
@@ -887,4 +887,7 @@
.long sys_mq_getsetattr
.long sys_ni_syscall /* reserved for kexec */
+ .long sys_umb_set_child_restrictions
syscall_table_size=(.-sys_call_table)
--- linux-2.6.8.1-clean/include/asm-i386/unistd.h 2004-08-14
12:55:35.000000000 +0200
+++ linux-2.6.8.1/include/asm-i386/unistd.h 2004-11-30 14:48:36.000000000
+0100
@@ -290,8 +290,13 @@
#define __NR_mq_getsetattr (__NR_mq_open+5)
#define __NR_sys_kexec_load 283
-#define NR_syscalls 284
-
+#define __NR_umb_set_child_restrictions 284
+
+#define NR_syscalls 285
/* user-visible error numbers are in the range -1 - -124: see
<asm-i386/errno.h> */
#define __syscall_return(type, res) \
This works like a charm. If i apply this to linux-2.6.9 it does not work
anymore. The syscall is in kallsyms, but nothing happens when I call it.
Any suggestions?
What am I missing?
//snc
----------------
Søren Nøhr Christensen
Computer Science @ AAU
snc@cs.aau.dk
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Syscall trouble
2004-11-30 13:55 Syscall trouble Søren Nøhr Christensen
@ 2004-11-30 21:03 ` Chris Wright
0 siblings, 0 replies; 2+ messages in thread
From: Chris Wright @ 2004-11-30 21:03 UTC (permalink / raw)
To: Søren Nøhr Christensen; +Cc: linux-kernel, umbrella
* Søren Nøhr Christensen (snc@cs.aau.dk) wrote:
<snip>
> +#define __NR_umb_set_child_restrictions 284
<snip>
> Any suggestions?
Don't do it this way. Use /proc/<pid>/attr/ interface if you only want
to handle creating restrictions within a process. If you're using it to
load your policy, then create a reasonable filesystem interface and do
it that way. This will be portable across versions and architectures
without allocating any syscalls.
thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-11-30 21:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-30 13:55 Syscall trouble Søren Nøhr Christensen
2004-11-30 21:03 ` Chris Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox