public inbox for linux-api@vger.kernel.org
 help / color / mirror / Atom feed
From: Chunyan Zhang <zhang.chunyan@linaro.org>
To: shuahkh@osg.samsung.com
Cc: linux-api@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] selftests: memfd_test: Revised STACK_SIZE to make it 16-byte aligned
Date: Thu,  1 Oct 2015 15:33:02 +0800	[thread overview]
Message-ID: <1443684782-10898-1-git-send-email-zhang.chunyan@linaro.org> (raw)

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>
---
 tools/testing/selftests/memfd/memfd_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c
index 0b9eafb..aa5d3eb 100644
--- a/tools/testing/selftests/memfd/memfd_test.c
+++ b/tools/testing/selftests/memfd/memfd_test.c
@@ -18,7 +18,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)
-- 
1.9.1

             reply	other threads:[~2015-10-01  7:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01  7:33 Chunyan Zhang [this message]
     [not found] ` <1443684782-10898-1-git-send-email-zhang.chunyan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-10-15  3:22   ` [PATCH] selftests: memfd_test: Revised STACK_SIZE to make it 16-byte aligned Chunyan Zhang
2015-10-15  8:44   ` Arnd Bergmann
2015-10-15 13:50     ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1443684782-10898-1-git-send-email-zhang.chunyan@linaro.org \
    --to=zhang.chunyan@linaro.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shuahkh@osg.samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox