blob: 5aa32a215040dcc03177270138a7bde3e80ca98b [file] [log] [blame]
Govindraj Rajaae67fb42024-12-12 17:16:03 -06001LTS - Long-Term Support
2=======================
3
4.. table:: Table 1: Document History
5
6 +-------------+--------------------+-------------------------------------------------------+
7 | Date | Author | Description |
8 +=============+====================+=======================================================+
9 | 2022-07-20 | Okash Khawaja, | Initial draft. |
10 | | Varun Wadekar | |
11 +-------------+--------------------+-------------------------------------------------------+
12 | 2022-07-21 | Varun Wadekar | Refine the Maintainership guidelines and planning |
13 | | | sections. Introduce a new section documenting a day |
14 | | | in the life of a LTS branch maintainer |
15 +-------------+--------------------+-------------------------------------------------------+
16 | 2022-08-05 | Okash Khawaja, | Merge two drafts (draft 1 and 2), address comments |
17 | | Varun Wadekar | made by both authors, cosmetic changes to the content |
18 | | | all over the document |
19 +-------------+--------------------+-------------------------------------------------------+
20 | 2022-08-05 | Okash Khawaja | Add note about testing support available from TF.org |
21 +-------------+--------------------+-------------------------------------------------------+
22 | 2022-08-05 | Varun Wadekar | Changed the “Future plans” section to “FAQ” and |
23 | | | answered some of the questions with feedback from |
24 | | | the community. |
25 +-------------+--------------------+-------------------------------------------------------+
Govindraj Raja8f88d032025-01-08 18:44:38 -060026 | 2025-01-07 | Govindraj Raja | Convert from pdf to rst. |
27 +-------------+--------------------+-------------------------------------------------------+
28 | 2025-01-07 | Govindraj Raja | Updates based on learnings and suggestions. |
Govindraj Rajaae67fb42024-12-12 17:16:03 -060029 +-------------+--------------------+-------------------------------------------------------+
Chris Palmeraa285df2025-03-27 12:08:21 -070030 | 2025-03-27 | Chris Palmer | Playbook for making a new release. |
31 +-------------+--------------------+-------------------------------------------------------+
Govindraj Rajaae67fb42024-12-12 17:16:03 -060032
33This document proposes a plan for long-term support (LTS) of the |TF-A| project.
34
35Why is LTS required?
36--------------------
37LTS is needed for commercial reasons. More specifically, on the device side,
38when a product is released, the companies have to support that in-market product
39such that the amount of changes to the firmware are kept to a minimum to avoid
40the risk of regression. At the same time the companies don't want to exclude
41critical patches such as those for security advisories. Similarly on the server side,
42companies want to minimize the churn when deploying fixes during incident
43response, e.g. due to critical security bugs.
44
Govindraj Raja8f88d032025-01-08 18:44:38 -060045Also, the European Cyber Resilience Act (CRA) is a new EU legislation that mandates
46cybersecurity standards for products containing digital elements, aiming to
47protect consumers and businesses by ensuring manufacturers build security into
48their hardware and software throughout their lifecycle, including automatic
49updates and incident reporting; essentially requiring all digital products
50sold in the EU to meet specific cybersecurity requirements.
51
52This means that companies have to maintain and backport critical updates to
Govindraj Rajaae67fb42024-12-12 17:16:03 -060053old branches internally. As this effort is duplicated across different companies
54using TF-A, it makes sense to factor out this effort into a community-wide LTS.
55
56What does LTS mean for TF-A?
57----------------------------
58In this section we will define exactly what constitutes LTS for TF-A.
59Specifically, we will define the following characteristics:
60
61- criteria for selecting patches which will be backported to LTS branches
62- lifetime and frequency of LTS branches
63
64**Criteria**
65
66We must have an objective criterion for selecting patches to be backported to
67LTS branches. This will make maintenance easy because:
68
69a. there will be less -- ideally no -- discussion when selecting patches to backport
70b. large parts of the process can be automated
71
72Below is the criteria
73
74#. No features will be backported.
75#. Security advisories: Any patch that makes it into :ref:`Security Advisories`
76 is automatically selected for back porting. This includes patches to external
77 components too, e.g. libfdt.
78#. Workarounds for CPU and other ARM IP errata
79#. Workarounds for non-ARM IP errata, e.g. TI UART
80#. Fixes for platform bugs. These patches must not modify any code outside of
81 the specific platform that the fix applies to.
82#. Patches can only be backported from the master branch. In other words, the
83 master branch will be a superset of all the changes in any LTS branch.
84
85**Lifetime and frequency**
86
87This section approaches three questions: for how long should an LTS release be
88supported, how frequently should LTS releases be made and at which time(s) of
89the year should the releases be made.
90
911. For how long should an LTS release be supported?
92
Govindraj Raja8f88d032025-01-08 18:44:38 -060093The Linux kernel maintainers supports an LTS branch for 2 years. Since firmware
94tends to have less churn and longer lifetime than a HLOS, TF-A is trying to
95support at-least 7 years for its LTS. Initially it was intended to support
965 years but there has been no objections to extend LTS support to 7 years.
97There are many challenges that may influence the 7 year support from CI
98infrastructure to availability of maintainers.
Govindraj Rajaae67fb42024-12-12 17:16:03 -060099
1002. How frequently should LTS releases be made?
101
102Given that many products that have a release cycle, have a yearly release
103cycle, it would make sense to have yearly TF-A releases.
104
1053. Which time(s) of the year should the releases be made?
106
107TF-A releases are cut twice a year: May and November. Basing LTS release
108on the November TF-A release has a few benefits. First, it aligns with Linux
109LTS releases which happen towards the end of each year. Second, it aligns
110with Android releases which tend to fall in Q3 each year. Since product
111releases are timed with Android release, this gives enough time to harden
112the TF-A LTS release during development so that it's ready for launch in
113Q3 following year. On the other hand, if the May release of TF-A is chosen as
114the basis for LTS then developers will have little time -- about a month,
115taking into account the test-and-debug phase before LTS is cut (see below) --
116before Android release.
117
118To summarize, there will be one LTS release per year. It will be supported for
1195 years and we can discuss extending it to 7 years later on. The LTS release
120will be based on the November release of TF-A.
121
122**Testing Criteria**
123
124Every patch merged to the LTS branch will complete the following tests before
125getting approved.
126
127#. TFTF tests currently running in the testing farm
128#. CI/CD static analysis scans
129#. Coverity scans
130#. Platform tests
131
132Platforms that are not maintained upstream will undergo testing downstream in a
133pre-defined window. The platform maintainer will complete the testing and provide
134a verified score on the patch once testing is completed.
135
136** A note about test coverage from TF.org **
137
138Currently TF.org maintains a CI system to run TF-A automated tests on a
139selection of HW boards donated by TF.org members (a benefit reserved to project
140members, see the project charter for more details). This automated test coverage
141will be extended to cover testing for LTS as well for boards that are part of
142the CI system.
143
Govindraj Raja8f88d032025-01-08 18:44:38 -0600144**TFTF Branching**
Govindraj Rajaae67fb42024-12-12 17:16:03 -0600145
146A note about testing here. After a patch is backported to an LTS branch, that
147branch will need to be regression tested. Since TFTF moves forward with latest
148TF-A changes, newer TFTF tests may not apply to old LTS branches. Therefore
149TFTF will also need to be branched, in-sync with TF-A LTS branches. In other
150words, there will be one TFTF LTS branch corresponding to each TF-A LTS branch.
151The TFTF LTS branch will be used to regression test the corresponding TF-A LTS
152branch.
153
154As we work with the LTS branch of TFTF, we might also need fixes for TFTF
155itself to be ported to LTS. However, decision-making about those patches need
156not be as stringent as for TF-A.
157
Govindraj Raja8f88d032025-01-08 18:44:38 -0600158**CI Scripts**
159
160CI Scripts moves forward with TF-A changes, since we need to checkout the
161corresponding release version of CI scripts for LTS.
162
163Though we are unlikely to update CI scripts, but time to time migrating a newer
164FVP version or deprecating certain tests due to unavailability of platforms may
165influence updates to CI Scripts.
166
167**Hafnium / OP-TEE**
168
169Both Hafnium and OP-TEE move forward with TF-A changes so we need to freeze their
170corresponding version from TF-A release for a LTS.
171
172**MbedTLS**
173
174Updates to the version of MbedTLS used with LTS will happen time to time based on
175maintainers call to update them or not.
176
Govindraj Rajaae67fb42024-12-12 17:16:03 -0600177Release details
178---------------
179This section goes into details of what the LTS release process will look like.
180
181
182**Test-and-debug period**
183
184Since the LTS branch will be used in product releases, it is expected that more
185testing and debugging will be done on the November release of TF-A. Therefore
186it would make sense to leave at least a month after the November release and
187then cut the LTS branch. We recommend two months, given that one of the months
188is December which tends to be slower due to holidays. So, an end-of-November
189TF-A release would result in a beginning-of-February LTS release. Note that
190the LTS branch will be created at the same time as the TF-A November release,
191but it will be officially released at the end of January or early February.
192Going forward we should strive to make the period smaller and smaller until
193ideally it coincides with TF-A November release which means that our test
194and CI/CD infra is good enough to allow that to happen.
195
196**Example timeline**
197
198Below is an example timeline starting from the November 2022 release of TF-A.
199
200.. image:: ../resources/diagrams/lts-timeline-example.png
201
202- Nov 2022: TF-A 2.8 is released towards the end of Nov, 2022. Not shown in the
203 diagram, at the same time LTS release candidate branch is made which is based
204 on TF-A 2.8. This means new features going in 2.8 won’t go in the LTS branch.
205 We can call it `LTS 2.8-rc`.
206- Feb 2023: After testing and debugging LTS 2.8-rc for a couple of months,
207 LTS 2.8.0 is officially released in early Feb 2023.
208- May 2023: TF-A 2.9 is released but since this is not an LTS branch it doesn’t
209 affect LTS.
210- Somewhere between May and Nov of 2023: A security advisory comes up and the
211 related patches go into TF-A master branch. Since these patches fall under
212 LTS criteria, they are backported to LTS 2.8.0 which results in LTS 2.8.1
213 being released. Note that here we don’t allow the extra testing and debugging
214 time that we had between Nov 2022 and early Feb 2023. This is because there
215 isn’t as much to test and debug as an annual LTS release has. Also companies
216 might want to deploy critical patches soon.
217- Nov 2023: TF-A 2.10 is released. Not shown in the diagram, at the same time
218 LTS 2.10-rc is made. It’s tested by partners for a couple of months.
219- Feb 2024: LTS 2.10.1 is released in early Feb. Now there are two LTS
220 branches: 2.8.1 and 2.10.1.
221
222Note that TFTF will follow similar branching model as TF-A LTS, i.e. there will
223be TFTF LTS 2.8.0 in Feb 2023, 2.8.1 (if new TFTF tests need to be added for
224the security advisory) when there is TF-A LTS 2.8.1 and so on.
225
226Maintainership
227--------------
228
229**Guidelines & Responsibilities**
230
231#. Maintainers shall be impartial and strive to work for the benefit of
232 the community
233#. Objective and well-defined merge criteria to avoid confusion and discussions
234 at random points in time when there is a "candidate" patch
235#. The maintainers shall explain the lifecycle of a patch to the community,
236 with a detailed description of the maximum time spent in each step
237#. Automate, automate, automate
238#. Reviewers should not focus too much on "what" and instead focus on "how"
239#. Constantly refine the merge criteria to include more partner use cases
240#. Ensure that all candidate patches flow from the main branch to all LTS branches
Govindraj Raja8f88d032025-01-08 18:44:38 -0600241#. Maintainers collaborate in the following discord channel -
242 https://discord.com/channels/1106321706588577904/1162029539761852436
243#. Maintainers discuss and provide updates about upcoming LTS releases in the above
244 mentioned discord channel.
Govindraj Rajaae67fb42024-12-12 17:16:03 -0600245
246**Options**
247
248These are some options in the order of preference.
249
250#. Current set of :ref:`lts maintainers` from tf.org(or hired contractor) take care of the LTS
251#. From the community, create a set of maintainers focused solely on the LTS branches
252
253A day in the life of a maintainer
254*********************************
255This section documents the daily tasks that a maintainer might perform to
256support the LTS program. It is expected that a maintainer follows clearly laid
257down steps and does not have to make policy level decisions for merge, testing,
258or candidate patch selection.
259
260#. Monitor the main branch to identify candidate patches for the LTS branches
Govindraj Raja8f88d032025-01-08 18:44:38 -0600261#. Monitor emails from LTS triage report to choose patches that should be
262 cherry-picked for LTS branches.
263#. Cherry-pick agreed patches to LTS branches co-ordinate review process and Monitor
264 CI results.
Govindraj Rajaae67fb42024-12-12 17:16:03 -0600265#. Monitor the mailing list for any LTS related issues
266#. Propose or solicit patches to the main branch and tag them as candidates for LTS
267
Chris Palmeraa285df2025-03-27 12:08:21 -0700268Playbook for new releases
269-------------------------
270To make a new minor release (e.g. 2.x.y → 2.x.y+1), follow these steps.
271
272#. Every Friday, LTS maintainers receive a triage report email (subject: “TF-A
273 LTS Triage report”) that contains attached CSV files, 1 per
274 currently-supported LTS major release branch (e.g. lts-2.8, lts-2.10,
275 lts-2.12, etc.). It contains a list of patches to be cherry-picked into a new
276 minor release of each supported LTS branch.
277#. Run ``git fetch origin``.
278#. Run ``git checkout -b lts-v2.x.y+1 --track origin/lts-v2.x``.
279#. Run ``git log`` and verify that the most recent commit is the changelog for
280 the v2.x.y release, and that it has the origin/lts-v2.x tag.
281#. For the version 2.x for which you want to create a new release, open its CSV
282 file. For each patch listed, **from the bottom to the top**, run ``git
283 cherry-pick -x sha1-hash``.
284#. Some of the patches of this list may not be taken, mainly due to false
285 positive. If in doubt, that can be discussed either in the “tf-a-lts” channel
286 on Discord or during the LTS weekly meeting. There could also be patches to
287 be taken in tf-a-ci-scripts or tf-a-tests.
288#. Push the stack of changes: ``git push origin
289 HEAD:refs/for/lts-v2.x%topic=for-lts-v2.x.y+1``. You might need the
290 ``--no-verify`` option: ``git push origin --no-verify
291 HEAD:refs/for/lts-v2.x%topic=for-lts-v2.x.y+1``.
292#. The AllowCI+2 job runs automatically on each LTS branch once a new
293 cherry-picked patch/patch-stack is pushed to the corresponding branch. If
294 this CI run passes, it automatically applies the Verified+1 (V+1) label to
295 the patch/all patches in the stack. The other LTS maintainers will provide
296 MR+1 and COR+1 votes. If the CI is OK and votes V+1, and if the
297 Maintainer-Review+1 (MR+1), Code-Owner-Review+1 (COR+1), and V+1 votes are
298 present, Gerrit will automatically merge the patch. LTS maintainers will then
299 trigger a Jenkins job that will take care of the release (tag, mail, and
300 readthedocs update).
301
Govindraj Rajaae67fb42024-12-12 17:16:03 -0600302Execution Plan
303**************
304This section lists the steps needed to put the LTS system in place. However,
305to kick start LTS in Nov ‘22, only a few steps are needed. The rest can follow
306in the background.
307
308Initial release steps
309*********************
310
311The following steps are necessary to kickstart the project and potentially
312create the first LTS from the Nov’22 release.
313
314#. Create a TF-A LTS release-candidate branch and a TFTF LTS branch immediately
315 after the Nov’22 release
316#. Request all platform-owners to test and debug the RC branch
317#. Gather feedback from the test and debug cycle
318#. Mark the TF-A LTS branch ready by the end of January
319#. Announce the official LTS release availability on the mailing lists
320
321Long term release plan
322**********************
323Above will buy us time to then work on the rest of the execution plan which
324is given below.
325
326#. The review criteria for LTS patches must be the same as TF-A patches
327#. The maintainers shall publish the well-defined merge criteria to allow
328 the community to choose candidate patches
329#. The maintainers shall publish a well-defined test specification for any
330 patch entering the LTS branch
331
332 a. Tests required to pass in the CI/CD flow
333 b. Static analysis scans
334 c. Coverity scans
335
336#. The maintainers shall publish a mechanism to choose candidate patches for
337 the LTS branch
338#. The maintainers shall publish a mechanism to report bugs `[1]`_ seen with
339 an LTS branch
340#. The maintainers shall publish a versioning mechanism for the LTS branch
341
Govindraj Raja8f88d032025-01-08 18:44:38 -0600342 a. Bump minor version for any “logical” `[2]`_ fix(es) that gets merged
Govindraj Rajaae67fb42024-12-12 17:16:03 -0600343
344#. The CI/CD infrastructure shall provide test support for all “live” LTS
345 branches at any given point in time
346#. The CI/CD infrastructure shall provide means to
347
348 a. notify all maintainers that a patch is ready for review
349 b. automatically cherry-pick a patch to a given LTS branch
350 c. get it through the CI/CD testing flow
Govindraj Raja8f88d032025-01-08 18:44:38 -0600351 d. gentle ping in LTS discord channel asking for reviews to ensure
352 cherry-picks are merged.
Govindraj Rajaae67fb42024-12-12 17:16:03 -0600353
354FAQ
355***
356
357In our discussions, in addition to the above points we also considered some
358questions. They have been discussed on the mailing list too.
359
360| Q. What happens when a bug fix applies just to a LTS branch and not to the
361 master branch?
362| A. This will be treated as a special case and the bug, and the fix will be
363 discussed
364
365| Q. When testing a backported patch, what if one of the partners needs more
366 time while the patch fix is time-critical and, hence slowing other
367 partners?
368| A. The maintainers will add more detail to the review and merge process to
369 handle this scenario.
370
371| Q. How do we handle the increasing version numbers for errata fixes?
372| A. Too many CPU errata workarounds resulting in too many LTS releases.
373 We propose bumping the version number for each logical fix as
374 described in the section “Long term release plan” above because
375 that will help accurately track what changes have been deployed in-field.
376
377| Q. What if LTS support duration needs to be extended to longer than 5 years?
378| A. Still under discussion.
379
380These are uncharted waters, and we will face some unseen problems. When they
381become real problems, then we will have concrete data and be better able to
382address them. This means that our LTS definition as presented in this document
383is not the final one. We will constantly be discussing it and deciding how to
384adapt it as we see practical problems.
385
386.. _[1]:
387
388[1] The plan is to create a system where reviewers can tag a patch on mainline which
389gets automatically rebased on LTS and pushed to Gerrit. On seeing this patch,
390the CI/CD starts tests and provides a score. In parallel, the system also sends
391an email to the maintainers announcing the arrival of a candidate patch for the
392LTS branch.
393
394.. _[2]:
395
396[2] Logical will be a patch or patches implementing a certain fix. For example, if a
397security mitigation is fixed with the help of three patches, then all of them are
398considered as one "logical" fix. The version is incremented only after all these
399patches are merged. with the maintainers. If agreed unanimously, the bug fix
400will be merged to the affected LTS branches after completing the review process.