1d39c2f38SGovindraj RajaLTS - Long-Term Support 2d39c2f38SGovindraj Raja======================= 3d39c2f38SGovindraj Raja 4d39c2f38SGovindraj Raja.. table:: Table 1: Document History 5d39c2f38SGovindraj Raja 6d39c2f38SGovindraj Raja +-------------+--------------------+-------------------------------------------------------+ 7d39c2f38SGovindraj Raja | Date | Author | Description | 8d39c2f38SGovindraj Raja +=============+====================+=======================================================+ 9d39c2f38SGovindraj Raja | 2022-07-20 | Okash Khawaja, | Initial draft. | 10d39c2f38SGovindraj Raja | | Varun Wadekar | | 11d39c2f38SGovindraj Raja +-------------+--------------------+-------------------------------------------------------+ 12d39c2f38SGovindraj Raja | 2022-07-21 | Varun Wadekar | Refine the Maintainership guidelines and planning | 13d39c2f38SGovindraj Raja | | | sections. Introduce a new section documenting a day | 14d39c2f38SGovindraj Raja | | | in the life of a LTS branch maintainer | 15d39c2f38SGovindraj Raja +-------------+--------------------+-------------------------------------------------------+ 16d39c2f38SGovindraj Raja | 2022-08-05 | Okash Khawaja, | Merge two drafts (draft 1 and 2), address comments | 17d39c2f38SGovindraj Raja | | Varun Wadekar | made by both authors, cosmetic changes to the content | 18d39c2f38SGovindraj Raja | | | all over the document | 19d39c2f38SGovindraj Raja +-------------+--------------------+-------------------------------------------------------+ 20d39c2f38SGovindraj Raja | 2022-08-05 | Okash Khawaja | Add note about testing support available from TF.org | 21d39c2f38SGovindraj Raja +-------------+--------------------+-------------------------------------------------------+ 22d39c2f38SGovindraj Raja | 2022-08-05 | Varun Wadekar | Changed the “Future plans” section to “FAQ” and | 23d39c2f38SGovindraj Raja | | | answered some of the questions with feedback from | 24d39c2f38SGovindraj Raja | | | the community. | 25d39c2f38SGovindraj Raja +-------------+--------------------+-------------------------------------------------------+ 26d39c2f38SGovindraj Raja | 2025-01-07 | Govindraj Raja | Convert from pdf to rst. | 27d39c2f38SGovindraj Raja +-------------+--------------------+-------------------------------------------------------+ 28faa8c656SGovindraj Raja | 2025-01-07 | Govindraj Raja | Updates based on learnings and suggestions. | 29faa8c656SGovindraj Raja +-------------+--------------------+-------------------------------------------------------+ 302d8c2870SChris Palmer | 2025-03-27 | Chris Palmer | Playbook for making a new release. | 312d8c2870SChris Palmer +-------------+--------------------+-------------------------------------------------------+ 32d39c2f38SGovindraj Raja 33d39c2f38SGovindraj RajaThis document proposes a plan for long-term support (LTS) of the |TF-A| project. 34d39c2f38SGovindraj Raja 35d39c2f38SGovindraj RajaWhy is LTS required? 36d39c2f38SGovindraj Raja-------------------- 37d39c2f38SGovindraj RajaLTS is needed for commercial reasons. More specifically, on the device side, 38d39c2f38SGovindraj Rajawhen a product is released, the companies have to support that in-market product 39d39c2f38SGovindraj Rajasuch that the amount of changes to the firmware are kept to a minimum to avoid 40d39c2f38SGovindraj Rajathe risk of regression. At the same time the companies don't want to exclude 41d39c2f38SGovindraj Rajacritical patches such as those for security advisories. Similarly on the server side, 42d39c2f38SGovindraj Rajacompanies want to minimize the churn when deploying fixes during incident 43d39c2f38SGovindraj Rajaresponse, e.g. due to critical security bugs. 44d39c2f38SGovindraj Raja 45faa8c656SGovindraj RajaAlso, the European Cyber Resilience Act (CRA) is a new EU legislation that mandates 46faa8c656SGovindraj Rajacybersecurity standards for products containing digital elements, aiming to 47faa8c656SGovindraj Rajaprotect consumers and businesses by ensuring manufacturers build security into 48faa8c656SGovindraj Rajatheir hardware and software throughout their lifecycle, including automatic 49faa8c656SGovindraj Rajaupdates and incident reporting; essentially requiring all digital products 50faa8c656SGovindraj Rajasold in the EU to meet specific cybersecurity requirements. 51faa8c656SGovindraj Raja 52faa8c656SGovindraj RajaThis means that companies have to maintain and backport critical updates to 53d39c2f38SGovindraj Rajaold branches internally. As this effort is duplicated across different companies 54d39c2f38SGovindraj Rajausing TF-A, it makes sense to factor out this effort into a community-wide LTS. 55d39c2f38SGovindraj Raja 56d39c2f38SGovindraj RajaWhat does LTS mean for TF-A? 57d39c2f38SGovindraj Raja---------------------------- 58d39c2f38SGovindraj RajaIn this section we will define exactly what constitutes LTS for TF-A. 59d39c2f38SGovindraj RajaSpecifically, we will define the following characteristics: 60d39c2f38SGovindraj Raja 61d39c2f38SGovindraj Raja- criteria for selecting patches which will be backported to LTS branches 62d39c2f38SGovindraj Raja- lifetime and frequency of LTS branches 63d39c2f38SGovindraj Raja 64d39c2f38SGovindraj Raja**Criteria** 65d39c2f38SGovindraj Raja 66d39c2f38SGovindraj RajaWe must have an objective criterion for selecting patches to be backported to 67d39c2f38SGovindraj RajaLTS branches. This will make maintenance easy because: 68d39c2f38SGovindraj Raja 69d39c2f38SGovindraj Rajaa. there will be less -- ideally no -- discussion when selecting patches to backport 70d39c2f38SGovindraj Rajab. large parts of the process can be automated 71d39c2f38SGovindraj Raja 72d39c2f38SGovindraj RajaBelow is the criteria 73d39c2f38SGovindraj Raja 74d39c2f38SGovindraj Raja#. No features will be backported. 75d39c2f38SGovindraj Raja#. Security advisories: Any patch that makes it into :ref:`Security Advisories` 76d39c2f38SGovindraj Raja is automatically selected for back porting. This includes patches to external 77d39c2f38SGovindraj Raja components too, e.g. libfdt. 78d39c2f38SGovindraj Raja#. Workarounds for CPU and other ARM IP errata 79d39c2f38SGovindraj Raja#. Workarounds for non-ARM IP errata, e.g. TI UART 80d39c2f38SGovindraj Raja#. Fixes for platform bugs. These patches must not modify any code outside of 81d39c2f38SGovindraj Raja the specific platform that the fix applies to. 82d39c2f38SGovindraj Raja#. Patches can only be backported from the master branch. In other words, the 83d39c2f38SGovindraj Raja master branch will be a superset of all the changes in any LTS branch. 84d39c2f38SGovindraj Raja 85d39c2f38SGovindraj Raja**Lifetime and frequency** 86d39c2f38SGovindraj Raja 87d39c2f38SGovindraj RajaThis section approaches three questions: for how long should an LTS release be 88d39c2f38SGovindraj Rajasupported, how frequently should LTS releases be made and at which time(s) of 89d39c2f38SGovindraj Rajathe year should the releases be made. 90d39c2f38SGovindraj Raja 91d39c2f38SGovindraj Raja1. For how long should an LTS release be supported? 92d39c2f38SGovindraj Raja 93faa8c656SGovindraj RajaThe Linux kernel maintainers supports an LTS branch for 2 years. Since firmware 94faa8c656SGovindraj Rajatends to have less churn and longer lifetime than a HLOS, TF-A is trying to 95faa8c656SGovindraj Rajasupport at-least 7 years for its LTS. Initially it was intended to support 96faa8c656SGovindraj Raja5 years but there has been no objections to extend LTS support to 7 years. 97faa8c656SGovindraj RajaThere are many challenges that may influence the 7 year support from CI 98faa8c656SGovindraj Rajainfrastructure to availability of maintainers. 99d39c2f38SGovindraj Raja 100d39c2f38SGovindraj Raja2. How frequently should LTS releases be made? 101d39c2f38SGovindraj Raja 102d39c2f38SGovindraj RajaGiven that many products that have a release cycle, have a yearly release 103d39c2f38SGovindraj Rajacycle, it would make sense to have yearly TF-A releases. 104d39c2f38SGovindraj Raja 105d39c2f38SGovindraj Raja3. Which time(s) of the year should the releases be made? 106d39c2f38SGovindraj Raja 107d39c2f38SGovindraj RajaTF-A releases are cut twice a year: May and November. Basing LTS release 108d39c2f38SGovindraj Rajaon the November TF-A release has a few benefits. First, it aligns with Linux 109d39c2f38SGovindraj RajaLTS releases which happen towards the end of each year. Second, it aligns 110d39c2f38SGovindraj Rajawith Android releases which tend to fall in Q3 each year. Since product 111d39c2f38SGovindraj Rajareleases are timed with Android release, this gives enough time to harden 112d39c2f38SGovindraj Rajathe TF-A LTS release during development so that it's ready for launch in 113d39c2f38SGovindraj RajaQ3 following year. On the other hand, if the May release of TF-A is chosen as 114d39c2f38SGovindraj Rajathe basis for LTS then developers will have little time -- about a month, 115d39c2f38SGovindraj Rajataking into account the test-and-debug phase before LTS is cut (see below) -- 116d39c2f38SGovindraj Rajabefore Android release. 117d39c2f38SGovindraj Raja 118d39c2f38SGovindraj RajaTo summarize, there will be one LTS release per year. It will be supported for 119d39c2f38SGovindraj Raja5 years and we can discuss extending it to 7 years later on. The LTS release 120d39c2f38SGovindraj Rajawill be based on the November release of TF-A. 121d39c2f38SGovindraj Raja 122d39c2f38SGovindraj Raja**Testing Criteria** 123d39c2f38SGovindraj Raja 124d39c2f38SGovindraj RajaEvery patch merged to the LTS branch will complete the following tests before 125d39c2f38SGovindraj Rajagetting approved. 126d39c2f38SGovindraj Raja 127d39c2f38SGovindraj Raja#. TFTF tests currently running in the testing farm 128d39c2f38SGovindraj Raja#. CI/CD static analysis scans 129d39c2f38SGovindraj Raja#. Coverity scans 130d39c2f38SGovindraj Raja#. Platform tests 131d39c2f38SGovindraj Raja 132d39c2f38SGovindraj RajaPlatforms that are not maintained upstream will undergo testing downstream in a 133d39c2f38SGovindraj Rajapre-defined window. The platform maintainer will complete the testing and provide 134d39c2f38SGovindraj Rajaa verified score on the patch once testing is completed. 135d39c2f38SGovindraj Raja 136d39c2f38SGovindraj Raja** A note about test coverage from TF.org ** 137d39c2f38SGovindraj Raja 138d39c2f38SGovindraj RajaCurrently TF.org maintains a CI system to run TF-A automated tests on a 139d39c2f38SGovindraj Rajaselection of HW boards donated by TF.org members (a benefit reserved to project 140d39c2f38SGovindraj Rajamembers, see the project charter for more details). This automated test coverage 141d39c2f38SGovindraj Rajawill be extended to cover testing for LTS as well for boards that are part of 142d39c2f38SGovindraj Rajathe CI system. 143d39c2f38SGovindraj Raja 144faa8c656SGovindraj Raja**TFTF Branching** 145d39c2f38SGovindraj Raja 146d39c2f38SGovindraj RajaA note about testing here. After a patch is backported to an LTS branch, that 147d39c2f38SGovindraj Rajabranch will need to be regression tested. Since TFTF moves forward with latest 148d39c2f38SGovindraj RajaTF-A changes, newer TFTF tests may not apply to old LTS branches. Therefore 149d39c2f38SGovindraj RajaTFTF will also need to be branched, in-sync with TF-A LTS branches. In other 150d39c2f38SGovindraj Rajawords, there will be one TFTF LTS branch corresponding to each TF-A LTS branch. 151d39c2f38SGovindraj RajaThe TFTF LTS branch will be used to regression test the corresponding TF-A LTS 152d39c2f38SGovindraj Rajabranch. 153d39c2f38SGovindraj Raja 154d39c2f38SGovindraj RajaAs we work with the LTS branch of TFTF, we might also need fixes for TFTF 155d39c2f38SGovindraj Rajaitself to be ported to LTS. However, decision-making about those patches need 156d39c2f38SGovindraj Rajanot be as stringent as for TF-A. 157d39c2f38SGovindraj Raja 158faa8c656SGovindraj Raja**CI Scripts** 159faa8c656SGovindraj Raja 160faa8c656SGovindraj RajaCI Scripts moves forward with TF-A changes, since we need to checkout the 161faa8c656SGovindraj Rajacorresponding release version of CI scripts for LTS. 162faa8c656SGovindraj Raja 163faa8c656SGovindraj RajaThough we are unlikely to update CI scripts, but time to time migrating a newer 164faa8c656SGovindraj RajaFVP version or deprecating certain tests due to unavailability of platforms may 165faa8c656SGovindraj Rajainfluence updates to CI Scripts. 166faa8c656SGovindraj Raja 167faa8c656SGovindraj Raja**Hafnium / OP-TEE** 168faa8c656SGovindraj Raja 169faa8c656SGovindraj RajaBoth Hafnium and OP-TEE move forward with TF-A changes so we need to freeze their 170faa8c656SGovindraj Rajacorresponding version from TF-A release for a LTS. 171faa8c656SGovindraj Raja 172faa8c656SGovindraj Raja**MbedTLS** 173faa8c656SGovindraj Raja 174faa8c656SGovindraj RajaUpdates to the version of MbedTLS used with LTS will happen time to time based on 175faa8c656SGovindraj Rajamaintainers call to update them or not. 176faa8c656SGovindraj Raja 177d39c2f38SGovindraj RajaRelease details 178d39c2f38SGovindraj Raja--------------- 179d39c2f38SGovindraj RajaThis section goes into details of what the LTS release process will look like. 180d39c2f38SGovindraj Raja 181d39c2f38SGovindraj Raja 182d39c2f38SGovindraj Raja**Test-and-debug period** 183d39c2f38SGovindraj Raja 184d39c2f38SGovindraj RajaSince the LTS branch will be used in product releases, it is expected that more 185d39c2f38SGovindraj Rajatesting and debugging will be done on the November release of TF-A. Therefore 186d39c2f38SGovindraj Rajait would make sense to leave at least a month after the November release and 187d39c2f38SGovindraj Rajathen cut the LTS branch. We recommend two months, given that one of the months 188d39c2f38SGovindraj Rajais December which tends to be slower due to holidays. So, an end-of-November 189d39c2f38SGovindraj RajaTF-A release would result in a beginning-of-February LTS release. Note that 190d39c2f38SGovindraj Rajathe LTS branch will be created at the same time as the TF-A November release, 191d39c2f38SGovindraj Rajabut it will be officially released at the end of January or early February. 192d39c2f38SGovindraj RajaGoing forward we should strive to make the period smaller and smaller until 193d39c2f38SGovindraj Rajaideally it coincides with TF-A November release which means that our test 194d39c2f38SGovindraj Rajaand CI/CD infra is good enough to allow that to happen. 195d39c2f38SGovindraj Raja 196d39c2f38SGovindraj Raja**Example timeline** 197d39c2f38SGovindraj Raja 198d39c2f38SGovindraj RajaBelow is an example timeline starting from the November 2022 release of TF-A. 199d39c2f38SGovindraj Raja 200d39c2f38SGovindraj Raja.. image:: ../resources/diagrams/lts-timeline-example.png 201d39c2f38SGovindraj Raja 202d39c2f38SGovindraj Raja- Nov 2022: TF-A 2.8 is released towards the end of Nov, 2022. Not shown in the 203d39c2f38SGovindraj Raja diagram, at the same time LTS release candidate branch is made which is based 204d39c2f38SGovindraj Raja on TF-A 2.8. This means new features going in 2.8 won’t go in the LTS branch. 205d39c2f38SGovindraj Raja We can call it `LTS 2.8-rc`. 206d39c2f38SGovindraj Raja- Feb 2023: After testing and debugging LTS 2.8-rc for a couple of months, 207d39c2f38SGovindraj Raja LTS 2.8.0 is officially released in early Feb 2023. 208d39c2f38SGovindraj Raja- May 2023: TF-A 2.9 is released but since this is not an LTS branch it doesn’t 209d39c2f38SGovindraj Raja affect LTS. 210d39c2f38SGovindraj Raja- Somewhere between May and Nov of 2023: A security advisory comes up and the 211d39c2f38SGovindraj Raja related patches go into TF-A master branch. Since these patches fall under 212d39c2f38SGovindraj Raja LTS criteria, they are backported to LTS 2.8.0 which results in LTS 2.8.1 213d39c2f38SGovindraj Raja being released. Note that here we don’t allow the extra testing and debugging 214d39c2f38SGovindraj Raja time that we had between Nov 2022 and early Feb 2023. This is because there 215d39c2f38SGovindraj Raja isn’t as much to test and debug as an annual LTS release has. Also companies 216d39c2f38SGovindraj Raja might want to deploy critical patches soon. 217d39c2f38SGovindraj Raja- Nov 2023: TF-A 2.10 is released. Not shown in the diagram, at the same time 218d39c2f38SGovindraj Raja LTS 2.10-rc is made. It’s tested by partners for a couple of months. 219d39c2f38SGovindraj Raja- Feb 2024: LTS 2.10.1 is released in early Feb. Now there are two LTS 220d39c2f38SGovindraj Raja branches: 2.8.1 and 2.10.1. 221d39c2f38SGovindraj Raja 222d39c2f38SGovindraj RajaNote that TFTF will follow similar branching model as TF-A LTS, i.e. there will 223d39c2f38SGovindraj Rajabe TFTF LTS 2.8.0 in Feb 2023, 2.8.1 (if new TFTF tests need to be added for 224d39c2f38SGovindraj Rajathe security advisory) when there is TF-A LTS 2.8.1 and so on. 225d39c2f38SGovindraj Raja 226d39c2f38SGovindraj RajaMaintainership 227d39c2f38SGovindraj Raja-------------- 228d39c2f38SGovindraj Raja 229d39c2f38SGovindraj Raja**Guidelines & Responsibilities** 230d39c2f38SGovindraj Raja 231d39c2f38SGovindraj Raja#. Maintainers shall be impartial and strive to work for the benefit of 232d39c2f38SGovindraj Raja the community 233d39c2f38SGovindraj Raja#. Objective and well-defined merge criteria to avoid confusion and discussions 234d39c2f38SGovindraj Raja at random points in time when there is a "candidate" patch 235d39c2f38SGovindraj Raja#. The maintainers shall explain the lifecycle of a patch to the community, 236d39c2f38SGovindraj Raja with a detailed description of the maximum time spent in each step 237d39c2f38SGovindraj Raja#. Automate, automate, automate 238d39c2f38SGovindraj Raja#. Reviewers should not focus too much on "what" and instead focus on "how" 239d39c2f38SGovindraj Raja#. Constantly refine the merge criteria to include more partner use cases 240d39c2f38SGovindraj Raja#. Ensure that all candidate patches flow from the main branch to all LTS branches 241faa8c656SGovindraj Raja#. Maintainers collaborate in the following discord channel - 242faa8c656SGovindraj Raja https://discord.com/channels/1106321706588577904/1162029539761852436 243faa8c656SGovindraj Raja#. Maintainers discuss and provide updates about upcoming LTS releases in the above 244faa8c656SGovindraj Raja mentioned discord channel. 245d39c2f38SGovindraj Raja 246d39c2f38SGovindraj Raja**Options** 247d39c2f38SGovindraj Raja 248d39c2f38SGovindraj RajaThese are some options in the order of preference. 249d39c2f38SGovindraj Raja 250d39c2f38SGovindraj Raja#. Current set of :ref:`lts maintainers` from tf.org(or hired contractor) take care of the LTS 251d39c2f38SGovindraj Raja#. From the community, create a set of maintainers focused solely on the LTS branches 252d39c2f38SGovindraj Raja 253d39c2f38SGovindraj RajaA day in the life of a maintainer 254d39c2f38SGovindraj Raja********************************* 255d39c2f38SGovindraj RajaThis section documents the daily tasks that a maintainer might perform to 256d39c2f38SGovindraj Rajasupport the LTS program. It is expected that a maintainer follows clearly laid 257d39c2f38SGovindraj Rajadown steps and does not have to make policy level decisions for merge, testing, 258d39c2f38SGovindraj Rajaor candidate patch selection. 259d39c2f38SGovindraj Raja 260d39c2f38SGovindraj Raja#. Monitor the main branch to identify candidate patches for the LTS branches 261faa8c656SGovindraj Raja#. Monitor emails from LTS triage report to choose patches that should be 262faa8c656SGovindraj Raja cherry-picked for LTS branches. 263faa8c656SGovindraj Raja#. Cherry-pick agreed patches to LTS branches co-ordinate review process and Monitor 264faa8c656SGovindraj Raja CI results. 265d39c2f38SGovindraj Raja#. Monitor the mailing list for any LTS related issues 266d39c2f38SGovindraj Raja#. Propose or solicit patches to the main branch and tag them as candidates for LTS 267*532350d2SYann Gautier#. Monitor Github dependabot pull requests to identify patches that could be taken for a given LTS 268*532350d2SYann Gautier branch: https://github.com/TrustedFirmware-A/trusted-firmware-a/pulls 269d39c2f38SGovindraj Raja 2702d8c2870SChris PalmerPlaybook for new releases 2712d8c2870SChris Palmer------------------------- 2722d8c2870SChris PalmerTo make a new minor release (e.g. 2.x.y → 2.x.y+1), follow these steps. 2732d8c2870SChris Palmer 2742d8c2870SChris Palmer#. Every Friday, LTS maintainers receive a triage report email (subject: “TF-A 2752d8c2870SChris Palmer LTS Triage report”) that contains attached CSV files, 1 per 2762d8c2870SChris Palmer currently-supported LTS major release branch (e.g. lts-2.8, lts-2.10, 2772d8c2870SChris Palmer lts-2.12, etc.). It contains a list of patches to be cherry-picked into a new 2782d8c2870SChris Palmer minor release of each supported LTS branch. 2792d8c2870SChris Palmer#. Run ``git fetch origin``. 2802d8c2870SChris Palmer#. Run ``git checkout -b lts-v2.x.y+1 --track origin/lts-v2.x``. 2812d8c2870SChris Palmer#. Run ``git log`` and verify that the most recent commit is the changelog for 2822d8c2870SChris Palmer the v2.x.y release, and that it has the origin/lts-v2.x tag. 2832d8c2870SChris Palmer#. For the version 2.x for which you want to create a new release, open its CSV 2842d8c2870SChris Palmer file. For each patch listed, **from the bottom to the top**, run ``git 2852d8c2870SChris Palmer cherry-pick -x sha1-hash``. 2862d8c2870SChris Palmer#. Some of the patches of this list may not be taken, mainly due to false 2872d8c2870SChris Palmer positive. If in doubt, that can be discussed either in the “tf-a-lts” channel 2888b1d4a24SYann Gautier on Discord or during the LTS weekly meeting. 2898b1d4a24SYann Gautier#. Some dependency patches, not listed in the CSV file, may have to be taken, to ease the 2908b1d4a24SYann Gautier application of the LTS patches. This can also be discussed with the other LTS maintainers. 291*532350d2SYann Gautier#. Run ``git remote add dependabot https://github.com/TrustedFirmware-A/trusted-firmware-a.git`` 292*532350d2SYann Gautier (This has to be done only once). 293*532350d2SYann Gautier#. Run ``git fetch dependabot``. 294*532350d2SYann Gautier#. Cherry-pick the dependabot patches dedicated to the given LTS. Those patches should be amended 295*532350d2SYann Gautier to add a gerrit Change ID. 2962d8c2870SChris Palmer#. Push the stack of changes: ``git push origin 2972d8c2870SChris Palmer HEAD:refs/for/lts-v2.x%topic=for-lts-v2.x.y+1``. You might need the 2982d8c2870SChris Palmer ``--no-verify`` option: ``git push origin --no-verify 2992d8c2870SChris Palmer HEAD:refs/for/lts-v2.x%topic=for-lts-v2.x.y+1``. 3002d8c2870SChris Palmer#. The AllowCI+2 job runs automatically on each LTS branch once a new 3012d8c2870SChris Palmer cherry-picked patch/patch-stack is pushed to the corresponding branch. If 3022d8c2870SChris Palmer this CI run passes, it automatically applies the Verified+1 (V+1) label to 3032d8c2870SChris Palmer the patch/all patches in the stack. The other LTS maintainers will provide 3042d8c2870SChris Palmer MR+1 and COR+1 votes. If the CI is OK and votes V+1, and if the 3052d8c2870SChris Palmer Maintainer-Review+1 (MR+1), Code-Owner-Review+1 (COR+1), and V+1 votes are 3062d8c2870SChris Palmer present, Gerrit will automatically merge the patch. LTS maintainers will then 3072d8c2870SChris Palmer trigger a Jenkins job that will take care of the release (tag, mail, and 3082d8c2870SChris Palmer readthedocs update). 3098b1d4a24SYann Gautier#. Some features may also require updates in other repositories (tf-a-ci-scripts, 3108b1d4a24SYann Gautier tf-a-job-configs or tf-a-tests...). For tf-a-job-configs, there are no LTS branches, but 3118b1d4a24SYann Gautier dedicated scripts for each LTS version which have to be updated manually. This is the case 3128b1d4a24SYann Gautier for e.g. MbedTLS updates. For tf-a-ci-scripts and tf-a-tests, there are LTS branches and patches 3138b1d4a24SYann Gautier will be cherry-picked from master branch to the LTS branch the same way it is done for TF-A. 3148b1d4a24SYann Gautier There is no automation for those repositories. So the patches will have to be merged manually, 3158b1d4a24SYann Gautier and for tf-a-ci-scripts and tf-a-tests, tags will also have to be set manually. 3162d8c2870SChris Palmer 317d39c2f38SGovindraj RajaExecution Plan 318d39c2f38SGovindraj Raja************** 319d39c2f38SGovindraj RajaThis section lists the steps needed to put the LTS system in place. However, 320d39c2f38SGovindraj Rajato kick start LTS in Nov ‘22, only a few steps are needed. The rest can follow 321d39c2f38SGovindraj Rajain the background. 322d39c2f38SGovindraj Raja 323d39c2f38SGovindraj RajaInitial release steps 324d39c2f38SGovindraj Raja********************* 325d39c2f38SGovindraj Raja 326d39c2f38SGovindraj RajaThe following steps are necessary to kickstart the project and potentially 327d39c2f38SGovindraj Rajacreate the first LTS from the Nov’22 release. 328d39c2f38SGovindraj Raja 329d39c2f38SGovindraj Raja#. Create a TF-A LTS release-candidate branch and a TFTF LTS branch immediately 330d39c2f38SGovindraj Raja after the Nov’22 release 331d39c2f38SGovindraj Raja#. Request all platform-owners to test and debug the RC branch 332d39c2f38SGovindraj Raja#. Gather feedback from the test and debug cycle 333d39c2f38SGovindraj Raja#. Mark the TF-A LTS branch ready by the end of January 334d39c2f38SGovindraj Raja#. Announce the official LTS release availability on the mailing lists 335d39c2f38SGovindraj Raja 336d39c2f38SGovindraj RajaLong term release plan 337d39c2f38SGovindraj Raja********************** 338d39c2f38SGovindraj RajaAbove will buy us time to then work on the rest of the execution plan which 339d39c2f38SGovindraj Rajais given below. 340d39c2f38SGovindraj Raja 341d39c2f38SGovindraj Raja#. The review criteria for LTS patches must be the same as TF-A patches 342d39c2f38SGovindraj Raja#. The maintainers shall publish the well-defined merge criteria to allow 343d39c2f38SGovindraj Raja the community to choose candidate patches 344d39c2f38SGovindraj Raja#. The maintainers shall publish a well-defined test specification for any 345d39c2f38SGovindraj Raja patch entering the LTS branch 346d39c2f38SGovindraj Raja 347d39c2f38SGovindraj Raja a. Tests required to pass in the CI/CD flow 348d39c2f38SGovindraj Raja b. Static analysis scans 349d39c2f38SGovindraj Raja c. Coverity scans 350d39c2f38SGovindraj Raja 351d39c2f38SGovindraj Raja#. The maintainers shall publish a mechanism to choose candidate patches for 352d39c2f38SGovindraj Raja the LTS branch 353d39c2f38SGovindraj Raja#. The maintainers shall publish a mechanism to report bugs `[1]`_ seen with 354d39c2f38SGovindraj Raja an LTS branch 355d39c2f38SGovindraj Raja#. The maintainers shall publish a versioning mechanism for the LTS branch 356d39c2f38SGovindraj Raja 357faa8c656SGovindraj Raja a. Bump minor version for any “logical” `[2]`_ fix(es) that gets merged 358d39c2f38SGovindraj Raja 359d39c2f38SGovindraj Raja#. The CI/CD infrastructure shall provide test support for all “live” LTS 360d39c2f38SGovindraj Raja branches at any given point in time 361d39c2f38SGovindraj Raja#. The CI/CD infrastructure shall provide means to 362d39c2f38SGovindraj Raja 363d39c2f38SGovindraj Raja a. notify all maintainers that a patch is ready for review 364d39c2f38SGovindraj Raja b. automatically cherry-pick a patch to a given LTS branch 365d39c2f38SGovindraj Raja c. get it through the CI/CD testing flow 366faa8c656SGovindraj Raja d. gentle ping in LTS discord channel asking for reviews to ensure 367faa8c656SGovindraj Raja cherry-picks are merged. 368d39c2f38SGovindraj Raja 369d39c2f38SGovindraj RajaFAQ 370d39c2f38SGovindraj Raja*** 371d39c2f38SGovindraj Raja 372d39c2f38SGovindraj RajaIn our discussions, in addition to the above points we also considered some 373d39c2f38SGovindraj Rajaquestions. They have been discussed on the mailing list too. 374d39c2f38SGovindraj Raja 375d39c2f38SGovindraj Raja| Q. What happens when a bug fix applies just to a LTS branch and not to the 376d39c2f38SGovindraj Raja master branch? 377d39c2f38SGovindraj Raja| A. This will be treated as a special case and the bug, and the fix will be 378d39c2f38SGovindraj Raja discussed 379d39c2f38SGovindraj Raja 380d39c2f38SGovindraj Raja| Q. When testing a backported patch, what if one of the partners needs more 381d39c2f38SGovindraj Raja time while the patch fix is time-critical and, hence slowing other 382d39c2f38SGovindraj Raja partners? 383d39c2f38SGovindraj Raja| A. The maintainers will add more detail to the review and merge process to 384d39c2f38SGovindraj Raja handle this scenario. 385d39c2f38SGovindraj Raja 386d39c2f38SGovindraj Raja| Q. How do we handle the increasing version numbers for errata fixes? 387d39c2f38SGovindraj Raja| A. Too many CPU errata workarounds resulting in too many LTS releases. 388d39c2f38SGovindraj Raja We propose bumping the version number for each logical fix as 389d39c2f38SGovindraj Raja described in the section “Long term release plan” above because 390d39c2f38SGovindraj Raja that will help accurately track what changes have been deployed in-field. 391d39c2f38SGovindraj Raja 392d39c2f38SGovindraj Raja| Q. What if LTS support duration needs to be extended to longer than 5 years? 393d39c2f38SGovindraj Raja| A. Still under discussion. 394d39c2f38SGovindraj Raja 395d39c2f38SGovindraj RajaThese are uncharted waters, and we will face some unseen problems. When they 396d39c2f38SGovindraj Rajabecome real problems, then we will have concrete data and be better able to 397d39c2f38SGovindraj Rajaaddress them. This means that our LTS definition as presented in this document 398d39c2f38SGovindraj Rajais not the final one. We will constantly be discussing it and deciding how to 399d39c2f38SGovindraj Rajaadapt it as we see practical problems. 400d39c2f38SGovindraj Raja 401d39c2f38SGovindraj Raja.. _[1]: 402d39c2f38SGovindraj Raja 403d39c2f38SGovindraj Raja[1] The plan is to create a system where reviewers can tag a patch on mainline which 404d39c2f38SGovindraj Rajagets automatically rebased on LTS and pushed to Gerrit. On seeing this patch, 405d39c2f38SGovindraj Rajathe CI/CD starts tests and provides a score. In parallel, the system also sends 406d39c2f38SGovindraj Rajaan email to the maintainers announcing the arrival of a candidate patch for the 407d39c2f38SGovindraj RajaLTS branch. 408d39c2f38SGovindraj Raja 409d39c2f38SGovindraj Raja.. _[2]: 410d39c2f38SGovindraj Raja 411d39c2f38SGovindraj Raja[2] Logical will be a patch or patches implementing a certain fix. For example, if a 412d39c2f38SGovindraj Rajasecurity mitigation is fixed with the help of three patches, then all of them are 413d39c2f38SGovindraj Rajaconsidered as one "logical" fix. The version is incremented only after all these 414d39c2f38SGovindraj Rajapatches are merged. with the maintainers. If agreed unanimously, the bug fix 415d39c2f38SGovindraj Rajawill be merged to the affected LTS branches after completing the review process. 416