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]
Date:   Fri, 24 Feb 2023 15:53:07 +0530
From:   Mukesh Ojha <quic_mojha@...cinc.com>
To:     Kees Cook <keescook@...omium.org>
CC:     <agross@...nel.org>, <andersson@...nel.org>,
        <konrad.dybcio@...aro.org>, <tony.luck@...el.com>,
        <gpiccoli@...lia.com>, <catalin.marinas@....com>,
        <will@...nel.org>, <linux-arm-msm@...r.kernel.org>,
        <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-hardening@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [RFC PATCH 6/6] pstore/ram: Register context with minidump

Thanks Kees for checking into this.

On 2/24/2023 1:13 AM, Kees Cook wrote:
> On Tue, Feb 21, 2023 at 04:55:13PM +0530, Mukesh Ojha wrote:
>> There are system which does not uses pstore directly but
>> may have the interest in the context saved by pstore.
>> Register pstore regions with minidump so that it get
>> dumped on minidump collection.
> 
> Okay, so, this is a really interesting case -- it's a RAM backend that
> is already found on a system by pstore via device tree, but there is
> _another_ RAM overlay (minidump) that would like to know more about how
> the pstore ram backend carves up the memory regions so it can examine
> them itself too. (i.e. it's another "interface" like the pstorefs.)

It is not exactly like pstorefs where we can mount and check the logs in 
next boot.

This interface needs physical address and size of the region to be 
conveyed to the boot firmware via the minidump registration and firmware 
will dump this region as a blob out of the device on device crash.
Blobs can be either plain text like console logs or some thing which
needs parser for that reason virtual address is required.

> 
> So we need to provide the mapping back to the overlay. It feels to me
> like the logic for this needs to live in the minidump driver itself
> (rather than in the pstore RAM backend). Specifically, it wants to know
> about all the operational frontends (dmesg, console, ftrace, pmsg) with
> their virt & phys addresses and size.
> 
> The frontends are defined via enum pstore_type_id, and the other values
> are "normal" types, so it should be possible to move this logic into
> minidump instead, leaving a simpler callback. Perhaps something like:
> 
> void pstore_region_defined(enum pstore_type_id, void *virt,
> 			   phys_addr_t phys, size_t size);
Thanks, i will check on this.

> 
> How the pstore ram backend should know to call this, though, I'm
> struggling to find a sensible way. How can it determine if the device
> tree region is actually contained by a minidump overlay?

I agree, pstore will not have any awareness about minidump adding 
something inside pstore does not look good if it can provide API which
provide this information.

One more thing, since minidump is also one of the user of pstore in this
case and it may not need the fixed ram addresses to be mentioned in the 
carve out.

Do you think this can be accepted or if not any suggestion

https://lore.kernel.org/lkml/1675330081-15029-2-git-send-email-quic_mojha@quicinc.com/


-Mukesh
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ