public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] ustat: Fix EFAULT in 32bit compatability mode
Date: Thu, 7 Feb 2019 07:16:55 -0500 (EST)	[thread overview]
Message-ID: <532035050.101837579.1549541815701.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20190207101835.641-1-rpalethorpe@suse.com>



----- Original Message -----
> 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..

LGTM, LTP is using only 0 (and -1 for errno tests), so it shouldn't matter.

What about ustat02? Are you planning on sending something similar for that test?

Regards,
Jan

> 
>  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
> 
> 
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
> 

  reply	other threads:[~2019-02-07 12:16 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 ` [LTP] [PATCH] ustat: Fix EFAULT in 32bit compatability mode Richard Palethorpe
2019-02-07 12:16   ` Jan Stancek [this message]
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=532035050.101837579.1549541815701.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox