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 6C1B9C77B7F for ; Tue, 16 May 2023 20:49:08 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PCb9d11QAgAKCvfpkp7GLlmIbrcIg2BZDKzgeCLuUMA=; b=wVCA+k3NHctlRx FpCtJHnJkxKvjsvx7JZx+BpYDdvSVQ4ZGUbjIPrVpQKcLQXqgrIeFJVN5ll0VGd5wl/ElSO6yX6Gx +howKYqaN1/IaiURTl7nZVYS3syFK8JMTPu8NTAWb6dTKqPvOMb+yGfHYZTKMRCLO+fPy0pFNG+Iw jBihCZgSn9fqizChDDgVAoqdVahqwWaI2TIL1yu7ut5hKXcz4qDClNGnQ2RnXfLeUb3PovPC3iKVX MzALDuaYMJbe4XF6FI+iRqWfGzLv/bpR2fovzGEEv491cYkr34yPtPw8oyoLYFrsp7FdlS8/5Wqs7 dk+s47ZhUPWAcZQymjBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pz1bC-0075x2-1I; Tue, 16 May 2023 20:48:46 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pz1b9-0075wJ-17 for linux-arm-kernel@lists.infradead.org; Tue, 16 May 2023 20:48:44 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6439bbc93b6so10363471b3a.1 for ; Tue, 16 May 2023 13:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1684270122; x=1686862122; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qKaehGbAc8k6lY0qnWn8D9TG/mOHGPGNlxmLWsJ8N2Y=; b=m6g7gvRdMU7jCzC8ARN7/pLJ8/l0HGcYN/ecQrFL8r6qefKpx+LlryT1s0VBLOvMZ/ 8NGvHStpsS98vJ+5X8QuR+LLHskGF4taS+69JCYVhI4JGkbJjHZiVnom/4YDXAnLj1P4 OLWTwUgV6aPnyWwNie4y3u1jK4ODcfvyk3iII= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684270122; x=1686862122; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qKaehGbAc8k6lY0qnWn8D9TG/mOHGPGNlxmLWsJ8N2Y=; b=MiC6i+6iEMoxqQPNI3ghxSFbCNFrySmGU44qBpwFprLzrgya6VK+zzUzLEEx83NoeN gezwrEYCoh/VnzAh+ZV4CM946K2dkPsyEtsRJYFxiNSCc8kbvVoKw9NKEaYsBxtJDddJ 12e5iZ4MgfoZC4Crf3CD3tvmJOJrE6s0fs98CWstRMtixfzi9uryj/dDEyTvEiNgpcjS shTCbbPJYYX3r/nIb9WRzn64afXju3XryZMs3T9uKvznuCfnwqns0x75hehAY70rz4eS Ar7HBT0vEJ+aCMG5Bu8epez6xMQUwAjDS2Fa0zLS2I0Zclumhc+8sXJaidgHDA3KSUBJ OyPA== X-Gm-Message-State: AC+VfDxzm+ejaNdfaAQRwvD0sQ0XO0+MO82LFn00eK7YisEjxsWsrMy/ cBoMK5Vy1gTOvgWMARqGmOMr+w== X-Google-Smtp-Source: ACHHUZ5ctGEO5DTWH2umfiLzjQSQOYpVnHxq7Fzxd0iVp6cTAQyPJzA4ndkUWCok1pjUTqLN+PoZKQ== X-Received: by 2002:a05:6a00:189a:b0:646:7234:cbfc with SMTP id x26-20020a056a00189a00b006467234cbfcmr43536436pfh.27.1684270121976; Tue, 16 May 2023 13:48:41 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id p24-20020a62ab18000000b0063b5776b073sm13857047pff.117.2023.05.16.13.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 13:48:40 -0700 (PDT) Date: Tue, 16 May 2023 13:48:39 -0700 From: Kees Cook To: Luca Stefani Cc: Mukesh Ojha , agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, corbet@lwn.net, tony.luck@intel.com, gpiccoli@igalia.com, catalin.marinas@arm.com, will@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, linus.walleij@linaro.org, linux-gpio@vger.kernel.org, srinivas.kandagatla@linaro.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v3 09/18] soc: qcom: Add qcom's pstore minidump driver support Message-ID: <202305161347.80204C1A0E@keescook> References: <1683133352-10046-1-git-send-email-quic_mojha@quicinc.com> <1683133352-10046-10-git-send-email-quic_mojha@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230516_134843_426776_4AA3A938 X-CRM114-Status: GOOD ( 29.65 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 09, 2023 at 06:06:26PM +0200, Luca Stefani wrote: > > On 03/05/23 19:02, Mukesh Ojha wrote: > > This driver was inspired from the fact pstore ram region should be > > fixed and boot firmware need to have awarness about this region, > > so that it will be persistent across boot. But, there are many > > QCOM SoC which does not support warm boot from hardware but they > > have minidump support from the software, and for them, there is > > no need of this pstore ram region to be fixed, but at the same > > time have interest in the pstore frontends. So, this driver > > get the dynamic reserved region from the ram and register the > > ramoops platform device. > > > > +---------+ +---------+ +--------+ +---------+ > > | console | | pmsg | | ftrace | | dmesg | > > +---------+ +---------+ +--------+ +---------+ > > | | | | > > | | | | > > +------------------------------------------+ > > | > > \ / > > +----------------+ > > (1) |pstore frontends| > > +----------------+ > > | > > \ / > > +------------------- + > > (2) | pstore backend(ram)| > > +--------------------+ > > | > > \ / > > +--------------------+ > > (3) |qcom_pstore_minidump| > > +--------------------+ > > | > > \ / > > +---------------+ > > (4) | qcom_minidump | > > +---------------+ > > > > This driver will route all the pstore front data to the stored > > in qcom pstore reserved region and the reason of showing an > > arrow from (3) to (4) as qcom_pstore_minidump driver will register > > all the available frontends region with qcom minidump driver > > in upcoming patch. > > > > Signed-off-by: Mukesh Ojha > [...] > > +static struct qcom_ramoops_config default_ramoops_config = { > > + .mem_type = 2, > > + .record_size = 0x0, > > + .console_size = 0x200000, > > + .ftrace_size = 0x0, > > + .pmsg_size = 0x0, > > +}; > > This is effectively hard-cording the configuration of ramoops. > > Since the memory range is dynamic and by itself doesn't impose any > limitation this should be configurable in the device-tree, like a standard > ramoops entry backed by a memory range. > > I think this should provide the same interface/knobs as pstore-ram does, > unless there's some known limitations to minidump, in which case those > should be expressed. Yeah, I had the same thought reading this myself. Beyond that, it looks fine as a way to let pstore know about a new RAM backend. -Kees -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel