The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Kees Cook' <keescook@chromium.org>
Cc: 'Guillaume Tucker' <guillaume.tucker@collabora.com>,
	Shuah Khan <shuah@kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2] selftests/lkdtm: Use /bin/sh not $SHELL
Date: Thu, 24 Jun 2021 07:21:15 +0000	[thread overview]
Message-ID: <a05d4cd3366e4047ba42663738e12198@AcuMS.aculab.com> (raw)
In-Reply-To: <202106231231.9B858B95A@keescook>

From: Kees Cook
> Sent: 23 June 2021 23:47
> 
> On Wed, Jun 23, 2021 at 04:27:47PM +0000, David Laight wrote:
...
> > You can probably even do:
> >
> > echo "$test" | /bin/sh -c cat >$TRIGGER || true
> >
> > (moving the redirect to the outer shell).
> 
> Actually, it looks like the "write" is already happening in the exec'd
> process, so this can just be:
> 
> echo "$test" | cat >$TRIGGER || true
> 
> But it still can't be:
> 
> echo "$test" >$TRIGGER
> 
> which is what I had over-engineered a solution to. :)

That one fails because echo is the shell builtin.
But:
	/bin/echo "$test" >$TRIGGER
should be fine.

Quite where the original came from I not sure I want to find out.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2021-06-24  7:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19  2:58 [PATCH v2] selftests/lkdtm: Use /bin/sh not $SHELL Kees Cook
2021-06-23 12:39 ` Guillaume Tucker
2021-06-23 13:43   ` David Laight
2021-06-23 16:18     ` Kees Cook
2021-06-23 16:27       ` David Laight
2021-06-23 22:46         ` Kees Cook
2021-06-24  7:21           ` David Laight [this message]
2021-06-23 14:38   ` Kees Cook
2021-06-23 15:19     ` Guillaume Tucker
2021-06-23 14:35 ` [selftests/lkdtm] 84d8cf25b0: kernel_BUG_at_drivers/misc/lkdtm/bugs.c kernel test robot
2021-06-23 14:30   ` Kees Cook

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=a05d4cd3366e4047ba42663738e12198@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=guillaume.tucker@collabora.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    /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