From: Maximilian Luz <luzmaximilian@gmail.com>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Ard Biesheuvel <ardb@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Steev Klimaszewski <steev@kali.org>,
Shawn Guo <shawn.guo@linaro.org>,
Cristian Marussi <cristian.marussi@arm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-arm-msm@vger.kernel.org, linux-efi@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] dt-bindings: firmware: Add Qualcomm UEFI Secure Application client
Date: Mon, 1 Aug 2022 00:48:20 +0200 [thread overview]
Message-ID: <eaa455ed-2dd2-a33f-6420-a75484eccc35@gmail.com> (raw)
In-Reply-To: <CAC_iWj+mEEAVzZ-_Cn9KKw6H9sUB9sz8f16neXi-wXFXWSLycg@mail.gmail.com>
Hi,
On 7/31/22 11:54, Ilias Apalodimas wrote:
> Hi Maximilian,
>
> On Thu, 28 Jul 2022 at 20:27, Maximilian Luz <luzmaximilian@gmail.com> wrote:
>>
>
> [...]
>
>>>>>>>
>>>>>>> [1] https://git.linaro.org/people/ilias.apalodimas/net-next.git/log/?h=setvar_rt_optee_3
>>>>>>
>>>>>> I would very much like to avoid the need for special bootloaders. The
>>>>>> devices we're talking about are WoA devices, meaning they _should_
>>>>>> ideally boot just fine with EFI and ACPI.
>>>>>
>>>>> I've already responded to following email, but I'll repeat it here for
>>>>> completeness. It's not a special bootloader. It's the opposite, it's
>>>>> a generic UEFI compliant bootloader which takes advantage of the fact
>>>>> EFI is extensible. We are doing something very similar in how we load
>>>>> our initrd via the EFI_LOAD_FILE2 protocol. Whether Qualcomm can add
>>>>> that to their bootloaders is a different topic though. But at some
>>>>> point we need to draw a line than keep overloading the DT because a
>>>>> vendor decided to go down it's own path.
>>>>
>>>> But still, you're asking users to install an extra thing in the boot
>>>> chain.
>>>
>>> Not users. EFI firmware implementations that want to support this in
>>> a generic way.
>>
>> The whole point here is that we don't have control over that. I'd like
>> to fix the firmware, but we're talking about WoA devices where, let's
>> face it, both device and SoC vendor don't really care about Linux. Even
>> if you'd convince them to implement that for future generations, you'd
>> still need them to push firmware updates for older generations.
>> Generations that are end-of-life. IMHO, we should still try support
>> those. Or we just say "sorry, Linux doesn't support that on your WoA
>> device".
>
> Yea we agree on that. I've mentioned on a previous mail that whether
> Qualcomm wants to support this in a generic way is questionable, since
> we have no control over the firmware. My only 'objection' is that the
> kernel has a generic way of discovering which runtime services are
> supported, which we will completely ignore based on some DT entries.
Right, sorry. That makes sense. If we have a realistic possibility, then
I agree that making it discoverable in firmware is the best option. My
point was just that we can't rely on Windows-focused vendors to
implement it.
> In any case let's find something that fits OP-TEE as well, since I can
> send those patches afterwards.
I think it's a great idea to try and find some sort of standardized
solution for OP-TEE and other interested projects similar to it, but we
still have to use a workaround for the Qualcomm WoA devices we have :(
Nevertheless, I'm happy to provide some input for a generic solution,
although I'm not sure I'm the best person to talk to about this.
>>>> That's what I mean by "special". So the situation would then be
>>>> this: User needs a) GRUB (or something similar) for booting the kernel
>>>> (or dual-booting, ...), b) DTBLoader for loading the device-tree because
>>>> we don't support the ACPI Qualcomm provided, and c) your thing for EFI
>>>> variables and potentially other firmware fix-ups. b) and c) are both
>>>> things that "normal" users don't expect. IMHO we should try to get rid
>>>> of those "non-standard" things, not add more.
>>>
>>> But that's exactly why EFI is extensible . You can have non standard
>>> functionality on your firmware for cases like this which doesn't need
>>> to land in the spec.
>>>
>>>>
>>>>>> From an end-user perspective, it's annoying enough that we'll have to
>>>>>> stick with DTs for the time being due to the use of PEPs in ACPI. I
>>>>>> really don't want to add some special bootloader for fixups to that.
>>>>>> Also, this would just move the problem from kernel to bootloader.
>>>>>
>>>>> But it *is* a bootloader problem. The bootloader is aware of the fact
>>>>> that it can't provide runtime services for X reasons and that's
>>>>> exactly why we are trying to set EFI_RT_PROPERTIES_TABLE correctly
>>>>> from the firmware. All we are doing is install a config table to tell
>>>>> the OS "I can't do that, can you find a way around it?".
>>>>
>>>> Sure, but is making the Linux installation process more device
>>>> dependent and complicated really the best way to solve this?
>>>
>>> Isn't it device dependent already? That boat has sailed already since
>>> we need to change the very definition of runtime services and replace
>>> them with OS specific ones. If we add it on the DT, you'll end up
>>> with different DTs per OS and potentially per use case. In my head
>>> the DTs should be part of the firmware (and authenticated by the
>>> firmware as well) instead of loading whatever we want each time. By
>>> using a config table we can add a u64 (random thought), that tells
>>> the kernel which TEE implementation will handle variable storage. So
>>> we can have a common extension to boot loaders, which at least uses
>>> EFI interfaces to communicate the functionality.
>>
>> The only thing that is making the installation-process for end-users
>> device dependent is installing the DTB. We can handle the device
>> specific stuff in the kernel, just as we already handle buggy devices.
>>
>> Further, you seem to assume that these devices provide a DT in the first
>> place. WoA devices use ACPI, so they don't. But for the time being (as
>> discussed elsewhere) we unfortunately need to stick with DTs and can't
>> really use ACPI. I agree that we should avoid OS and use-case specific
>> DTs, but I don't see how this would make a DT use-case or OS specific.
>> Things are firmware specific, the interface doesn't change with a
>> different OS, and we're only indicating the presence of that interface.
>>
>> My current suggestion (already sent to Sudeep earlier) is (roughly)
>> this: Add one compatible for the TrEE / TrustZone interface. Then decide
>> to load or instantiate what needs to be loaded in the driver for that.
>> That (depending on maybe SoC / platform / vendor) includes installing
>> the efivar operations. This way we don't have to fill the DT with the
>> specific things running in firmware.
>
> As far as OP-TEE is concerned, I think we can make the 'feature'
> discoverable. I'll go propose that to op-tee but if that gets
> accepted, we don't need any extra nodes (other than the existing one),
> to wire up efivars_register().
Right. I think you (either in your patches or mails) already mentioned
having an integer ID for the implementation (or maybe implementation +
vendor?). Apart from that, I think it might also make sense to have a
bit-field similar to efi.runtime_supported_mask that tells the kernel
which functions are taken over.
So with that you could call efivars_register() based on the firmware
table in the driver for linaro,optee-tz (I assume) whether for qcom,tee
(or whatever we'd call that) we'd have to hard-code it based on some
platform/model identifier.
Regards,
Max
next prev parent reply other threads:[~2022-07-31 22:48 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-23 22:49 [PATCH 0/4] firmware: Add support for Qualcomm UEFI Secure Application Maximilian Luz
2022-07-23 22:49 ` [PATCH 1/4] firmware: qcom_scm: Export SCM call functions Maximilian Luz
2022-07-23 22:49 ` [PATCH 2/4] firmware: Add support for Qualcomm Trusted Execution Environment SCM calls Maximilian Luz
2022-07-23 22:49 ` [PATCH 3/4] firmware: Add support for Qualcomm UEFI Secure Application Maximilian Luz
2023-01-17 8:24 ` Johan Hovold
2023-01-17 8:42 ` Maximilian Luz
2023-01-18 20:45 ` Maximilian Luz
2023-01-19 16:47 ` Johan Hovold
2023-01-19 17:19 ` Maximilian Luz
2023-01-17 11:05 ` Johan Hovold
2023-01-17 12:07 ` Maximilian Luz
2022-07-23 22:49 ` [PATCH 4/4] dt-bindings: firmware: Add Qualcomm UEFI Secure Application client Maximilian Luz
2022-07-25 1:06 ` Rob Herring
2022-07-26 10:17 ` Krzysztof Kozlowski
2022-07-26 11:15 ` Maximilian Luz
2022-07-26 13:25 ` Krzysztof Kozlowski
2022-07-26 15:00 ` Maximilian Luz
2022-07-27 11:24 ` Krzysztof Kozlowski
2022-07-27 13:00 ` Maximilian Luz
2022-07-28 7:48 ` Krzysztof Kozlowski
2022-07-28 10:25 ` Maximilian Luz
2022-07-28 10:38 ` Krzysztof Kozlowski
2022-07-28 10:49 ` Maximilian Luz
2022-07-26 14:30 ` Sudeep Holla
2022-07-26 15:15 ` Maximilian Luz
2022-07-26 15:41 ` Sudeep Holla
2022-07-26 17:01 ` Maximilian Luz
2022-07-27 11:38 ` Krzysztof Kozlowski
2022-07-27 13:03 ` Maximilian Luz
2022-07-27 13:24 ` Sudeep Holla
2022-07-27 14:49 ` Maximilian Luz
2022-07-28 6:03 ` Ilias Apalodimas
2022-07-28 10:48 ` Maximilian Luz
2022-07-28 11:33 ` Sudeep Holla
2022-07-28 12:13 ` Maximilian Luz
2022-07-28 12:24 ` Ilias Apalodimas
2022-07-28 15:05 ` Ard Biesheuvel
2022-07-28 15:16 ` Ilias Apalodimas
2022-07-28 16:16 ` Sudeep Holla
2022-07-28 16:24 ` Konrad Dybcio
2022-07-28 12:35 ` Ilias Apalodimas
2022-07-28 12:49 ` Maximilian Luz
2022-07-28 16:56 ` Ilias Apalodimas
2022-07-28 17:27 ` Maximilian Luz
2022-07-29 8:52 ` Sudeep Holla
2022-07-29 15:11 ` Maximilian Luz
2022-07-31 9:54 ` Ilias Apalodimas
2022-07-31 22:48 ` Maximilian Luz [this message]
2022-07-28 8:23 ` Sudeep Holla
2022-07-28 10:05 ` Maximilian Luz
2022-07-28 11:21 ` Sudeep Holla
2022-07-28 11:45 ` Maximilian Luz
2022-07-28 13:42 ` Sudeep Holla
2022-07-28 14:09 ` Maximilian Luz
2022-07-25 19:27 ` [PATCH 0/4] firmware: Add support for Qualcomm UEFI Secure Application Rob Herring
2022-07-25 20:16 ` Maximilian Luz
2022-08-02 11:51 ` Srinivas Kandagatla
2022-08-02 13:22 ` Maximilian Luz
2022-08-02 14:02 ` Ard Biesheuvel
2022-08-02 19:11 ` Maximilian Luz
2022-09-02 7:26 ` Sumit Garg
2022-09-02 13:18 ` Maximilian Luz
2022-09-05 6:50 ` Sumit Garg
2022-09-05 6:50 ` Sumit Garg
2022-11-23 11:22 ` Srinivas Kandagatla
2022-11-23 12:05 ` Maximilian Luz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eaa455ed-2dd2-a33f-6420-a75484eccc35@gmail.com \
--to=luzmaximilian@gmail.com \
--cc=agross@kernel.org \
--cc=ardb@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=cristian.marussi@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=ilias.apalodimas@linaro.org \
--cc=konrad.dybcio@somainline.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=shawn.guo@linaro.org \
--cc=steev@kali.org \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.