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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200417084224.GB7322@zn.tnic>
Date:   Fri, 17 Apr 2020 10:42:24 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Jakub Jelinek <jakub@...hat.com>
Cc:     Sergei Trofimovich <slyfox@...too.org>,
        Michael Matz <matz@...e.de>, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>, x86@...nel.org
Subject: Re: [PATCH v2] x86: fix early boot crash on gcc-10

On Fri, Apr 17, 2020 at 10:07:26AM +0200, Jakub Jelinek wrote:
> If you want minimal changes, you can as I said earlier either
> mark cpu_startup_entry noreturn (in the declaration in some header so that
> smpboot.c sees it), or you could add something after the cpu_startup_entry
> call to ensure it is not tail call optimized (e.g. just
> 	/* Prevent tail call to cpu_startup_entry because the stack
> 	   protector guard has been changed in the middle of this function
> 	   and must not be checked before tail calling another function.  */
> 	asm ("");

That sounds ok-ish to me too.

I know you probably can't tell the future :) but what stops gcc from
doing the tail-call optimization in the future?

Or are optimization decisions behind an inline asm a no-no and will
pretty much always stay that way?

And I hope the clang folks don't come around and say, err, nope, we're
much more aggressive here.

However, if we do it with the explicit disabling with
-fno-stack-protector for only this compilation unit, then it is

1. clear why we're doing this
2. no compiler would break it

So I'm still gravitating a bit towards the explicit thing...

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ