From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796164454; b=XnFeTKnFIJowPYd77xMvmIda+cCX0koppyB5FZX2X12SOLvy95wZ80gS3btmZdRy6Hrv XTIaMg9+YorvzYc96qxcDInDe90FcxrQtiQ6kXWUPHVR8ywLvRg2N+OeRaapYdMXmPIxY adR8l4PGKTArl6LVTZULrU/QRx0x63gFCF7pblsKXfsysA5/+e9QHjizZG9aUnbE2Pwes ZXG7lC20hTTHRjVb9Kdp7UfMMi08sd9JAuyGRl/Zb2Kvs1xdmZlrI5dB60+ILJl+YvhUR qlY2xIkKbUeFScgiaivb9sZI8LVPmF3EjXq5gaXG6R+ujy92YAB8rRxKWf/gDEexzrw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796164454; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:X-Received:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Proofpoint-Spam-Info: X-Authority-Analysis:X-Proofpoint-GUID:X-Proofpoint-ORIG-GUID: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=tscgBkvy+q9SUSat8VGtFJUQYbUzMsU3d4trEEEZXek=; b=TTA2iUwM0Nyk5MH0N31XrucIsqj7emIinQtd3NdOJpcQQxF6bbXOfwjqrZA5qkcxd8Vl y2IJp6an/jF9MNCGPDaHSbKONrlucfFZbW69FyQc9dqnIeTI99Z5FjXRIqu5+YkwMyBR9 4A86rGGII214+7ORwufwSLlZEvhpzdiyh8JkZcJ3alBzF/vA3UjQXQjkHt91DIV19Yim0 aaBoodSflgFmmeZoTtt5kP+hIhWTUItRrNvLkq3NttEC8w2B8rVvA1y6JCTDtD5KOG+6A zSgunQOA9axvO1wwsqsIADwSHsl6OnYzvhGGbxU0601h4WlFhLn/+SPaybm8FQhx6Dg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=nWe4WQQ2; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=QxVLENa+; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D89E606A323 for ; Tue, 1 Dec 2026 22:34:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5D89E606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=nWe4WQQ2; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=QxVLENa+ Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B1J0mim2884651 for ; Tue, 1 Dec 2026 22:34:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=tscgBkvy+q9SUSat8VGtFJ UQYbUzMsU3d4trEEEZXek=; b=nWe4WQQ2AgaI7c/ZKszmhhnlwMJXWSbt4+wbcN aGqBsDCcvUuz0WM2nB2pLLeKgYQ2Jb8T7XFgm5GKLFtDdjouRdQfjaF4vywv+452 snVQtQzJubpCJB/4UweSWX0KEArqPF+0PF357BmLNC34LkOs643KIbLzXvFbLQga MnFrFapzQrY98/5v/NXNheFExuxQSUU5Qitzr4OyfMng3NRslmYSOCvo9p9Cb4ko 6Ec17sCzA4kAKwipdb/3eFbmBjk+EB37ilFHv1CUwPyT/JgVJc6mpjY/jnHbm05d Ik4VB9xBN35p+/dc5XNS2IlTnqm9rPFT8OsSo4FdJlvDtmbQ== Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ja3ax0vx9-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 01 Dec 2026 22:34:12 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-386177b0516so5266714eec.1 for ; Tue, 01 Dec 2026 14:34:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796164452; x=1796769252; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=tscgBkvy+q9SUSat8VGtFJUQYbUzMsU3d4trEEEZXek=; b=QxVLENa+zhmwr/DpnX5N2iXaQ7tQ14myYolqOHNfMYSh+llcj/62nDuOxYe4i0soEh I+jwfTJpvdi4cuzCP2fwsweIlsDb59DgoCe1rKEs79tdlWFHsVtAeWNh27WjC10k4due lvFwUB0rwqZCswfMWZwRj0v810D2R36q269ddrNL/CIU9wpdoV0qdO5oL3iR0YgD6tf/ J1sGbzmHz+SLmB8XRyfZT0YOXm/Rsy9VGJ0GYhy5z4yam+qEg6iWXZWgJLOk4B5p59gT GqN4IVwPUQEmd4h32Wg4H4HXP/G0QzT5Y5ZDHonF8SFokP0KkFn4/rsLN3MuQw9Mhfr8 4d4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796164452; x=1796769252; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=tscgBkvy+q9SUSat8VGtFJUQYbUzMsU3d4trEEEZXek=; b=xgZQFFDJaprs3dPECu6T40+PQ3feaByeU69C6Ppb9i751psMpJ52U/diTb3swToMWL 0SKG3SvUhE9fRYDyN/uXmX2vkHUs7L0Ya36KE92t0wCVmqTaC4Vc3qQ/0kZBR8mDdi/W Jbvm/6Bv//aaz9cJlHxVSqPS3HV72Zx5SrhbN1L/qtfXPnRYor/omP6Do8NFWNKn20mu a+C/MV2mxR/YVBwEZER7dwa8x5VHZtEqxu8wab9AuLR4H1H35F8JSyk6vYW64STOCmmh cSbH3P4FHWWSv6fD9hHLOziQHtcxArSdam/2/3p2qfr0hr9kTQ0PCkyGOXMN2C093rle hUXw== X-Gm-Message-State: APuU4Z9AJP9nFh1CdmUKkl6cafLqvzpEsfiAnw2yJr4jx7CFtnzY0z+y cE/0zo12eJSzKze+Y2dPOgit6OSqqO+M+Nw08C8SgQfD54G+Ro70TL4IIqFbEV+b+ZHEDNQR7Ox ayOYKohclmtv2u3seCSb/vthwRbqURNvhJqWNXX4gDSUe1K972bAFopcWvXMLbb4eAcE= X-Gm-Gg: AZFdTZfS8x5ANIvPcnU9CRn2iw6zEmyvnT28Nu0nFSSUqxmutBTCeEmCVa4ZqoM+hkn bXFx653cYMKE/7MfghpiQtMMKT4HGFDvwGtwfhVgADoEjyKGZjN1SvyO8+K0de1Kg5txAxlTSKG 2kGBou5c4UtxTBk/raZk6Pykl0bw29N49pwBzebfG4/ogSM3reRAGQnvMcMruPt4OSPIPTU2jZ9 VDrSzjY0FW9fHNU4RShvDSaKds2ARCnk5VR8ur08PlWp5SgXUj9BY3ngPkkjjjKukjC0klxgNYj tb0f0iPKtw8Ehr5hzssfKZ1kS3bz55LSSw5w+rSKYGFCXMV+YCv8779i2gpaZRAN/tjVAUnWDHe zHNB540larT0NVWa0cqELbqESDdJTbr44hyCioENoN0XfNLvL3kyFjKpAQyXpIJVKsobXsin3Vv sJ0JxNxXI= X-Received: by 2002:a05:7301:1506:b0:386:a554:1074 with SMTP id 5a478bee46e88-386a554157emr33489350eec.25.1796164451602; Tue, 01 Dec 2026 14:34:11 -0800 (PST) X-Received: by 2002:a05:7301:1506:b0:386:a554:1074 with SMTP id 5a478bee46e88-386a554157emr33489303eec.25.1796164450837; Tue, 01 Dec 2026 14:34:10 -0800 (PST) Received: from hu-kuldsing-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-38707b612cbsm48570539eec.4.2026.12.01.14.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 14:34:10 -0800 (PST) From: Kuldeep Singh Subject: [PATCH RFC 0/2] Add support to display QTEE/OPTEE secure logs on Qualcomm platforms Date: Wed, 02 Dec 2026 04:03:38 +0530 Message-Id: <20261202-qcom_secure_log_rfc-v1-0-9eaf98f14605@oss.qualcomm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAEJLD2sC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIzNDIKFbmJyfG1+cmlxalBqfk58eX5SWrGtsYJKYmmJpmmSWZKIE1FlQlJq WWQE2NVopyM1ZKRYiWFyalJWaXAIyT6m2FgABKvxrfAAAAA== X-Change-ID: 20261202-qcom_secure_log_rfc-304aed95b6b4 To: Bjorn Andersson , Konrad Dybcio , Abel Vesa , Dmitry Baryshkov Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Kuldeep Singh X-Mailer: b4 0.15.2 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAxMDA4OSBTYWx0ZWRfX1TOGRAwYwzhU HRR5Hjw/AAudywXeCUNAcXkD1NMUWEnJoCjSm5Ulh4AlJ9EL6qx9B7Bc4JRQhinOgxZLf5Mx/C1 EnD16EmA/50IcqYb6BGl6BghyGxFqXs= X-Authority-Analysis: v=2.4 cv=J5s/fwnS c=1 sm=1 tr=0 ts=6b0f4b64 cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=NEAV23lmAAAA:8 a=EUspDBNiAAAA:8 a=Fz9So4aP_TtSPEGc40cA:9 a=QEXdDO2ut3YA:10 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-GUID: HGmyCT3aMlsOJqnQ4h_cfvg3_MA70zGe X-Proofpoint-ORIG-GUID: HGmyCT3aMlsOJqnQ4h_cfvg3_MA70zGe X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAxMDA4OSBTYWx0ZWRfXyZs3dfzdGK82 WIodTmX+2Z3AbVSkn2Kifm8tAz6YnpvXtHKUCTRlNBNzKCkJJpAUb57UnS85zdIJLk1LhZGbVA3 QItGiP9Bt1Xwu6XBzFaNKNvdYn9Y8BKqxQ4NouwiCdbK6+oq4iYL3FiPUe8QIc+ZklnD0RJArcg XNrfgYAjl3gUFRL5PYypcu8EtJrRR4Or6rImA318va1+DUwjxYr2YBnAEP+GShy/reSMt5pAspS V3mIXqG43Uz2TiaN7fnI9Lac/eRyR48l2LfIOBdilWleQ2EHjiuNdDzvilfeTxHORqdaIO7r2tJ +Z20r6gm8yLzPsCyDfNj8Usy2lCUfUrd3MVfKEXETDhTVg5J6kBrdlK6iQz7BIrXDywZkidthNE eO+Syd+H3MWpgLaA6RyuN91IjzBnbuRPOFaBNuvUltAZT7E9IWyqXB2eTrc2dcbLclJJ8Hb8nFF FFcUWuACmhCK/HKhusg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-01_04,2026-12-01_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 bulkscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612010089 Hi, This RFC explores an approach for retrieving diagnostic logs produced by Qualcomm secure firmware while keeping firmware-specific log parsing outside the kernel. This logging mechanism will be able to dump TZ/QSEE logs for QTEE(COTS devices and upcoming) and for OPTEE enabled devices(TZ diag only). There are two classes of logs considered here: - TZ diagnostic logs - QSEE logs The two log sources have different buffer ownership and discovery models. In addition, QSEE logs can be made available through different interfaces depending on the capabilities provided by the secure firmware. The intent of this RFC is therefore not to introduce a common logging transport. Instead, existing kernel mechanisms are used to provide controlled access to the underlying buffers, while userspace handles the firmware-specific log format. The proposed model is: Secure firmware (QTEE) / \ / \ TZ diagnostic QSEE logs logs | / \ | / \ firmware-owned legacy SCM CSecureLog buffer | IDL | | | existing Kernel QCOMTEE MO discovery(Kernel) buffer | | | TEE | | | +--------------+-----------+ | userspace | parse / format / persist Please go through below information first, to refer how userspace implementation looks like: https://github.com/qualcomm/minkipc/pull/125/changes Please note, not doing complete implementation in the series as wanted to hear early feedback on design and then conclude on final set of changes. The series is compiled tested to display an overall design idea. Also, taken LLM assistance for the current implementation. 1. TZ diagnostic logs ===================== The TZ diagnostic buffer is owned and populated by secure firmware. Secure firmware publishes the physical address of the diagnostic region through a known location in OCIMEM memory. First, HLOS maps the corresponding OCIMEM location: OCIMEM | +------------------------+ | TZ diagnostic pointer | +------------------------+ | readl() | v diagnostic buffer PA The value read from this location is the physical address of the firmware-owned TZ diagnostic region. HLOS then maps that second region: diagnostic buffer PA | ioremap() | v +-------------------------+ | TZ diagnostic metadata | | | | ring state | | | | TZ diagnostic log data | +-------------------------+ ^ | TZ/QTEE writes The complete discovery path is therefore: known OCIMEM location | first ioremap() | readl() | v TZ diagnostic PA | second ioremap() | v TZ diagnostic region The first mapping is used only to discover the physical address of the diagnostic region. It is not the log buffer itself. The second mapping provides access to the actual diagnostic region populated by secure firmware. After locating and validating the diagnostic region, the proposed kernel interface provides controlled read-only access to the actual diagnostic region: TZ/QTEE | writes logs | v TZ diagnostic region | kernel mapping | controlled RO access | v userspace | TZ diagnostic parser | console / file Capturing tz diag base address in kernel is needed as userpsace cannot map physical to virtual address. Kernel will basically do necessary mapping and share memory via mmap to userspace for log dump logic etc. Userspace is not given access to the OCIMEM pointer location. It only gets access to the validated diagnostic region containing the firmware-generated data. The kernel therefore needs to understand only the discovery mechanism and the boundaries and memory attributes of the diagnostic region. It does not need to understand the TZ diagnostic header, ring-buffer producer state, wrap handling, or individual diagnostic records. Please note, Optee-os contains logs at same physical region and hence, this feature interface can be reused to display optee-os logs too. 2. Legacy QSEE logging through SCM ================================== Secure firmware also provides the register_qsee_log_buf SCM interface over qcom_scm driver. For this mechanism HLOS allocates the QSEE log buffer and registers the physical buffer with secure firmware. Conceptually: kernel | allocate QSEE log buffer | v +-----------------+ | QSEE log buffer | +-----------------+ | register_qsee_log_buf SCM call | v TZ/QSEE | writes logs | v +-----------------+ | same HLOS-owned | | buffer | +-----------------+ | read-only access | v userspace | parse / display The kernel owns the buffer in this case because its address and lifetime are provided directly to secure firmware through the SCM ABI. The corresponding kernel driver therefore needs to: - allocate memory satisfying the SCM ABI requirements; - register its address and size with secure firmware; - retain the memory for as long as firmware can access it; - perform any required synchronization for secure-world writes; and - provide controlled read-only access to a userspace consumer. The kernel does not parse the QSEE log-buffer format. 3. QSEE/secure logging through CSecureLog idl interface ======================================================= Some QTEE firmware versions provide a QCOMTEE CSecureLog IDL service. This is a separate mechanism from register_qsee_log_buf and should not be implemented on top of the legacy SCM registration call. When CSecureLog is available, userspace can create a memory object using the existing QCOMTEE memory-object infrastructure and provide that object to the CSecureLog service using the QCOMTEE/SMCInvoke interface. Conceptually: userspace | create QCOMTEE memory object | v +----------------+ | shared MO | +----------------+ | CSecureLog IDL via SMCInvoke | v QTEE | registers/maps the MO | writes logs | v +----------------+ | same shared MO | +----------------+ | userspace | parse / display No register_qsee_log_buf SCM call is involved in this path. Support for this path is conditional on the corresponding service being provided by the QTEE firmware. 4. Kernel/userspace boundary ============================ Although the buffers are obtained differently, the same responsibility split is proposed for all of them. Kernel responsibilities: - allocate and register the QSEE buffer when the legacy SCM ABI is used; - provide QCOMTEE memory-object and SMCInvoke mechanisms where the CSecureLog service is used; - maintain memory lifetime and access permissions; - perform the required memory/DMA synchronization; Userspace responsibilities: - understand TZ and QSEE diagnostic buffer formats; - validate firmware-specific headers; - track producer/consumer positions; - handle ring-buffer wrapping and overwritten data; - format individual diagnostic records; - select whether logs are printed, persisted or forwarded. The goal is to keep the kernel independent of the firmware diagnostic record formats. 5. Why not implement log parser in the kernel? ============================================== The buffers contain diagnostic information rather than kernel-owned state. Parsing the logs in the kernel would require Linux to understand and maintain firmware-specific details including: - diagnostic format versions; - TZ/QSEE header layouts; - producer state; - ring-buffer wrapping; - individual diagnostic record formats; - differences between firmware revisions. These operations do not inherently require kernel privilege. Keeping the parser in userspace leaves the kernel responsible for the operations which do require it: physical memory access, SCM calls, QCOMTEE memory sharing, memory lifetime, permissions and secure-world notification. It also avoids making each firmware diagnostic format part of the kernel implementation. 6. Can use same /dev/secure_log interface for TZ and QSEE logs? =========================================================== One approach can be to expose log source through a single interface such as /dev/secure_log for both logs i.e TZ and QSEE logs. However, the buffers have substantially different ownership models: TZ diagnostic log: secure firmware owns memory | HLOS discovers it legacy QSEE log:/CSecureLog kernel owns memory | Kernel registers memory with QTEE | QTEE will write content in buffer and userspace will read. Forcing all three mechanisms behind another common character-device UAPI adds an abstraction without removing these underlying lifetime and ownership differences. This RFC therefore tries to reuse the existing SCM and QCOMTEE interfaces rather than introducing a new common secure-log transport. The legacy TZ and QSEE cases may still require a restricted userspace interface because their buffers are not originally userspace-owned. Keeping different nodes for TZ diag and QSEE logs for time being as it's in discussion phase. 7. Notification(Future) ====================== Access to a shared buffer and notification of new data are separate problems. Mapping or otherwise exposing a log buffer allows userspace to read it, but does not tell userspace when secure firmware has produced new data. For existing firmware an explicit log notification may not be available. In that case userspace can either: - periodically inspect the producer state; or - where appropriate, use relevant QCOMTEE activity as an opportunity to inspect the buffer again. A secure call or callback completion must not be interpreted as guaranteeing that new log data exists. After any such trigger userspace still checks the producer state in the shared buffer. For RFC, didn't implement notification interface and would rather do polling to get logs for specific duration. This can be scaled in future to even write logs to a file right after bootup and create daemon to basically let kernel notify userspace about new log activity in tz/qsee buffers. 8. Future FF-A support ====================== Certain QTEE firmware versions support required FF-A shared-memory and notification functionality, secure logging can become event driven. Conceptually: HLOS | shared memory | FF-A sharing | v QTEE | writes logs | notification / doorbell | v kernel | wake userspace | v userspace | parse buffer This separates the two paths cleanly: data: QTEE -> shared memory -> userspace notification: QTEE -> FF-A notification -> kernel -> userspace This RFC does not implement the FF-A mechanism. The exact sharing and notification semantics should be defined against firmware providing the corresponding functionality rather than introducing speculative kernel interfaces. 9. Resulting capability model ============================= The resulting architecture is: Secure logs | +--------------+--------------+ | | TZ logs QSEE logs | | firmware-owned +----------+----------+ diag buffer | | | legacy SCM CSecureLog | | | existing discovery kernel buffer userspace MO | | | | register_qsee_log_buf QCOMTEE / | | SMCInvoke | | | +-----------------+---------------------+ | userspace | firmware parser | +-------+-------+ | | console file/etc. | future capability: | FF-A + notification | event-driven wakeup 10. Questions for discussion ============================= I would appreciate feedback on the following: 1. Is keeping the firmware-specific TZ/QSEE ring-buffer parsing in userspace the appropriate kernel/userspace boundary? 2. What would be the preferred upstream mechanism for controlled, read-only access to the existing firmware-owned TZ diagnostic buffer? 3. For firmware using register_qsee_log_buf, is an HLOS-owned buffer managed by a small kernel driver and exposed read-only to userspace an acceptable model? Really appreciate feedback on series and suggestions/improvements etc. Please let me know if something unclear or better way to portrait the design. Thanks, Kuldeep Singh --- Kuldeep Singh (2): firmware: qcom: Introduce qcom_secure_log interface to display QTEE logs firmware: qcom: Add legacy QSEE secure log support drivers/firmware/qcom/Kconfig | 9 + drivers/firmware/qcom/Makefile | 1 + drivers/firmware/qcom/qcom_scm.c | 34 +++ drivers/firmware/qcom/qcom_scm.h | 3 + drivers/firmware/qcom/qcom_secure_log.c | 393 ++++++++++++++++++++++++++++++++ include/linux/firmware/qcom/qcom_scm.h | 2 + 6 files changed, 442 insertions(+) --- base-commit: 253f86660c1f882fbf554db5eaa34bc5d66dc7e8 change-id: 20261202-qcom_secure_log_rfc-304aed95b6b4 Best regards, -- Kuldeep Singh