|
@@ -296,7 +296,7 @@ The second macro `__SYSCALL_DEFINEx` expands to the definition of the five follo
|
|
static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
|
|
static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
|
|
```
|
|
```
|
|
|
|
|
|
-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:
|
|
|
|
|
|
+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 applies `__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
|
|
```C
|
|
asmlinkage long sys_write(unsigned int fd, const char __user * buf, size_t count);
|
|
asmlinkage long sys_write(unsigned int fd, const char __user * buf, size_t count);
|