From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] syscalls/execveat01: new test to verify execveat unlinked fd
Date: Wed, 1 Aug 2018 14:53:03 +0200 [thread overview]
Message-ID: <20180801125302.GA25023@rei.lan> (raw)
In-Reply-To: <CAEemH2dsg0Z18taXrBeQvCkJF1WHh9fHbP=GvMzRV62h4kNCzg@mail.gmail.com>
Hi!
> > +static void do_child(void)
> > +{
> > + char *argv[2] = {TEST_FILE_PATH, NULL};
> > + int fd;
> > +
> > + SAFE_CP(TEST_APP, TEST_FILE_PATH);
> > +
> > + fd = SAFE_OPEN(TEST_FILE_PATH, O_PATH);
> > + SAFE_UNLINK(TEST_FILE_PATH);
> > +
> > + TEST(execveat(fd, "", argv, environ, AT_EMPTY_PATH));
> >
>
> Shouldn't we handle EINVAL here? As the comment says from kernel-4.14,
> this case is expected to fail with EINVAL.
I already asked about this, apparently the syscall returns EINVAL when
the bug is hit, hence this would render the testcase useless.
So we decided to set minimal kernel version that has the call
implemented rather than handle EINVAL.
Well I guess that the best option would be trying execveat() before we
unlink the file and TCONF if we got EINVAL and proceed with the testing
otherwise...
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2018-08-01 12:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-01 8:17 [LTP] [PATCH v2] syscalls/execveat01: new test to verify execveat unlinked fd Eddie.Horng
2018-08-01 11:17 ` Li Wang
2018-08-01 12:53 ` Cyril Hrubis [this message]
2018-08-03 9:32 ` Eddie Horng
2018-08-06 9:26 ` Li Wang
2018-08-08 14:41 ` Cyril Hrubis
2018-08-08 14:48 ` Cyril Hrubis
2018-08-09 9:04 ` Cyril Hrubis
2018-08-10 9:32 ` Eddie Horng
2018-09-11 15:24 ` Jan Stancek
2018-09-12 1:44 ` Eddie Horng
2018-09-12 7:04 ` Jan Stancek
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=20180801125302.GA25023@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