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: <YVQ5F9aT7oSEKenh@hirez.programming.kicks-ass.net>
Date:   Wed, 29 Sep 2021 11:59:51 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Mark Rutland <mark.rutland@....com>
Cc:     Josh Poimboeuf <jpoimboe@...hat.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        syzbot <syzbot+488ddf8087564d6de6e2@...kaller.appspotmail.com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        syzkaller-bugs@...glegroups.com, viro@...iv.linux.org.uk,
        will@...nel.org, x86@...nel.org
Subject: Re: [syzbot] upstream test error: KASAN: invalid-access Read in
 __entry_tramp_text_end

On Wed, Sep 29, 2021 at 09:50:45AM +0100, Mark Rutland wrote:
> On Wed, Sep 29, 2021 at 09:39:47AM +0200, Peter Zijlstra wrote:
> > On Tue, Sep 28, 2021 at 06:36:37PM -0700, Josh Poimboeuf wrote:

> > > +	asm volatile("417: rdmsr\n"
> > > +		     : EAX_EDX_RET(val, low, high)
> > > +		     : "c" (msr));
> > > +	asm_volatile_goto(_ASM_EXTABLE(417b, %l[Efault]) :::: Efault);
> > 
> > That's terrible :-) Could probably do with a comment, but might just
> > work..
> 
> The compiler is well within its rights to spill/restore/copy/shuffle
> registers or modify memory between the two asm blocks (which it's liable
> to do that when optimizing this after a few layers of inlining), and
> skipping that would cause all sorts of undefined behaviour.

Ah, but in this case it'll work irrespective of that (which is why we
needs a comment!).

This is because _ASM_EXTABLE only generates data for another section.
There doesn't need to be code continuity between these two asm
statements.

As I said, this is terrible :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ