From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A062C6FD1D for ; Tue, 21 Mar 2023 16:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IWFwQ46PhzVfzoJ9qPTAbwtP1SYEhMARMH9/lI7mo8U=; b=bBjpQmE/mKfdAI hJ3hUyUzS8CnwfSVV0dpLlG87Qw12tpr4XXIAOoywiBeQ2vY5x89eIB2v0lNPAJRpO40qd5tMpm5c /Om17fJRjyPf6XCoLW8KdCnCBXXMLzKgoWbeaSs4pVflgLB3pWR20G3dg7XWORDyidDka9eK1Kt2G cPflAy8AtwW8MnDTDkyY3Dw/NMshBXFYgWdLQutiaE0TsdPnlRiDXWBuKimEFUF6LRQqxb+AWWGBX 6V3w1UOZJD703vImrgQMpRDGIjRdxzll/S9ERC0SIoIoKBtjlixRpYrTB/S8hIQ/dnsT24mxVP/8h 2FpoFKNHQnXBMLfTTWlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peeci-00D2nv-1N; Tue, 21 Mar 2023 16:14:08 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peecf-00D2mx-0r for linux-arm-kernel@lists.infradead.org; Tue, 21 Mar 2023 16:14:07 +0000 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32LGDkJZ020197; Tue, 21 Mar 2023 16:13:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=STLxretgSrKorO1inoaxrMl0MOAruib27t8XQDWlDD4=; b=Z2IqUBmDfKxFh4ISuw13EY5Ax8yKtY1doEku0tmBmIAddgbUVJV4FcjXhTGXNIjMvxiA g3CeDUmt+b3qrk9mtlUAbZghTfmNmFsh6dCx+Mqpv7GW+kY2EavSBmmgsCN/JgemYywH PxIDK2Pcu681smO5QhAqSlTu/Rf3fNn30uPe34IeDDDhqEKomhExaWBtuVSVaXKTuYxs wEyVr2PlZit1FN19x/g1PehPY2Tac9ivpj4amO5RBafsgHvThlJPyLFIMgGlYO73N6u9 +eFfN9tZ0HgbMNqj+HyO1SR32dUdX2e9662jaHX8WWrZ+i1jAWuAxwpD12etrxeQkx6g dQ== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pfc2pru93-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 16:13:46 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 32LGDde4011062 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 16:13:39 GMT Received: from [10.216.40.180] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 21 Mar 2023 09:13:35 -0700 Message-ID: Date: Tue, 21 Mar 2023 21:43:31 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [RFC PATCH 6/6] pstore/ram: Register context with minidump Content-Language: en-US To: Kees Cook CC: , , , , , , , , , , , References: <1676978713-7394-1-git-send-email-quic_mojha@quicinc.com> <1676978713-7394-7-git-send-email-quic_mojha@quicinc.com> <63f7c1de.170a0220.f48b.e137@mx.google.com> From: Mukesh Ojha In-Reply-To: <63f7c1de.170a0220.f48b.e137@mx.google.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: abYGF1QvqcAsn1Ielr8hihDfoxktCQwA X-Proofpoint-GUID: abYGF1QvqcAsn1Ielr8hihDfoxktCQwA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-21_11,2023-03-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 bulkscore=0 spamscore=0 impostorscore=0 malwarescore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 adultscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303210127 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230321_091405_311798_1FB72F01 X-CRM114-Status: GOOD ( 21.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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.) > > 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); > > 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? Do you think, if qcom_minidump_ready() can be used which checks minidump readiness ? -Mukesh > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel