diff options
author | Mattias Andrée <maandree@kth.se> | 2023-11-27 22:28:31 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-11-27 22:28:31 +0100 |
commit | 964ec5397c6f1b08ae5422fdf1da884e64039a35 (patch) | |
tree | 9d2669d81491d8d3de04998014e77d93cbab778d | |
parent | Add system calls and scripts for finding new and extended system calls (diff) | |
download | sctrace-964ec5397c6f1b08ae5422fdf1da884e64039a35.tar.gz sctrace-964ec5397c6f1b08ae5422fdf1da884e64039a35.tar.bz2 sctrace-964ec5397c6f1b08ae5422fdf1da884e64039a35.tar.xz |
Linux limits errno values to [1, 4096)
Linux returns errno values negated, as such errno as returned
are limited to be inside address range of the bytes within
the higest addressable memory page, provided that the page
size is 4096 or greater.
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | linux/os.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -23,7 +23,7 @@ #endif #define RETURN_IS_ERROR(RET)\ - ((RET) > -(unsigned long long int)PAGE_SIZE) /* Don't know the actual limit, but this seems safe */ + ((RET) > -(unsigned long long int)4096) /* I guess Linux promises to never use a smaller page size */ #if defined(__x86_64__) && !defined(__IPL32__) # include "x86-64.h" |