lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200908205947.arryy75c5cvldps7@treble>
Date:   Tue, 8 Sep 2020 15:59:47 -0500
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Petr Mladek <pmladek@...e.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        live-patching@...r.kernel.org
Subject: Re: [GIT PULL] livepatching for 5.9-rc5

On Tue, Sep 08, 2020 at 11:42:00AM -0700, Linus Torvalds wrote:
> On Tue, Sep 8, 2020 at 11:32 AM Josh Poimboeuf <jpoimboe@...hat.com> wrote:
> >
> > Can you share the .o file?  At least I can't recreate with GCC 9.3.1,
> > which is all I have at the moment.
> 
> Done off-list in private, because I don't think anybody else wants
> object files flying around on the mailing lists..

The problem is that objtool ignores handle_external_interrupt_irqoff()
(because it has the STACK_FRAME_NON_STANDARD annotation), and the
'ignore' logic is a bit crude.

Because that function is ignored, the tail call isn't detected (as you
pointed out).  Which confuses the static noreturn detection logic.

The proper fix would be to move that thunk call code to proper asm,
where we can add some unwind hints, and then get rid of the
STACK_FRAME_NON_STANDARD.

But, in the interest of being lazy, here's the easiest fix for now.
I'll need to run some builds to make sure it doesn't break anything.

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index e034a8f24f46..90a66891441a 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -619,7 +619,7 @@ static int add_jump_destinations(struct objtool_file *file)
 		if (!is_static_jump(insn))
 			continue;
 
-		if (insn->ignore || insn->offset == FAKE_JUMP_OFFSET)
+		if (insn->offset == FAKE_JUMP_OFFSET)
 			continue;
 
 		reloc = find_reloc_by_dest_range(file->elf, insn->sec,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ