All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] security/dirtyc0w: synchronize parent and child
Date: Fri, 6 Oct 2017 13:37:44 +0200	[thread overview]
Message-ID: <20171006113744.GA8258@rei> (raw)
In-Reply-To: <47778538.26248540.1507119900299.JavaMail.zimbra@redhat.com>

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.

> 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. Or add a modified exec function to the test library that
locates the binary first.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2017-10-06 11:37 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 [this message]
2017-10-06 11:57         ` 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=20171006113744.GA8258@rei \
    --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 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.