public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/clone3: New tests
Date: Fri, 13 Mar 2020 14:42:15 +0100	[thread overview]
Message-ID: <20200313134215.GA7318@rei.lan> (raw)
In-Reply-To: <20200313041947.2ua6abqerhdo6wfv@vireshk-i7>

Hi!
> I tried this but here is the problem ..
> 
> - pidfd: Kernel doesn't check this pointer and we get EFAULT.
> - child_tid: Kernel checks for valid pointer and doesn't use the
>   variable if NULL, so test passes unexpectedly.

We do have tst_get_bad_addr() that produces PROT_NONE mapped page that
should get you EFAULT in both cases here.

> - parent_tid: Kernel doesn't verify the pointer, but doesn't return
>   the error code properly and so test passes unexpectedly.

Huh? That sounds like a bug. Or does it skip only NULL silently? In that
case tst_get_bad_addr() should fix this case as well.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2020-03-13 13:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12  8:04 [LTP] [PATCH] syscalls/clone3: New tests Viresh Kumar
2020-03-12 13:43 ` Cyril Hrubis
2020-03-13  4:19   ` Viresh Kumar
2020-03-13 13:42     ` Cyril Hrubis [this message]
2020-03-13 14:20       ` 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=20200313134215.GA7318@rei.lan \
    --to=chrubis@suse.cz \
    --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