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: <CALCETrUOZAuf+PzmNVYzuCZSDFyaNpJPKBwaQEQL-qqdHry7sw@mail.gmail.com>
Date:   Thu, 30 Mar 2017 12:21:13 -0700
From:   Andy Lutomirski <luto@...capital.net>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Oleg Nesterov <oleg@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andy Lutomirski <luto@...nel.org>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
        Jan Kratochvil <jan.kratochvil@...hat.com>,
        Pedro Alves <palves@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: syscall_get_error() && TS_ checks

On Thu, Mar 30, 2017 at 12:11 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> On Thu, Mar 30, 2017 at 11:59 AM, Andy Lutomirski <luto@...capital.net> wrote:
>>>
>>> And then actually run such a kernel on a 32-bit distro, and verifying
>>> that things like gdb and strace really work. But it needs real
>>> testing, not some kind of handwaving. It's a *big* change.
>>
>> I'll offer the following handwave: if there are problems, I'd expect
>> to see them in mixed-bitness uses, not 32-bit distros.  But the 32-bit
>> case is worth testing, too.
>
> I wouldn't worry too much about the mixed case, simply because you
> clearly cannot use a 32-bit gdb on a 64-bit process.
>
> So the mixed case already needs to use a 64-bit gdb, which presumably
> would never use the 32-bit ptrace paths in the first place, so this
> code never triggers.
>

Hah.  Hah hah.  IIRC 64-bit gdb *does* use the 32-bit paths, or at
least it uses some path that can't see the high regs.  I don't fully
recall, but this is the case that seems more likely to break to me.
It's a great big mess.

> Of course, the mroe testing the better, but the thing I'd really want
> to check is that there isn't some 32-bit distro that might have a
> library that is optimized and notices when it's running on a 64-bit
> capable CPU and uses REX prefixes to use special optimized versions.

Huh?  Aren't those REX prefixes interpreted as INC instructions or
similar in compat mode?  You can't just run 64-bit instructions in a
compat code segment.  You *can* use LAR to find a 64-bit code segment
and long-jump to it (and I've written code to do exactly that, and
it's even snuck it's way into linux.git, muahaha), but code like this
is terminally screwed under 32-bit gdb.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ