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: <CAJwJo6b2udOmgFz+gYvgpudwaiaSpmUXd_gfAAsByFHnG7Yg9A@mail.gmail.com>
Date:   Fri, 13 Oct 2017 16:54:34 +0100
From:   Dmitry Safonov <0x7f454c46@...il.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Andy Lutomirski <luto@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        X86 ML <x86@...nel.org>
Subject: Re: BUG: Sporadic crashes with current Linus tree

Hi Tglx, Andy,

Sorry for old-posting,

2017-09-15 8:09 GMT+01:00 Thomas Gleixner <tglx@...utronix.de>:
> On Thu, 14 Sep 2017, Andy Lutomirski wrote:
>> On Thu, Sep 14, 2017 at 9:00 AM, Thomas Gleixner <tglx@...utronix.de> wrote:
>> > On Thu, 14 Sep 2017, Andy Lutomirski wrote:
>> >> On Thu, Sep 14, 2017 at 12:38 AM, Thomas Gleixner <tglx@...utronix.de> wrote:
>> >> > Hi!
>> >> >
>> >> > I've seen the following crash sporadically with commit 46c1e79fee:
>> >> >
>> >> > Have not seen that with 3882a734c19b, though I saw the PCID warnings on
>> >> > that machine.
>> >> >
>> >> > I have no idea how to reproduce so bisecting is pretty much pointless. Any
>> >> > idea what to do?
>> >>
>> >> Does tools/testing/selftests/x86/sigreturn_64 reproduce it?
>> >
>> > Will try tomorrow once I figured out how to compile that stuff. Invoking a
>> > simple make in that directory fails.
>>
>> What's the error?  It works for me.
>
> gcc -m64 -o /home/tglx/work/kernel/linus/linux/tools/testing/selftests/x86/sysret_ss_attrs_64 -O2 -g -std=gnu99 -pthread -Wall  sysret_ss_attrs.c thunks.S -lrt -ldl
> /usr/bin/ld: /tmp/cco4vSkU.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: error: ld returned 1 exit status

Had the same issue in copied thunks.S helper to CRIU.
As I wanted to compile CRIU as pie also (which is the default now
in some distributions), I fixed it up by using %rip-relative addressing
and pushing segment descriptor to stack before long-jumping.
Not sure if that's the issue for the selftest as it can be just always
compiled as pic.

Anyway, here is the commit if you want to look:
https://github.com/0x7f454c46/criu/commit/cf36ea5d8408bf1e42c3bd21b9594369ea7123fb

-- 
             Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ