From 89b67c5dc8a3301b679d709eaa4d07256baff302 Mon Sep 17 00:00:00 2001 From: 0xAX <0xAX@users.noreply.github.com> Date: Fri, 11 Sep 2015 23:11:13 +0600 Subject: [PATCH] Update syscall-1.md --- SysCall/syscall-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SysCall/syscall-1.md b/SysCall/syscall-1.md index 943d878..7d729ec 100644 --- a/SysCall/syscall-1.md +++ b/SysCall/syscall-1.md @@ -299,7 +299,7 @@ The second macro `__SYSCALL_DEFINEx` expands to the definition of the five follo The first `sys##name` is definition of the syscall handler function with the given name - `sys_system_call_name`. The `__SC_DECL` macro takes the `__VA_ARGS__` and combines call input parameter system type and the parameter name, because the macro definition is unable to determine the parameter types. And the `__MAP` macro applyes `__SC_DECL` macro to the `__VA_ARGS__` arguments. The other functions that are generated by the `__SYSCALL_DEFINEx` macro are need to protect from the [CVE-2009-0029](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0029) and we will not dive into details about this here. Ok, as result of the `SYSCALL_DEFINE3` macro, we will have: ```C -asmlinkage long sys_write(unsigned int fd, const char __user * filename, size_t count); +asmlinkage long sys_write(unsigned int fd, const char __user * buf, size_t count); ``` Now we know a little about the system call's definition and we can go back to the implementation of the `write` system call. Let's look on the implementation of this system call again: