From: David Gow <davidgow@google.com>
To: Kees Cook <keescook@chromium.org>
Cc: "Eric Biederman" <ebiederm@xmission.com>,
"Daniel Latypov" <dlatypov@google.com>,
"Alexey Dobriyan" <adobriyan@gmail.com>,
"Magnus Groß" <magnus.gross@rwth-aachen.de>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"KUnit Development" <kunit-dev@googlegroups.com>,
linux-fsdevel@vger.kernel.org,
"Linux Memory Management List" <linux-mm@kvack.org>,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2] binfmt_elf: Introduce KUnit test
Date: Fri, 4 Mar 2022 15:52:05 +0800 [thread overview]
Message-ID: <CABVgOSmGN2=ptHmEv+FT7vaCUVW4a4bLQUhLKEDV7gbTtH6raA@mail.gmail.com> (raw)
In-Reply-To: <20220304044831.962450-1-keescook@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 1729 bytes --]
On Fri, Mar 4, 2022 at 12:48 PM Kees Cook <keescook@chromium.org> wrote:
>
> Adds simple KUnit test for some binfmt_elf internals: specifically a
> regression test for the problem fixed by commit 8904d9cd90ee ("ELF:
> fix overflow in total mapping size calculation").
>
> $ ./tools/testing/kunit/kunit.py run --arch x86_64 \
> --kconfig_add CONFIG_IA32_EMULATION=y '*binfmt_elf'
> ...
> [19:41:08] ================== binfmt_elf (1 subtest) ==================
> [19:41:08] [PASSED] total_mapping_size_test
> [19:41:08] =================== [PASSED] binfmt_elf ====================
> [19:41:08] ============== compat_binfmt_elf (1 subtest) ===============
> [19:41:08] [PASSED] total_mapping_size_test
> [19:41:08] ================ [PASSED] compat_binfmt_elf ================
> [19:41:08] ============================================================
> [19:41:08] Testing complete. Passed: 2, Failed: 0, Crashed: 0, Skipped: 0, Errors: 0
>
> Cc: Eric Biederman <ebiederm@xmission.com>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> This is now at the top of my for-next/execve tree
> v1: https://lore.kernel.org/lkml/20220224054332.1852813-1-keescook@chromium.org
> v2:
> - improve commit log
> - fix comment URL (Daniel)
> - drop redundant KUnit Kconfig help info (Daniel)
> - note in Kconfig help that COMPAT builds add a compat test (David)
> ---
This looks good to me, and works fine with those two prerequisite
patches from your tree:
- ELF: Properly redefine PT_GNU_* in terms of PT_LOOS
- ELF: fix overflow in total mapping size calculation
(I even played a few of the games which triggered the ELF bug to make
sure it was fixed, too. :-) )
Reviewed-by: David Gow <davidgow@google.com>
Cheers,
-- David
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4003 bytes --]
next prev parent reply other threads:[~2022-03-04 7:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 4:48 [PATCH v2] binfmt_elf: Introduce KUnit test Kees Cook
2022-03-04 7:52 ` David Gow [this message]
2022-03-08 21:24 ` Alexey Dobriyan
2022-03-08 22:12 ` 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='CABVgOSmGN2=ptHmEv+FT7vaCUVW4a4bLQUhLKEDV7gbTtH6raA@mail.gmail.com' \
--to=davidgow@google.com \
--cc=adobriyan@gmail.com \
--cc=dlatypov@google.com \
--cc=ebiederm@xmission.com \
--cc=keescook@chromium.org \
--cc=kunit-dev@googlegroups.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=magnus.gross@rwth-aachen.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;
as well as URLs for NNTP newsgroup(s).