[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202406120903.D0EF1C6@keescook>
Date: Wed, 12 Jun 2024 09:05:14 -0700
From: Kees Cook <kees@...nel.org>
To: David Gow <davidgow@...gle.com>
Cc: Mark Rutland <mark.rutland@....com>,
Vitor Massaru Iha <vitor@...saru.org>,
Ivan Orlov <ivan.orlov0322@...il.com>,
Brendan Higgins <brendan.higgins@...ux.dev>,
Rae Moar <rmoar@...gle.com>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
kunit-dev@...glegroups.com, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2 2/2] usercopy: Convert test_user_copy to KUnit test
On Wed, Jun 12, 2024 at 05:13:39PM +0800, David Gow wrote:
> On Tue, 11 Jun 2024 at 05:33, Kees Cook <kees@...nel.org> wrote:
> >
> > Convert the runtime tests of hardened usercopy to standard KUnit tests.
> >
> > Co-developed-by: Vitor Massaru Iha <vitor@...saru.org>
> > Signed-off-by: Vitor Massaru Iha <vitor@...saru.org>
> > Link: https://lore.kernel.org/r/20200721174654.72132-1-vitor@massaru.org
> > Tested-by: Ivan Orlov <ivan.orlov0322@...il.com>
> > Signed-off-by: Kees Cook <kees@...nel.org>
> > ---
>
> This looks good, particularly with the x86 fix applied.
Thanks!
> It's still hanging on m68k -- I think at the 'illegal reversed
> copy_to_user passed' test -- but I'll admit to not having tried to
> debug it further.
For my own future reference, I have reproduced this with:
$ sudo apt install gcc-m68k-linux-gnu
$ tools/testing/kunit/kunit.py run --arch m68k --make_option CROSS_COMPILE=m68k-linux-gnu- usercopy
I'll figure it out...
> One other (set of) notes below about using KUNIT_EXPECT_MEMEQ_MSG(),
> otherwise (assuming the m68k stuff isn't actually a regression, which
> I haven't tested but I imagine is unlikely),
I should really read all the API docs every few releases. :) I will
switch to KUNIT_EXPECT_MEMEQ_MSG!
--
Kees Cook
Powered by blists - more mailing lists