lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 28 Feb 2022 22:42:51 -0800
From:   Daniel Latypov <>
To:     Steven Rostedt <>
Cc:     Kees Cook <>,
        Eric Biederman <>,
        David Gow <>,
        Alexey Dobriyan <>,
        Magnus GroƟ <>,,,,,
Subject: Re: [PATCH] binfmt_elf: Introduce KUnit test

On Mon, Feb 28, 2022 at 8:21 PM Steven Rostedt <> wrote:
> On Mon, 28 Feb 2022 17:48:27 -0800
> Daniel Latypov <> wrote:
> > He also prototyped a more intrusive alternative to using ftrace and
> > kernel livepatch since they don't work on all arches, like UML.
> Perhaps instead of working on a intrusive alternative on archs that do
> not support live kernel patching, implement live kernel patching on
> those archs! ;-)
> It's probably the same amount of work. Well, really, you only need to
> implement the klp_arch_set_pc(fregs, new_function); part.

Yeah, that's the only bit we'd need to get working.
I called this out in "Open questions:" bit on

As for the amount of work, I know how to do KUnit-y things, I have no
idea how to do livepatch things :)
Also, we're not aiming for something as "magic" as the ftrace one.

David's patch is here:
Here's a snippet from the example in that one:

static int add_one(int i)
/* This will trigger the stub if active. */

return i + 1;

i.e. users just add this one macro in with <func> and <args>.
It internally expands to roughly

  if (<check if current test has registered a replacement>)
      <invoke replacement with <args>

So it's all quite simple.

But it'd definitely be interesting to try and get klp_arch_set_pc()
working on UML if that's a possibility!
Speaking from ignorance, I can see this either being somewhat simple
or very painful.

> -- Steve

Powered by blists - more mailing lists