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] [day] [month] [year] [list]
Message-ID: <CABXF_ADirjLD-3DdVoJ4NKRNRcib8nDC2PCxif9ZXvtDZbFUEg@mail.gmail.com>
Date:   Wed, 1 Aug 2018 23:21:25 +0530
From:   Ivid Suvarna <ivid.suvarna@...il.com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Kees Cook <keescook@...omium.org>, Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Jason Baron <jbaron@...hat.com>,
        Kernel development list <linux-kernel@...r.kernel.org>,
        Joe Perches <joe@...ches.com>, linux-arm-msm@...r.kernel.org
Subject: Re: arm64: pstore: printk causing hang during boot in __memcpy_toio
 with pstore enabled

On Wed, Aug 1, 2018 at 10:55 PM, Guenter Roeck <linux@...ck-us.net> wrote:
> On Wed, Aug 01, 2018 at 10:46:06PM +0530, Ivid Suvarna wrote:
>> On Wed, Aug 1, 2018 at 6:49 PM, Guenter Roeck <linux@...ck-us.net> wrote:
>> > On 08/01/2018 05:35 AM, Ivid Suvarna wrote:
>> >>
>> >> Hi,
>> >>
>> >> When pstore is enabled and a *pr_info(any printk) in
>> >> __memcpy_toio(arch/arm64/kernel/io.c)* is added, kernel wont boot and
>> >> just hangs.
>> >>
>> >> The path where __memcpy_toio is called is below:
>> >>
>> >> ->persistent_ram_update
>> >>    -> memcpy_toio
>> >>      -> __memcpy_toio
>> >>
>> >> I tried with trace_printk and kernel boots fine. I understand that
>> >> printk has overhead, but is this expected when we use some printk
>> >> statement in __memcpy_toio?
>> >>
>> >
>> > I think the problem may be that the printk() output is copied to pstore.
>> > Since pstore calls memcpy_toio(), you get a nice recursion if you add a
>> > printk() call to it.
>> >
>>
>> Is there any solution to this other than not adding printk :p
>
> Well, disabling pstore would help. You could also use a trace function,
> as you already found out, or you could use gdb for debugging. Since
> this is obviously a debug image, you should be willing to accept some
> limitations/restrictions.
>

Ok. But trace_printk output is available only after boot, so to debug
any boot issues,
it may not be helpful. And gdb for kernel debugging? Maybe u meant kgdb?

Let me check if this issue is only for pstore path or not.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ