From: Richard Palethorpe <rpalethorpe@suse.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] ustat: Fix EFAULT in 32bit compatability mode
Date: Thu, 7 Feb 2019 11:18:35 +0100 [thread overview]
Message-ID: <20190207101835.641-1-rpalethorpe@suse.com> (raw)
In-Reply-To: <20190202001727.13269-1-smuckle@google.com>
This test fails with -m32 on Intel because the user land dev_num is too
large.
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
From looking at glibc, this test may also be broken on mips, but I am not sure
if that matters. AFAICT on all other platforms glibc always casts to uint
after performing a sanity check..
testcases/kernel/syscalls/ustat/ustat01.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/ustat/ustat01.c b/testcases/kernel/syscalls/ustat/ustat01.c
index 3f1186c49..2e7dcc9d7 100644
--- a/testcases/kernel/syscalls/ustat/ustat01.c
+++ b/testcases/kernel/syscalls/ustat/ustat01.c
@@ -20,7 +20,7 @@ void run(void)
{
struct ustat ubuf;
- TEST(tst_syscall(__NR_ustat, dev_num, &ubuf));
+ TEST(tst_syscall(__NR_ustat, (unsigned int)dev_num, &ubuf));
if (TST_RET == -1)
tst_res(TFAIL | TTERRNO, "ustat(2) failed");
--
2.20.1
next prev parent reply other threads:[~2019-02-07 10:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-02 0:17 [LTP] [PATCH v2] syscalls/ustat: convert to new lib, use direct syscall Steve Muckle
2019-02-04 12:55 ` Petr Vorel
2019-02-07 10:18 ` Richard Palethorpe [this message]
2019-02-07 12:16 ` [LTP] [PATCH] ustat: Fix EFAULT in 32bit compatability mode Jan Stancek
2019-02-07 13:07 ` Petr Vorel
2019-02-07 14:38 ` Richard Palethorpe
2019-02-07 12:52 ` Petr Vorel
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=20190207101835.641-1-rpalethorpe@suse.com \
--to=rpalethorpe@suse.com \
--cc=ltp@lists.linux.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.