From: Kees Cook <keescook@chromium.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Brendan Higgins <brendan.higgins@linux.dev>,
David Gow <davidgow@google.com>, Petr Skocik <pskocik@gmail.com>,
Oleg Nesterov <oleg@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jens Axboe <axboe@kernel.dk>,
linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
Frederic Weisbecker <frederic@kernel.org>,
Dmitry Vyukov <dvyukov@google.com>,
Mike Christie <michael.christie@oracle.com>,
Marco Elver <elver@google.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
"haifeng.xu" <haifeng.xu@shopee.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] [RFC] signal: Add KUnit tests
Date: Thu, 17 Aug 2023 09:57:12 -0700 [thread overview]
Message-ID: <202308170956.B7CA2B8BDB@keescook> (raw)
In-Reply-To: <87bkf68g5m.fsf@email.froward.int.ebiederm.org>
On Wed, Aug 16, 2023 at 11:08:21PM -0500, Eric W. Biederman wrote:
> Kees Cook <keescook@chromium.org> writes:
>
> > This is a continuation of the proposal[1] for mocking init_task for
> > KUnit testing. Changing the behavior of kill_something_info() is moving
> > forward[2] and I'd _really_ like to have some unit tests in place to
> > actually test the behavioral changes.
> >
> > I tried to incorporate feedback from Daniel and David, and I think the
> > result is fairly workable -- the only tricky part is building valid
> > task_struct instances. :)
> >
> > Notably, I haven't actually gotten as far as testing the actual proposed
> > behavioral change since I wanted to make sure this approach wasn't going
> > to totally crash and burn.
> >
> > Thoughts?
>
> Overall this looks like a nice start. More comments below.
>
> I do wonder though. Would it perhaps be easier to create a pid
> namespace with just the processes you want in it?
Do you have a short example of how I could do this correctly? It's not
obvious to me how to actually set all that up (and tear it down).
> I am wondering because you failed to mock find_vpid and so you
> are actually testing sending signals to kernel threads.
Hah. Eek.
--
Kees Cook
prev parent reply other threads:[~2023-08-17 16:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-14 21:05 [PATCH] [RFC] signal: Add KUnit tests Kees Cook
2023-08-17 4:08 ` Eric W. Biederman
2023-08-17 16:17 ` Oleg Nesterov
2023-08-17 16:57 ` Kees Cook [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=202308170956.B7CA2B8BDB@keescook \
--to=keescook@chromium.org \
--cc=axboe@kernel.dk \
--cc=brendan.higgins@linux.dev \
--cc=davidgow@google.com \
--cc=dvyukov@google.com \
--cc=ebiederm@xmission.com \
--cc=elver@google.com \
--cc=frederic@kernel.org \
--cc=haifeng.xu@shopee.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mcgrof@kernel.org \
--cc=michael.christie@oracle.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=pskocik@gmail.com \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
/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