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: <1b40552e-b292-4207-b7eb-9f50e37fd7e4@oss.qualcomm.com>
Date: Mon, 22 Dec 2025 10:43:15 +0100
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Junhao Xie <bigfoot@...xa.com>, Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konradybcio@...nel.org>
Cc: Xilin Wu <sophon@...xa.com>, Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-mtd@...ts.infradead.org
Subject: Re: [PATCH 2/2] mtd: devices: Add Qualcomm SCM storage driver

On 12/19/25 6:12 PM, Junhao Xie wrote:
> On 2025/12/19 20:05, Konrad Dybcio wrote:
>> On 12/18/25 7:02 PM, Junhao Xie wrote:
>>> Add MTD driver for accessing storage devices managed by Qualcomm's
>>> TrustZone firmware. On some platforms, BIOS/firmware storage (typically
>>> SPI NOR flash) is not directly accessible from the non-secure world and
>>> all operations must go through SCM (Secure Channel Manager) calls.
>>>
>>> Signed-off-by: Junhao Xie <bigfoot@...xa.com>
>>> Tested-by: Xilin Wu <sophon@...xa.com>
>>> ---

[...]

>>> +	host->buffer_size = SZ_256K;
>> Should this just be = host->info->page_size?
> 
> The value of page_size is smaller than what we want for
> buffering SCM transfers. The buffer is intended for batching
> larger operations, so a larger fixed size is used here.
> 
> struct qcom_scm_storage_info:
>   total_blocks = 8192
>   block_size = 4096
>   page_size = 256
>   num_physical = 0
>   manufacturer_id = 0
>   serial_num = 1663215
>   fw_version = 
>   memory_type = NOR

I don't see how the big buffer is any useful TBF - you read into this
buffer before outputting to *buf and copy data from *buf into the
host_buffer instead of writing straight from the former. If anything,
that's an unnecessary copy.

Konrad

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ