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 2/2] security/dirtyc0w: synchronize parent and child
Date: Fri, 6 Oct 2017 07:57:11 -0400 (EDT)	[thread overview]
Message-ID: <1495509161.27338872.1507291031816.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20171006113744.GA8258@rei>



----- Original Message -----
> Hi!
> > > > +static const char *const resource_files[] = {
> > > > +	TEST_APP,
> > > > +	NULL,
> > > > +};
> > > 
> > > I do not get why we need the test binary to be listed as resource file,
> > > the rest seems OK to me.
> > 
> > Since the test is using tmpdir, we either need exec*p* variant and
> > set PATH or copy binary to tmpdir. I took inspiration from creat07.
> 
> We actually copy the binary for creat07 since are are trying to
> overwrite it, which is supposed to fail, but I do not want to overwrite
> the installed files in a case that the kernel is buggy.

I see, I'll send v2 which drops resource_files.

> 
> > Copy approach is slightly more convenient when running test from git tree:
> > # ./dirtyc0w
> > 
> > But I can replace it with execvpe() - user would just need to setup PATH
> > before running it from git tree:
> > # env PATH=`pwd`:$PATH ./dirtyc0w
> 
> You are supposed to do that, but maybe we can add the code to change
> PATH to the test library itself, so it will include $PWD automatically,
> which would fix this problem for quite a lot of test without a need to
> modify these. 

We'd also have to make sure all tests use exec*p* variant, right?

Regards,
Jan

      reply	other threads:[~2017-10-06 11:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 10:42 [LTP] [PATCH 1/2] lib: allow checkpoints to be used by any uid Jan Stancek
2017-10-04 10:42 ` [LTP] [PATCH 2/2] security/dirtyc0w: synchronize parent and child Jan Stancek
2017-10-04 12:02   ` Cyril Hrubis
2017-10-04 12:25     ` Jan Stancek
2017-10-06 11:37       ` Cyril Hrubis
2017-10-06 11:57         ` Jan Stancek [this message]

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=1495509161.27338872.1507291031816.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