* [PATCH] selftests: memfd: Align STACK_SIZE for ARM AArch64 system
@ 2017-08-10 11:04 Orson Zhai
2017-08-11 15:55 ` Sumit Semwal
0 siblings, 1 reply; 3+ messages in thread
From: Orson Zhai @ 2017-08-10 11:04 UTC (permalink / raw)
To: Shuah Khan
Cc: linux-kselftest, linux-kernel, sumit.semwal, chunyan.zhang, Orson Zhai
The stack size should be 16 bytes aligned in arm64 system. The similar
patch has been merged already.
> <commit id: 1f78dda2cf5e4eeb00aee2a01c9515e2e704b4c0>
> selftests: memfd_test: Revised STACK_SIZE to make it 16-byte aligned
>
> 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
>
> Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Orson Zhai <orson.zhai@linaro.org>
---
tools/testing/selftests/memfd/fuse_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/memfd/fuse_test.c b/tools/testing/selftests/memfd/fuse_test.c
index 67908b18f035..7f3617274bf5 100644
--- a/tools/testing/selftests/memfd/fuse_test.c
+++ b/tools/testing/selftests/memfd/fuse_test.c
@@ -33,7 +33,7 @@
#include <unistd.h>
#define MFD_DEF_SIZE 8192
-#define STACK_SIZE 65535
+#define STACK_SIZE 65536
static int sys_memfd_create(const char *name,
unsigned int flags)
--
2.12.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests: memfd: Align STACK_SIZE for ARM AArch64 system
2017-08-10 11:04 [PATCH] selftests: memfd: Align STACK_SIZE for ARM AArch64 system Orson Zhai
@ 2017-08-11 15:55 ` Sumit Semwal
2017-08-11 16:10 ` Shuah Khan
0 siblings, 1 reply; 3+ messages in thread
From: Sumit Semwal @ 2017-08-11 15:55 UTC (permalink / raw)
To: Orson Zhai
Cc: Shuah Khan, open list:KERNEL SELFTEST FRAMEWORK, LKML, chunyan.zhang
Hello Orson,
Thanks for the patch.
On 10 August 2017 at 16:34, Orson Zhai <orson.zhai@linaro.org> wrote:
> The stack size should be 16 bytes aligned in arm64 system. The similar
> patch has been merged already.
>
>> <commit id: 1f78dda2cf5e4eeb00aee2a01c9515e2e704b4c0>
>> selftests: memfd_test: Revised STACK_SIZE to make it 16-byte aligned
>>
>> 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
>>
>> Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
>> Acked-by: Arnd Bergmann <arnd@arndb.de>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>
> Signed-off-by: Orson Zhai <orson.zhai@linaro.org>
Please feel free to add my
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
> ---
> tools/testing/selftests/memfd/fuse_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/memfd/fuse_test.c b/tools/testing/selftests/memfd/fuse_test.c
> index 67908b18f035..7f3617274bf5 100644
> --- a/tools/testing/selftests/memfd/fuse_test.c
> +++ b/tools/testing/selftests/memfd/fuse_test.c
> @@ -33,7 +33,7 @@
> #include <unistd.h>
>
> #define MFD_DEF_SIZE 8192
> -#define STACK_SIZE 65535
> +#define STACK_SIZE 65536
>
> static int sys_memfd_create(const char *name,
> unsigned int flags)
> --
> 2.12.2
>
Best,
Sumit.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests: memfd: Align STACK_SIZE for ARM AArch64 system
2017-08-11 15:55 ` Sumit Semwal
@ 2017-08-11 16:10 ` Shuah Khan
0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2017-08-11 16:10 UTC (permalink / raw)
To: Sumit Semwal, Orson Zhai
Cc: open list:KERNEL SELFTEST FRAMEWORK, LKML, chunyan.zhang, Shuah Khan
On 08/11/2017 09:55 AM, Sumit Semwal wrote:
> Hello Orson,
>
> Thanks for the patch.
>
> On 10 August 2017 at 16:34, Orson Zhai <orson.zhai@linaro.org> wrote:
>> The stack size should be 16 bytes aligned in arm64 system. The similar
>> patch has been merged already.
>>
>>> <commit id: 1f78dda2cf5e4eeb00aee2a01c9515e2e704b4c0>
>>> selftests: memfd_test: Revised STACK_SIZE to make it 16-byte aligned
>>>
>>> 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
>>>
>>> Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
>>> Acked-by: Arnd Bergmann <arnd@arndb.de>
>>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>>
>> Signed-off-by: Orson Zhai <orson.zhai@linaro.org>
> Please feel free to add my
> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Thanks for the patch and review.
Applied to linux-kselftest next for 4.14-rc1
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-11 16:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-10 11:04 [PATCH] selftests: memfd: Align STACK_SIZE for ARM AArch64 system Orson Zhai
2017-08-11 15:55 ` Sumit Semwal
2017-08-11 16:10 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).