| #
3312fe83 |
| 11-Oct-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "refactor(console): disable getc() by default" into integration
|
| #
85bebe18 |
| 11-Oct-2023 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
refactor(console): disable getc() by default
The ability to read a character from the console constitutes an attack vector into TF-A, as it gives attackers a means to inject arbitrary data into TF-A
refactor(console): disable getc() by default
The ability to read a character from the console constitutes an attack vector into TF-A, as it gives attackers a means to inject arbitrary data into TF-A. It is dangerous to keep that feature enabled if not strictly necessary, especially in production firmware builds.
Thus, we need a way to disable this feature. Moreover, when it is disabled, all related code should be eliminated from the firmware binaries, such that no remnant/dead getc() code remains in memory, which could otherwise be used as a gadget as part of a bigger security attack.
This patch disables getc() feature by default. For legitimate getc() use cases [1], it can be explicitly enabled by building TF-A with ENABLE_CONSOLE_GETC=1.
The following changes are introduced when getc() is disabled:
- The multi-console framework no longer provides the console_getc() function.
- If the console driver selected by the platform attempts to register a getc() callback into the multi-console framework then TF-A will now fail to build.
If registered through the assembly function finish_console_register(): - On AArch64, you'll get: Error: undefined symbol CONSOLE_T_GETC used as an immediate value. - On AArch32, you'll get: Error: internal_relocation (type: OFFSET_IMM) not fixed up
If registered through the C function console_register(), this requires populating a struct console with a getc field, which will trigger: error: 'console_t' {aka 'struct console'} has no member named 'getc'
- All console drivers which previously registered a getc() callback have been modified to do so only when ENABLE_CONSOLE_GETC=1.
[1] Example of such use cases would be: - Firmware recovery: retrieving a golden BL2 image over the console in order to repair a broken firmware on a bricked board. - Factory CLI tool: Drive some soak tests through the console.
Discussed on TF-A mailing list here: https://lists.trustedfirmware.org/archives/list/tf-a@lists.trustedfirmware.org/thread/YS7F6RCNTWBTEOBLAXIRTXWIOYINVRW7/
Change-Id: Icb412304cd23dbdd7662df7cf8992267b7975cc5 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Acked-by: Baruch Siach <baruch@tkos.co.il>
show more ...
|
| #
601e2d43 |
| 10-Jan-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "bk/warnings" into integration
* changes: docs: describe the new warning levels build: add -Wunused-const-variable=2 to W=2 build: include -Wextra in generic builds
Merge changes from topic "bk/warnings" into integration
* changes: docs: describe the new warning levels build: add -Wunused-const-variable=2 to W=2 build: include -Wextra in generic builds docs(porting-guide): update a reference fix(st-usb): replace redundant checks with asserts fix(brcm): add braces around bodies of conditionals fix(renesas): align incompatible function pointers fix(zynqmp): remove redundant api_version check fix: remove old-style declarations fix: unify fallthrough annotations
show more ...
|
| #
291be198 |
| 07-Dec-2022 |
Boyan Karatotev <boyan.karatotev@arm.com> |
docs: describe the new warning levels
When -Wextra was added, the warning levels changed their meaning. Add a description in the build option section and leave the security hardening section as most
docs: describe the new warning levels
When -Wextra was added, the warning levels changed their meaning. Add a description in the build option section and leave the security hardening section as mostly a pointer to it.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: Iabf2f598d0bf3e865c9b991c5d44d2acb9572bd5
show more ...
|
| #
60196429 |
| 19-Feb-2020 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "Update docs with PMU security information" into integration
|
| #
62c9be71 |
| 27-Sep-2019 |
Petre-Ionut Tudor <petre-ionut.tudor@arm.com> |
Update docs with PMU security information
This patch adds information on the PMU configuration registers and security considerations related to the PMU.
Signed-off-by: Petre-Ionut Tudor <petre-ionu
Update docs with PMU security information
This patch adds information on the PMU configuration registers and security considerations related to the PMU.
Signed-off-by: Petre-Ionut Tudor <petre-ionut.tudor@arm.com> Change-Id: I36b15060b9830a77d3f47f293c0a6dafa3c581fb
show more ...
|
| #
cf96f2ed |
| 06-Feb-2020 |
György Szing <gyorgy.szing@arm.com> |
Merge "doc: Split and expand coding style documentation" into integration
|
| #
e63f5d12 |
| 16-May-2019 |
Paul Beesley <paul.beesley@arm.com> |
doc: Split and expand coding style documentation
This patch expands the coding style documentation, splitting it into two documents: the core style rules and extended guidelines. Note that it does n
doc: Split and expand coding style documentation
This patch expands the coding style documentation, splitting it into two documents: the core style rules and extended guidelines. Note that it does not redefine or change the coding style (aside from section 4.6.2) - generally, it is only documenting the existing style in more detail.
The aim is for the coding style to be more readable and, in turn, for it to be followed by more people. We can use this as a more concrete reference when discussing the accepted style with external contributors.
Change-Id: I87405ace9a879d7f81e6b0b91b93ca69535e50ff Signed-off-by: Paul Beesley <paul.beesley@arm.com> Signed-off-by: Petre-Ionut Tudor <petre-ionut.tudor@arm.com>
show more ...
|
| #
255b380a |
| 16-Dec-2019 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge "Remove -Wpadded warning" into integration
|
| #
11a96e0e |
| 18-Sep-2019 |
Justin Chadwell <justin.chadwell@arm.com> |
Remove -Wpadded warning
-Wpadded warns whenever the C compiler automatically includes any padding in a structure. Because TF-A has a large number of structures, this occurs fairly frequently and is
Remove -Wpadded warning
-Wpadded warns whenever the C compiler automatically includes any padding in a structure. Because TF-A has a large number of structures, this occurs fairly frequently and is incredibly verbose, and as such is unlikely to ever be fixed.
The utility of this warning is also extremely limited - knowing that a structure includes padding does not point to the existence of an error, and is probably quite unlikely to indicate actually buggy behaviour. Therefore, it's probably best to keep this warning off at all times.
Change-Id: I0797cb75f06b4fea0d2fdc16fd5ad978a31d76ec Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
show more ...
|
| #
6141eeeb |
| 03-Dec-2019 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "Remove unnecessary warning options" into integration
|
| #
f325f9ce |
| 27-Nov-2019 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge "doc: Split the User Guide into multiple files" into integration
|
| #
43f35ef5 |
| 29-May-2019 |
Paul Beesley <paul.beesley@arm.com> |
doc: Split the User Guide into multiple files
The User Guide document has grown organically over time and now covers a wide range of topics, making it difficult to skim read and extract information
doc: Split the User Guide into multiple files
The User Guide document has grown organically over time and now covers a wide range of topics, making it difficult to skim read and extract information from. Currently, it covers these topics and maybe a couple more:
- Requirements (hardware, tools, libs) - Checking out the repo - Basic build instructions - A comprehensive list of build flags - FIP packaging - Building specifically for Juno - Firmware update images - EL3 payloads - Preloaded BL33 boot flow - Running on FVPs - Running on Juno
I have separated these out into a few groups that become new documents. Broadly speaking, build instructions for the tools, for TF-A generally, and for specific scenarios are separated. Content relating to specific platforms (Juno and the FVPs are Arm-specific platforms, essentially) has been moved into the documentation that is specific to those platforms, under docs/plat/arm.
Change-Id: Ica87c52d8cd4f577332be0b0738998ea3ba3bbec Signed-off-by: Paul Beesley <paul.beesley@arm.com>
show more ...
|
| #
b8baa934 |
| 31-Jul-2019 |
Justin Chadwell <justin.chadwell@arm.com> |
Remove unnecessary warning options
Both -Wmissing-field-initializers and -Wsign-compare are both covered by -Wextra which is enabled at W=1 anyway. Therefore, the explicit options are not required.
Remove unnecessary warning options
Both -Wmissing-field-initializers and -Wsign-compare are both covered by -Wextra which is enabled at W=1 anyway. Therefore, the explicit options are not required.
Change-Id: I2e7d95b5fc14af7c70895859a7ebbeac5bc0d2a4 Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
show more ...
|
| #
f8e3340c |
| 09-Oct-2019 |
Paul Beesley <paul.beesley@arm.com> |
Merge changes from topic "pb/readthedocs" into integration
* changes: doc: Add guide for building the docs locally doc: De-duplicate readme and license files doc: Convert internal links to RST
Merge changes from topic "pb/readthedocs" into integration
* changes: doc: Add guide for building the docs locally doc: De-duplicate readme and license files doc: Convert internal links to RST format
show more ...
|
| #
34760951 |
| 12-Apr-2019 |
Paul Beesley <paul.beesley@arm.com> |
doc: Convert internal links to RST format
Currently links between documents are using the format:
<path/to/><filename>.rst
This was required for services like GitHub because they render each docum
doc: Convert internal links to RST format
Currently links between documents are using the format:
<path/to/><filename>.rst
This was required for services like GitHub because they render each document in isolation - linking to another document is like linking to any other file, just provide the full path.
However, with the new approach, the .rst files are only the raw source for the documents. Once the documents have been rendered the output is now in another format (HTML in our case) and so, when linking to another document, the link must point to the rendered version and not the .rst file.
The RST spec provides a few methods for linking between content. The parent of this patch enabled the automatic creation of anchors for document titles - we will use these anchors as the targets for our links. Additional anchors can be added by hand if needed, on section and sub-section titles, for example.
An example of this new format, for a document with the title "Firmware Design" is :ref:`Firmware Design`.
One big advantage of this is that anchors are not dependent on paths. We can then move documents around, even between directories, without breaking any links between documents. Links will need to be updated only if the title of a document changes.
Change-Id: I9e2340a61dd424cbd8fd1ecc2dc166f460d81703 Signed-off-by: Paul Beesley <paul.beesley@arm.com>
show more ...
|
| #
f56734fe |
| 20-Jun-2019 |
John Tsichritzis <john.tsichritzis@arm.com> |
Merge "doc: Isolate security-related build options" into integration
|
| #
2e302371 |
| 05-Jun-2019 |
Ambroise Vincent <ambroise.vincent@arm.com> |
doc: Isolate security-related build options
Reference security specific build options from the user guide.
Change-Id: I0e1efbf47d914cf3c473104175c702ff1a80eb67 Signed-off-by: Ambroise Vincent <ambr
doc: Isolate security-related build options
Reference security specific build options from the user guide.
Change-Id: I0e1efbf47d914cf3c473104175c702ff1a80eb67 Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
show more ...
|