There is a mandate of 16-byte aligned stack on AArch64 [1], so the STACK_SIZE here should also be 16-byte aligned, otherwise we would get an error when calling clone(). [1] http://lxr.free-electrons.com/source/arch/arm64/kernel/process.c#L265
Showing the changes to tools/testing (1 of 1 file). Show all
Unified · Split
| @@ -18,7 +18,7 @@ · 17 unmodified lines | |||
| 18 | #include <unistd.h> | 18 | #include <unistd.h> |
| 19 | 19 | ||
| 20 | #define MFD_DEF_SIZE 8192 | 20 | #define MFD_DEF_SIZE 8192 |
| 21 | #define STACK_SIZE 65535 | 21 | #define STACK_SIZE 65536 |
| 22 | 22 | ||
| 23 | static int sys_memfd_create(const char *name, | 23 | static int sys_memfd_create(const char *name, |
| 24 | unsigned int flags) | 24 | unsigned int flags) |