From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B16C9319850 for ; Fri, 30 Jan 2026 14:10:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769782249; cv=none; b=L8hnnNrPY+jXEIi681+yuUHiXVVzFvYVPUVmKd4m/CjjwmlTg2IglEBSuBuiZhzVSL1d8svX7jW/jOof+S/8KrKzQLT/bbwiFHYxJ4449ZHkIr3IeLTpwomZ3B/Rckzt6ifZGXc7ImaZHhtLmdltWFKsKZ47/IsnET1H/LQUfv8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769782249; c=relaxed/simple; bh=ecDc80eooQS9rlWWy0Md7i2Jn9Ijn5zzrwYvHvmNqtM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=MTMOqtnk23F6aUakCyg7OtJH7UfmnGGX8A0kU3xC1a10jmo9uxqYg+so8sSorfbSOgd78HFVtf46qagGtFyGZ7vaxW34A3H3s4kHuE3w+btQkosEse9gMVv/qOvMqcS+c9NDDY0hqUpIupIq4WINOTH56jQfisG7Hgli46lNCQk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=tbZYpIjf; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="tbZYpIjf" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 9FB391A2B3A; Fri, 30 Jan 2026 14:10:45 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 71A896075A; Fri, 30 Jan 2026 14:10:45 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 63704119A8874; Fri, 30 Jan 2026 15:10:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769782244; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=ecDc80eooQS9rlWWy0Md7i2Jn9Ijn5zzrwYvHvmNqtM=; b=tbZYpIjfTkEL05J9upskFufDDI1w6rhle+M3XAUwMupurQKBLsGw9vkjN4fJH49PEBp+En OklUD9QY8712XBHX23LRoAySawwuyJFAPSSutn2ApMNmx0mlWH3e159qEJobM4SDLtoUY1 rTLdLPjQ72OmclqnHfQtYsvfm8ihgW1+2BBF3rJBI1wD98ammweJSYyON18a0UHK1YodhT ngpDwfHp66BO4VAk+Rz4Zzr6PZgfGSzQqQYvEI4LXkrjxfirJOSbSdZ9fD43zsDDAqtuiY hng9Ls9kcjdrVOLX5VHeCC5zNvE6eShhJdJZlNEq9yC1qicEeQEsZcVF4rBibQ== From: Miquel Raynal To: Junhao Xie Cc: Bjorn Andersson , Konrad Dybcio , Richard Weinberger , Vignesh Raghavendra , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Xilin Wu Subject: Re: [PATCH v2 0/2] mtd: devices: Qualcomm SCM storage support In-Reply-To: <86F97239DB3D962C+98826904-6649-4c19-815d-73003c046c14@radxa.com> (Junhao Xie's message of "Fri, 30 Jan 2026 21:39:48 +0800") References: <20260126-scm-storage-v2-v2-0-fa045c7e7699@radxa.com> <86F97239DB3D962C+98826904-6649-4c19-815d-73003c046c14@radxa.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Fri, 30 Jan 2026 15:10:38 +0100 Message-ID: <87ecn7jin5.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Hi, >> I don't believe you answered my question regarding how to access this >> interface from the kernel. On many of these devices we can find the MAC >> addresses of the system in the "DPP" partition. Do you have any ideas >> about how we could access this from within the kernel? >> >> Regards, >> Bjorn > > I agree with your point. I will add a module param in v3 for default > read-only mode. e.g.: /sys/module/qcom_scm_storage/parameters/allow_write > > For something like the "DPP" partition, I think it's better to access it > from userspace than from kernel. If it's a MAC address that you are accessing, direct userspace does not sound like a good fit. If I may, NVMEM cells are there exactly for this purpose: identifying the content of a subpart of a storage device in a storage agnostic way. The NVMEM cells are made available to in-kernel drivers (ie. network devices have all the infrastructure to get the MAC address from there) and their content is also exposed to userspace through sysfs now. Thanks, Miqu=C3=A8l