| 13f4a252 | 10-Jan-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(cm): change back owning security state when a feature is disabled
Patch fc7dca72ba656e5f147487b20f9f0fb6eb39e116 changed the owning security states of the TRBE and SPE buffers to NS. The thinkin
fix(cm): change back owning security state when a feature is disabled
Patch fc7dca72ba656e5f147487b20f9f0fb6eb39e116 changed the owning security states of the TRBE and SPE buffers to NS. The thinking was that this would assist SMCCC feature availability to more easily determine if the feature is enabled or disabled. However, that only changed bit 0 while the SMCCC feature only looks at bit 1 so this change is redundant.
It was also meant to tighten security but that was done by 73d98e37593f4a4044dd28f52127cdc890911c0c instead.
Annoyingly, FEAT_TRBE has TRBIDR_EL1 which reports that programming is allowed when the current security state owns the buffer even when the MDCR_EL3 setting disallows this in practice.
So revert the functional aspect of the patch as it causes linux panics with ERRATA_A520_2938996. Keep the defines as they are used elsewhere.
Change-Id: I39463d585df89aee44d1996137616da85d678f41 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 79c0c7fa | 10-Dec-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cm): clean up per-world context
In preparation for SMCCC_ARCH_FEATURE_AVAILABILITY, it is useful for context to be directly related to the underlying system. Currently, certain bits like SC
refactor(cm): clean up per-world context
In preparation for SMCCC_ARCH_FEATURE_AVAILABILITY, it is useful for context to be directly related to the underlying system. Currently, certain bits like SCR_EL3.APK are always set with the understanding that they will only take effect if the feature is present.
However, that is problematic for SMCCC_ARCH_FEATURE_AVAILABILITY (an SMCCC call to report which features firmware enables), as simply reading the enable bit may contradict the ID register, like the APK bit above for a system with no Pauth present.
This patch is to clean up these cases. Add a check for PAuth's presence so that the APK bit remains unset if not present. Also move SPE and TRBE enablement to only the NS context. They already only enable the features for NS only and disable them for Secure and Realm worlds. This change only makes these worlds' context read 0 for easy bitmasking.
There's only a single snag on SPE and TRBE. Currently, their fields have the same values and any world asymmetry is handled by hardware. Since we don't want to do that, the buffers' ownership will change if we just set the fields to 0 for non-NS worlds. Doing that, however, exposes Secure state to a potential denial of service attack - a malicious NS can enable profiling and call an SMC. Then, the owning security state will change and since no SPE/TRBE registers are contexted, Secure state will start generating records. Always have NS world own the buffers to prevent this.
Finally, get rid of manage_extensions_common() as it's just a level of indirection to enable a single feature.
Change-Id: I487bd4c70ac3e2105583917a0e5499e0ee248ed9 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| fc7dca72 | 16-Dec-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cm): change owning security state when a feature is disabled
SPE and TRBE don't have an outright EL3 disable, there are only constraints on what's allowed. Since we only enable them for NS
refactor(cm): change owning security state when a feature is disabled
SPE and TRBE don't have an outright EL3 disable, there are only constraints on what's allowed. Since we only enable them for NS at the moment, we want NS to own the buffers even when the feature should be "disabled" for a world. This means that when we're running in NS everything is as normal but when running in S/RL then tracing is prohibited (since the buffers are owned by NS). This allows us to fiddle with context a bit more without having to context switch registers.
Change-Id: Ie1dc7c00e4cf9bcc746f02ae43633acca32d3758 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| b41b9997 | 19-Dec-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "bk/smccc_feature" into integration
* changes: fix(trbe): add a tsb before context switching fix(spe): add a psb before updating context and remove context saving |
| fded3a48 | 18-Dec-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "hm/heap-info" into integration
* changes: fix(handoff): remove XFERLIST_TB_FW_CONFIG feat(arm): migrate heap info to fw handoff feat(mbedtls): introduce crypto lib he
Merge changes from topic "hm/heap-info" into integration
* changes: fix(handoff): remove XFERLIST_TB_FW_CONFIG feat(arm): migrate heap info to fw handoff feat(mbedtls): introduce crypto lib heap info struct feat(handoff): add Mbed-TLS heap info entry tag refactor(arm): refactor secure TL initialization fix(handoff): fix message formatting of hex values feat(handoff): add func to check and init a tl fix(arm): resolve dangling comments around macros
show more ...
|
| 24e1ae2f | 28-Nov-2024 |
Harrison Mutai <harrison.mutai@arm.com> |
fix(handoff): fix message formatting of hex values
Our implementation of printf does not support flag format specifiers. Our previous format specification as a result was causing the integer values
fix(handoff): fix message formatting of hex values
Our implementation of printf does not support flag format specifiers. Our previous format specification as a result was causing the integer values to be omitted. This change updates the formatting to ensure accurate and complete error messages are displayed.
Change-Id: I80cfb5fd7ff26e44cfad4e06803d9e0912488136 Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
show more ...
|
| f1d94593 | 06-Nov-2024 |
Harrison Mutai <harrison.mutai@arm.com> |
feat(handoff): add func to check and init a tl
Add a function to check whether a transfer list has been initialized at the input address. If not, initialize a transfer list at the specified location
feat(handoff): add func to check and init a tl
Add a function to check whether a transfer list has been initialized at the input address. If not, initialize a transfer list at the specified location with the given size. This is to help ensure that we don't accidently overwrite a transfer list that's been passed from a previous stage.
Change-Id: Ic5906626df09d3801435488e258490765e8f81eb Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
show more ...
|
| ebc090fb | 03-Jun-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Cortex-X925
Implements mitigation for CVE-2024-5660 that affects Cortex-X925 revisions r0p0, r0p1. The workaround is to disable the hardware page aggregat
fix(cpus): workaround for CVE-2024-5660 for Cortex-X925
Implements mitigation for CVE-2024-5660 that affects Cortex-X925 revisions r0p0, r0p1. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: I9d5a07ca6b89b27d8876f4349eff2af26c962d8a Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 5b58142c | 18-Jun-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Cortex-X2
Implements mitigation for CVE-2024-5660 that affects Cortex-X2 revisions r0p0, r1p0, r2p0, r2p1. The workaround is to disable the hardware page
fix(cpus): workaround for CVE-2024-5660 for Cortex-X2
Implements mitigation for CVE-2024-5660 that affects Cortex-X2 revisions r0p0, r1p0, r2p0, r2p1. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: If28804e154617a39d7d52c40b3a00a14a39df929 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| aed3e8b5 | 23-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Cortex-A77
Implements mitigation for CVE-2024-5660 that affects Cortex-A77 revisions r0p0, r1p0, r1p1. The workaround is to disable the hardware page aggr
fix(cpus): workaround for CVE-2024-5660 for Cortex-A77
Implements mitigation for CVE-2024-5660 that affects Cortex-A77 revisions r0p0, r1p0, r1p1. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: Ic71b163883ea624e9f2f77deb8b30c69612938b9 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 85709f66 | 23-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Neoverse-V1
Implements mitigation for CVE-2024-5660 that affects Neoverse-V1 revisions r0p0, r1p0, r1p1, r1p2. The workaround is to disable the hardware p
fix(cpus): workaround for CVE-2024-5660 for Neoverse-V1
Implements mitigation for CVE-2024-5660 that affects Neoverse-V1 revisions r0p0, r1p0, r1p1, r1p2. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: Ia59452ea38c66b291790956d7f2880bfcd56d45f Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 902dc0e0 | 23-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Cortex-A78_AE
Implements mitigation for CVE-2024-5660 that affects Cortex-A78_AE revisions r0p0, r0p1, r0p2, r0p3. The workaround is to disable the hardwa
fix(cpus): workaround for CVE-2024-5660 for Cortex-A78_AE
Implements mitigation for CVE-2024-5660 that affects Cortex-A78_AE revisions r0p0, r0p1, r0p2, r0p3. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: I33ac653fcb45f687fe9ace1c76a3eb2000459751 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 46a4cadb | 23-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Cortex-A78C
Implements mitigation for CVE-2024-5660 that affects Cortex-A78C revisions r0p0, r0p1, r0p2. The workaround is to disable the hardware page ag
fix(cpus): workaround for CVE-2024-5660 for Cortex-A78C
Implements mitigation for CVE-2024-5660 that affects Cortex-A78C revisions r0p0, r0p1, r0p2. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: Ieb8d7b122320d16bf8987a43dc683ca41227beb5 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| c818bf1d | 23-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Cortex-A78
Implements mitigation for CVE-2024-5660 that affects Cortex-A78 revisions r0p0, r1p0, r1p1, r1p2. The workaround is to disable the hardware pag
fix(cpus): workaround for CVE-2024-5660 for Cortex-A78
Implements mitigation for CVE-2024-5660 that affects Cortex-A78 revisions r0p0, r1p0, r1p1, r1p2. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: I4e40388bef814481943b2459fe35dd7267c625a2 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 26293a74 | 23-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Cortex-X1
Implements mitigation for CVE-2024-5660 that affects Cortex-X1 revisions r0p0, r1p0, r1p1, r1p2. The workaround is to disable the hardware page
fix(cpus): workaround for CVE-2024-5660 for Cortex-X1
Implements mitigation for CVE-2024-5660 that affects Cortex-X1 revisions r0p0, r1p0, r1p1, r1p2. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: I3124db3980f2786412369a010ca6abbbbaa3b601 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 26e0ff9d | 21-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Neoverse-N2
Implements mitigation for CVE-2024-5660 that affects Neoverse-N2 revisions r0p0, r0p1, r0p2, r0p3. The workaround is to disable the hardware p
fix(cpus): workaround for CVE-2024-5660 for Neoverse-N2
Implements mitigation for CVE-2024-5660 that affects Neoverse-N2 revisions r0p0, r0p1, r0p2, r0p3. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1. This patch implements the erratum mitigation for Neoverse-N2.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: I2b9dea78771cc159586a03ff563c0ec79591ea64 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 0d7b503f | 21-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Cortex-A710
Implements mitigation for CVE-2024-5660 that affects Cortex-A710 revisions r0p0, r1p0, r2p0, r2p1. The workaround is to disable the hardware p
fix(cpus): workaround for CVE-2024-5660 for Cortex-A710
Implements mitigation for CVE-2024-5660 that affects Cortex-A710 revisions r0p0, r1p0, r2p0, r2p1. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: I10feea238600dcceaac7bb75a59db7913ca65cf1 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 878464f0 | 21-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Neoverse-V2
Implements mitigation for CVE-2024-5660 that affects Neoverse-V2 revisions r0p0, r0p1, r0p2. The workaround is to disable the hardware page ag
fix(cpus): workaround for CVE-2024-5660 for Neoverse-V2
Implements mitigation for CVE-2024-5660 that affects Neoverse-V2 revisions r0p0, r0p1, r0p2. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: If66687add52d16f68ce54fe5433dd3b3f067ee04 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| b0d441bd | 21-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Cortex-X3
Implements mitigation for CVE-2024-5660 that affects Cortex-X3 revisions r0p0, r1p0, r1p1, r1p2. The workaround is to disable the hardware page
fix(cpus): workaround for CVE-2024-5660 for Cortex-X3
Implements mitigation for CVE-2024-5660 that affects Cortex-X3 revisions r0p0, r1p0, r1p1, r1p2. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: Ibe90313948102ece3469f2cfe3faccc7f4beeabe Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| ad3da019 | 21-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Neoverse-V3
Implements mitigation for CVE-2024-5660 that affects Neoverse-V3 revisions r0p0, r0p1. The workaround is to disable the hardware page aggregat
fix(cpus): workaround for CVE-2024-5660 for Neoverse-V3
Implements mitigation for CVE-2024-5660 that affects Neoverse-V3 revisions r0p0, r0p1. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: I9ed2590bf1215bf6a692f01dfd351e469ff072f8 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| af65cbb9 | 20-May-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): workaround for CVE-2024-5660 for Cortex-X4
Implements mitigation for CVE-2024-5660 that affects Cortex-X4 revisions r0p0, r0p1, r0p2. The workaround is to disable the hardware page aggreg
fix(cpus): workaround for CVE-2024-5660 for Cortex-X4
Implements mitigation for CVE-2024-5660 that affects Cortex-X4 revisions r0p0, r0p1, r0p2. The workaround is to disable the hardware page aggregation at EL3 by setting CPUECTLR_EL1[46] = 1'b1.
Public Documentation: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660
Change-Id: I378cb4978919cced03e7febc2ad431c572eac72d Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 6595f4cb | 13-Dec-2024 |
Igor Podgainõi <igor.podgainoi@arm.com> |
fix(cm): fix context management SYSREG128 write macros
This patch fixes a bug which was introduced in commit 3065513 related to improper saving of EL1 context in the context management library code
fix(cm): fix context management SYSREG128 write macros
This patch fixes a bug which was introduced in commit 3065513 related to improper saving of EL1 context in the context management library code when using 128-bit system registers.
Bug explanation: The function el1_sysregs_context_save still used the normal macros that read all the system registers related to the EL1 context, which then involved casting them to uint64_t and eventually writing them to a memory structure. This means that the context management library was saving EL1-related SYSREG128 registers with the upper 64 bits zeroed out.
Alternative macros had previously been introduced for the EL2 context in the aforementioned commit, but not for EL1.
Some refactoring has also been done as part of this patch: - Re-added "common" back to write_el2_ctx_common_sysreg128 - Added dummy SYSREG128 macros for cases when some features are disabled - Removed some newlines
Change-Id: I15aa2190794ac099a493e5f430220b1c81e1b558 Signed-off-by: Igor Podgainõi <igor.podgainoi@arm.com>
show more ...
|
| 73d98e37 | 02-Dec-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(trbe): add a tsb before context switching
Just like for SPE, we need to synchronize TRBE samples before we change the context to ensure everything goes where it was intended to. If that is not d
fix(trbe): add a tsb before context switching
Just like for SPE, we need to synchronize TRBE samples before we change the context to ensure everything goes where it was intended to. If that is not done, the in-flight entries might use any piece of now incorrect context as there are no implicit ordering requirements.
Prior to root context, the buffer drain hooks would have done that. But now that must happen much earlier. So add a tsb to prepare_el3_entry as well.
Annoyingly, the barrier can be reordered relative to other instructions by default (rule RCKVWP). So add an isb after the psb/tsb to assure that they are ordered, at least as far as context is concerned.
Then, drop the buffer draining hooks. Everything they need to do is already done by now. There's a notable difference in that there are no dsb-s now. Since EL3 does not access the buffers or the feature specific context, we don't need to wait for them to finish.
Finally, drop a stray isb in the context saving macro. It is now absorbed into root context, but was missed.
Change-Id: I30797a40ac7f91d0bb71ad271a1597e85092ccd5 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| f8088733 | 21-Nov-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(spe): add a psb before updating context and remove context saving
In the chapter about FEAT_SPE (D16.4 specifically) it is stated that "Sampling is always disabled at EL3". That means that disab
fix(spe): add a psb before updating context and remove context saving
In the chapter about FEAT_SPE (D16.4 specifically) it is stated that "Sampling is always disabled at EL3". That means that disabling sampling (writing PMBLIMITR_EL1.E to 0) is redundant and can be removed. The only reason we save/restore SPE context is because of that disable, so those can be removed too.
There's the issue of draining the profiling buffer though. No new samples will have been generated since entering EL3. However, old samples might still be in-flight. Unless synchronised by a psb csync, those might be affected by our extensive context mutation. Adding a psb in prepare_el3_entry should cater for that. Note that prior to the introduction of root context this was not a problem as context remained unchanged and the hooks took care of the rest.
Then, the only time we care about the buffer actually making it to memory is when we exit coherency. On HW_ASSISTED_COHERENCY systems we don't have to do anything, it should be handled for us. Systems without it need a dsb to wait for them to complete. There should be one already in each cpu's powerdown hook which should work.
While on the topic of barriers, the esb barrier is no longer used. Remove it.
Change-Id: I9736fc7d109702c63e7d403dc9e2a4272828afb2 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 62ed5aa0 | 13-Dec-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge "fix(romlib): romlib build without MbedTLS" into integration |