Skip to contentSkip to conversation

other architectures

PATCH Russell Coker 2 participants 2 messages Dec 8, 2002 – Dec 9, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

I have attached a kernel patch I use to add system call numbers for sys_security for all architectures.

I have modified my Debian package build scripts to use numbers from this patch when compiling the system call code and to use -D_FILE_OFFSET_BITS=32 when compiling setfiles on architectures other than i386. I'll probably try and solve this tomorrow.

With these changes the S/390 auto-builder successfully built the selinux-small packages a few hours ago!

This means that we are a step closer to getting full Debian support for SE Linux (now I may be able to get the main psmisc and procps packages to be built with SE Linux support)!

My real aim in this was to get ARM working. I can compile my own ARM packages but the ARM auto-builder is way behind and may not get to my packages for weeks. :(

ARM already had a syscall number reserved so I didn't need a patch for that, but I decided to get some things working on S/390 first as it has the fastest auto-builders and the S/390 people answer questions faster on mailing lists.

Signature · 4 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page
include/asm-m68k/unistd.h +1 -0
diff -ru linux-2.4.20/include/asm-m68k/unistd.h linux-2.4.20.patched/include/asm-m68k/unistd.h
@@ -237,6 +237,7 @@
 #define __NR_removexattr	232
 #define __NR_lremovexattr	233
 #define __NR_fremovexattr	234
+#define __NR_security		235     /* syscall for security modules */
 
 /* user-visible error numbers are in the range -1 - -122: see
    <asm-m68k/errno.h> */
include/asm-parisc/unistd.h +2 -1
diff -ru linux-2.4.20/include/asm-parisc/unistd.h linux-2.4.20.patched/include/asm-parisc/unistd.h
@@ -700,8 +700,9 @@
 #define __NR_acl_set            (__NR_Linux + 205)
 #define __NR_gettid             (__NR_Linux + 206)
 #define __NR_readahead          (__NR_Linux + 207)
+#define __NR_security           (__NR_Linux + 208)  /* syscall for security */
 
-#define __NR_Linux_syscalls     207
+#define __NR_Linux_syscalls     208
 
 #define HPUX_GATEWAY_ADDR       0xC0000004
 #define LINUX_GATEWAY_ADDR      0x100
include/asm-ppc/unistd.h +1 -0
diff -ru linux-2.4.20/include/asm-ppc/unistd.h linux-2.4.20.patched/include/asm-ppc/unistd.h
@@ -241,6 +241,7 @@
 #define __NR_io_submit		230
 #define __NR_io_cancel		231
 #endif
+#define __NR_security		232 /* syscall for security modules */
 
 #define __NR(n)	#n
 
include/asm-ppc64/unistd.h +1 -0
diff -ru linux-2.4.20/include/asm-ppc64/unistd.h linux-2.4.20.patched/include/asm-ppc64/unistd.h
@@ -232,6 +232,7 @@
 #define __NR_fremovexattr	220
 #define __NR_futex		221
 #endif
+#define __NR_security		232 /* syscall for security modules */
 
 #define __NR(n)	#n
 
include/asm-s390/unistd.h +1 -0
diff -ru linux-2.4.20/include/asm-s390/unistd.h linux-2.4.20.patched/include/asm-s390/unistd.h
@@ -217,6 +217,7 @@
  */
 #define __NR_gettid		236
 #define __NR_tkill		237
+#define __NR_security		238 /* reserved for security */
 
 /* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
 
include/asm-s390x/unistd.h +1 -0
diff -ru linux-2.4.20/include/asm-s390x/unistd.h linux-2.4.20.patched/include/asm-s390x/unistd.h
@@ -185,6 +185,7 @@
  */
 #define __NR_gettid		236
 #define __NR_tkill		237
+#define __NR_security		238 /* reserved for security */
 
 
 /* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
include/asm-sh/unistd.h +1 -0
diff -ru linux-2.4.20/include/asm-sh/unistd.h linux-2.4.20.patched/include/asm-sh/unistd.h
@@ -233,6 +233,7 @@
 #define __NR_fcntl64		221
 #define __NR_gettid		222
 #define __NR_tkill		223
+#define __NR_security		224 /* reserved for security */
 
 /* user-visible error numbers are in the range -1 - -125: see <asm-sh/errno.h> */
 
include/asm-sparc/unistd.h +1 -0
diff -ru linux-2.4.20/include/asm-sparc/unistd.h linux-2.4.20.patched/include/asm-sparc/unistd.h
@@ -271,6 +271,7 @@
 #define __NR_fdatasync          253
 #define __NR_nfsservctl         254
 #define __NR_aplib              255
+#define __NR_security           256 /* reserved for security */
 
 #define _syscall0(type,name) \
 type name(void) \
include/asm-sparc64/unistd.h +1 -0
diff -ru linux-2.4.20/include/asm-sparc64/unistd.h linux-2.4.20.patched/include/asm-sparc64/unistd.h
@@ -273,6 +273,7 @@
 #define __NR_fdatasync          253
 #define __NR_nfsservctl         254
 #define __NR_aplib              255
+#define __NR_security           256 /* reserved for security */
 
 #define _syscall0(type,name) \
 type name(void) \
include/asm-x86_64/unistd.h +4 -0
diff -ru linux-2.4.20/include/asm-x86_64/unistd.h linux-2.4.20.patched/include/asm-x86_64/unistd.h
@@ -427,7 +427,11 @@
 __SYSCALL(__NR_tuxcall, sys_ni_syscall)
 
 #define __NR_security			185 /* reserved for security */
+#ifdef CONFIG_SELINUX
+__SYSCALL(__NR_security, sys_security)
+#else
 __SYSCALL(__NR_security, sys_ni_syscall)
+#endif
 
 #define __NR_gettid		186
 __SYSCALL(__NR_gettid, sys_gettid)
#1 lore raw
Quoted 3 lines · Russell Coker

This means that we are a step closer to getting full Debian support for SE Linux (now I may be able to get the main psmisc and procps packages to be built with SE Linux support)!

GREAT!

This means that the only thing that won't be available in Debian is a patched kernel...

For that you can you my kernel ;-).

Signature · 6 lines
Brian May <[email protected]>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.