lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 13 Nov 2006 10:23:18 +0100 (MET)
From:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
To:	Amit Choudhary <amit2030@...il.com>
cc:	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] implement-system-call-mini-HOWTO.txt


On Nov 12 2006 22:14, Amit Choudhary wrote:
>+*How is it invoked?
>+--A library routine issues a trap to the OS by executing INT 0x80 assembly instruction.
>+--The system call number is passed through the EAX register.
>+--The arguments are passed through registers  EBX, ECX, etc.

A nice short description, however, not all of the world runs x86 and may 
not know E?X. Just mention that you will describe the process based on 
x86.

>+*The Makefile in dir "mycall" will have only one line:
>+
>+#####Makefile Start#####
>+obj-y := mycall.o
>+#####Makefile End#######

I am tempted to use  obj-y += mycall.o

Generally, one does not need a new directory for a new syscall, or a new 
source file. You can edit kernel/sys.c if you like.

>+--Line 3:
>+	_syscall1(long, mycall, int, i)
>+	This is needed for system calls with 1 argument. It is explained in detail
>+        below.

This was deprecated in favor of syscall().

>+#include<stdio.h>
>+#include "testmycall.h"
>+
>+main()
>+{
>+        printf("%d\n", mycall(15));
>+}

Care to use ANSI C?


	-`J'
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ