xref: /openbmc/libpldm/CHANGELOG.md (revision 453dfff3)
1# Changelog
2
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6and this project adheres to
7[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
9Change categories:
10
11- Added
12- Changed
13- Deprecated
14- Removed
15- Fixed
16- Security
17
18## [Unreleased]
19
20### Removed
21
221. Deprecated functions with the `_check` suffix
23
24   - `pldm_bios_table_append_pad_checksum_check()`
25   - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
26   - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
27   - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
28   - `pldm_bios_table_attr_entry_enum_encode_check()`
29   - `pldm_bios_table_attr_entry_integer_encode_check()`
30   - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
31   - `pldm_bios_table_attr_entry_string_encode_check()`
32   - `pldm_bios_table_attr_value_entry_encode_enum_check()`
33   - `pldm_bios_table_attr_value_entry_encode_integer_check()`
34   - `pldm_bios_table_attr_value_entry_encode_string_check()`
35   - `pldm_bios_table_string_entry_decode_string_check()`
36   - `pldm_bios_table_string_entry_encode_check()`
37   - `pldm_entity_association_pdr_add_check()`
38   - `pldm_entity_association_pdr_add_from_node_check()`
39   - `pldm_pdr_add_check()`
40   - `pldm_pdr_add_fru_record_set_check()`
41
42## [0.9.1] - 2024-09-07
43
44### Changed
45
461. Moved evolutions intended for v0.9.0 into place
47
48   Evolutions for the release have been moved from `evolutions/current` to
49   `evolutions/v0.9.1`. Library users can apply them to migrate off of
50   deprecated APIs.
51
52## [0.9.0] - 2024-09-07
53
54### Added
55
561. base: Define macros for reserved TIDs
572. pdr: Add pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
583. pdr: Add pldm_entity_association_pdr_create_new()
594. platform: Define macros for the responded transferflags
605. pdr: Add pldm_pdr_get_terminus_handle() API
616. pdr: Add related decode_entity_auxiliary_names_pdr() APIs
627. fw_update: Add encode req & decode resp for get_downstream_fw_params
638. platform: Add decode_pldm_platform_cper_event() API
649. decode_get_pdr_repository_info_resp_safe()
65
66   Replaces decode_get_pdr_repository_info_resp() as discussed in the
67   `Deprecated` section below
68
6910. decode_get_pdr_resp_safe()
70
71    Replaces decode_get_pdr_resp() as discussed in the `Deprecated` section
72    below
73
74### Changed
75
761. pdr: Stabilise related decode_entity_auxiliary_names_pdr() APIs
772. platform: Rework decode/encode_pldm_message_poll_event_data() APIs
783. platform: Stabilise decode_pldm_message_poll_event_data() APIs
794. ABI break for decode_sensor_op_data()
80
81   Applying LIBPLDM_CC_NONNULL to the internal msgbuf APIs caused
82   abi-compliance-checker to flag a change in the register containing the
83   parameter `previous_op_state`.
84
855. platform: Stabilise decode_pldm_platform_cper_event() API
86
87### Deprecated
88
891. Rename and deprecate functions with the `_check` suffix
90
91   All library function return values always need to be checked. The `_check`
92   suffix is redundant, so remove it. Migration to the non-deprecated
93   equivalents without the `_check` suffix can be performed using
94   `scripts/ apply-renames` and the [clang-rename][] configurations under
95   `evolutions/`
96
97   The deprecated functions:
98
99   - `get_fru_record_by_option_check()`
100   - `pldm_bios_table_append_pad_checksum_check()`
101   - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
102   - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
103   - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
104   - `pldm_bios_table_attr_entry_enum_encode_check()`
105   - `pldm_bios_table_attr_entry_integer_encode_check()`
106   - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
107   - `pldm_bios_table_attr_entry_string_encode_check()`
108   - `pldm_bios_table_attr_value_entry_encode_enum_check()`
109   - `pldm_bios_table_attr_value_entry_encode_integer_check()`
110   - `pldm_bios_table_attr_value_entry_encode_string_check()`
111   - `pldm_bios_table_string_entry_decode_string_check()`
112   - `pldm_bios_table_string_entry_encode_check()`
113   - `pldm_entity_association_pdr_add_check()`
114   - `pldm_entity_association_pdr_add_from_node_check()`
115   - `pldm_pdr_add_check()`
116   - `pldm_pdr_add_fru_record_set_check()`
117
118[clang-rename]: https://clang.llvm.org/extra/clang-rename.html
119
1202. `decode_get_pdr_repository_info_resp()`
121
122   Users should move to `decode_get_pdr_repository_info_resp_safe()` which
123   eliminates the opportunity for buffer overruns when extracting objects from
124   the message.
125
1263. `decode_get_pdr_resp()`
127
128   Users should move to `decode_get_pdr_resp_safe()` which reduces the
129   invocation tedium and improves memory safety over `decode_get_pdr_resp()`.
130
131### Removed
132
1331. IBM OEM header compatibility symlinks.
134
135   Anyone left using the deprecated paths can migrate using the coccinelle patch
136   at `evolutions/current/oem-ibm-header-compat.cocci`.
137
138### Fixed
139
1401. requester: instance-id: Release read lock on conflict
141
142## [0.8.0] - 2024-05-23
143
144### Added
145
1461. base: Provide pldm_msg_hdr_correlate_response()
1472. transport: af-mctp: Add pldm_transport_af_mctp_bind()
1483. oem: ibm: Add chapdata file type support
1494. base: Added PLDM_SMBIOS & PLDM_RDE message types
1505. oem: meta: Add decode_oem_meta_file_io_req()
1516. state-set: Add all state set values to system power state enum as per DSP0249
1527. platform: Add alias members to the enum
153   pldm_pdr_repository_chg_event_change_record_event_data_operation.
154
155   enum constants with inconsistent names are deprecated with this change.
156   remove old inconsistent enum members after backward compatibility cleanup is
157   done
158
1598. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
1609. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
16110. platform: Add 3 PDR type enum for Redfish Device Enablement per
162    DSP0248_1.2.0
16311. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
16412. entity: Add enum for Network Interface Connectors and Network Ports
165    Connection Types
16613. pdr: Add decode_numeric_effecter_pdr_data()
16714. oem: ibm: Support for the Real SAI entity id
16815. fw_update: Add encode req & decode resp for query_downstream_devices
16916. fw_update: Add encode req & decode resp for query_downstream_identifiers
17017. platform: Add support for GetStateEffecterStates command
171
172### Changed
173
1741. base: Stabilise pldm_msg_hdr_correlate_response()
1752. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
1763. libpldm: Fix header use
1774. libpldm: More fixes for header use
1785. pdr: Stabilise pldm_pdr_find_last_in_range() API
1796. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
1807. oem: meta: stabilise decode_oem_meta_file_io_req()
1818. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
182
183### Deprecated
184
1851. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
186   with `PLDM_OEM_IBM_`
187
188### Fixed
189
1901. libpldm: Rationalise the local and installed path of pldm.h
1912. pdr: Assign record_handle in entity_association_pdr_add_children()
1923. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
1934. pdr: Remove redundant constant for minimum numeric sensor PDR length
1945. tests: oem: meta: Fix fileio use of msgbuf
195
196## [0.7.0] - 2023-08-29
197
198### Added
199
2001. state-set: Add new enum for Operational Fault Status enum
201
202### Changed
203
2041. transport: Match specified metadata in pldm_transport_send_recv_msg()
2052. transport: mctp-demux: Drop ABI annotation for internal symbols
2063. transport: Stabilise core transport and implementation APIs
207
208   This stabilisation covers the following headers and functions:
209
210   - libpldm/transport.h
211
212     - pldm_transport_poll()
213     - pldm_transport_send_msg()
214     - pldm_transport_recv_msg()
215     - pldm_transport_send_recv_msg()
216
217   - libpldm/transport/af-mctp.h
218
219     - pldm_transport_af_mctp_init()
220     - pldm_transport_af_mctp_destroy()
221     - pldm_transport_af_mctp_core()
222     - pldm_transport_af_mctp_init_pollfd()
223     - pldm_transport_af_mctp_map_tid()
224     - pldm_transport_af_mctp_unmap_tid()
225
226   - libpldm/transport/mctp-demux.h
227     - pldm_transport_mctp_demux_init()
228     - pldm_transport_mctp_demux_destroy()
229     - pldm_transport_mctp_demux_core()
230     - pldm_transport_mctp_demux_init_pollfd()
231     - pldm_transport_mctp_demux_map_tid()
232     - pldm_transport_mctp_demux_unmap_tid()
233
234### Deprecated
235
2361. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
237   `libpldm/requester/pldm.h`):
238
239   - pldm_open()
240   - pldm_send_recv()
241   - pldm_send()
242   - pldm_recv()
243   - pldm_recv_any()
244   - pldm_close()
245
246   Users should migrate to the newer "transport" APIs instead.
247
248## Fixed
249
2501. tests: Exclude transport tests when build excludes testing ABIs
2512. abi: Capture deprecation of pldm_close()
252
253## [0.6.0] - 2023-08-22
254
255### Changed
256
2571. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
2582. meson: Apply `b_ndebug=if-release` by default
2593. pdr : Stabilize pldm_entity_association_tree_add_entity()
2604. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
2615. pdr: Stabilize pldm_entity_node_get_remote_container_id()
2626. transport: af-mctp: Assign out-params on success in \*\_recv()
2637. transport: Generalise the pldm_transport_recv_msg() API
264
265### Removed
266
2671. pdr: Remove pldm_entity_association_pdr_add()
2682. state-set: Remove enum pldm_state_set_operational_fault_status_values
269
270### Fixed
271
2721. transport: register init_pollfd callback for af-mctp
2732. transport: fix init_pollfd function parameter
2743. transport: Fix doxygen and variables for send and recv functions
2754. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
276
277## [0.5.0] - 2023-08-09
278
279### Added
280
2811. pdr: Introduce pldm_entity_association_pdr_add_check()
282
283### Changed
284
2851. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
2862. transport: pldm_transport_poll(): Adjust return value semantics
2873. transport: free un-wanted responses in pldm_transport_send_recv_msg()
288
289### Deprecated
290
2911. state-set: Enum pldm_state_set_operational_fault_status_values
292
293   The enum operational_fault_status is defined with wrong members and will
294   eventually be replaced with the correct members. Any uses of
295   pldm_state_set_operational_fault_status_values members should move to
296   equivalent pldm_state_set_operational_stress_status_values members if needed.
297
2982. platform: Struct field name in fru_record_set PDR
299
300   References to entity_instance_num should be changed to entity_instance
301
3023. platform: Struct field name in numeric sensor value PDR
303
304   References to entity_instance_num should be changed to entity_instance
305
306### Removed
307
3081. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
3092. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
3103. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
3114. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
3125. bios_table: Remove pldm_bios_table_append_pad_checksum()
3136. fru: Remove get_fru_record_by_option()
3147. pdr: Make is_present() static
3158. pdr: Remove pldm_pdr_add()
3169. pdr: Remove pldm_pdr_add_fru_record_set()
31710. pdr: Remove pldm_entity_association_pdr_add_from_node()
31811. pdr: Make find_entity_ref_in_tree() static
31912. pdr: Make entity_association_tree_find() static
320
321### Fixed
322
3231. requester: Fix response buffer cast in pldm_send_recv()
3242. pdr: Hoist record handle overflow test to avoid memory leak
3253. transport: Correct comparison in while loop condition
326
327## [0.4.0] - 2023-07-14
328
329### Added
330
3311. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
3322. fru: Introduce get_fru_record_by_option_check()
3333. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
3344. pdr: Introduce pldm_pdr_add_check()
3355. pdr: Introduce pldm_pdr_add_fru_record_set_check()
336
337### Changed
338
3391. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
3402. requester: Expose pldm_close() in header
3413. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
3424. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
3435. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
3446. pdr: pldm_pdr_init(): Return NULL on allocation failure
3457. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
3468. pdr: Document preconditions for trivial accessor functions
347
348   A trivial accessor function is one that exposes properties of an object in a
349   way can't result in an error, beyond passing an invalid argument to the
350   function. For APIs meeting this definition we define a precondition that
351   struct pointers must point to valid objects to avoid polluting the function
352   prototypes. The following APIs now have this precondition explicitly defined:
353
354   - pldm_entity_extract()
355   - pldm_entity_get_parent()
356   - pldm_entity_is_exist_parent()
357   - pldm_entity_is_node_parent()
358   - pldm_is_current_parent_child
359   - pldm_is_empty_entity_assoc_tree()
360   - pldm_pdr_get_record_count()
361   - pldm_pdr_get_record_handle()
362   - pldm_pdr_get_repo_size()
363   - pldm_pdr_record_is_remote()
364
3659. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
36610. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
36711. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
36812. pdr: pldm_entity_association_tree_visit(): Document preconditions
36913. pdr: pldm_entity_association_tree_visit(): Exit early on failure
37014. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
37115. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
37216. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
37317. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
37418. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
37519. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
37620. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
37721. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
37822. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
37923. pdr: pldm_entity_get_num_children(): Don't return invalid values
38024. libpldm: Lift or remove asserts where a subsequent check exists
381
382### Deprecated
383
3841. pldm_bios_table_attr_entry_integer_encode()
385
386   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
387
3882. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
389
390   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
391
3923. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
393
394   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
395
3964. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
397
398   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
399
4005. pdr: Deprecate is_present()
401
402   There should be no users of this symbol. If you are a user, you should figure
403   out how to stop, or get in touch. This symbol will be marked static the
404   release after deprecation.
405
4066. pdr: Deprecate find_entity_ref_in_tree()
407
408   There should be no users of this symbol. If you are a user, you should figure
409   out how to stop, or get in touch. This symbol will be marked static the
410   release after deprecation.
411
4127. pdr: Deprecate entity_association_tree_find()
413
414   There should be no users of this symbol. If you are a user, you should figure
415   out how to stop, or get in touch. This symbol will be marked static the
416   release after deprecation.
417
4188. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
419
420   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
421   pldm_bios_table_append_pad_checksum() should migrate to
422   pldm_bios_table_append_pad_checksum_check()
423
4249. fru: Stabilise get_fru_record_by_option_check()
425
426   get_fru_record_by_option() is deprecated by this change. Users of
427   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
428
42910. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
430
431    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
432    Users of pldm_entity_association_pdr_add_from_node() should migrate to
433    pldm_entity_association_pdr_add_from_node_check()
434
43511. pdr: Stabilise pldm_pdr_add_check()
436
437    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
438    migrate to pldm_pdr_add_check()
439
44012. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
441
442    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
443    pldm_pdr_add_fru_record_set() should migrate to
444    pldm_pdr_add_fru_record_set_check()
445
446### Removed
447
4481. bios_table: Remove deprecated APIs sanitized by assert():
449
450   - pldm_bios_table_string_entry_encode()
451   - pldm_bios_table_string_entry_decode_string()
452   - pldm_bios_table_attr_entry_enum_encode()
453   - pldm_bios_table_attr_entry_enum_decode_pv_num()
454   - pldm_bios_table_attr_entry_enum_decode_def_num()
455   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
456   - pldm_bios_table_attr_entry_string_encode()
457   - pldm_bios_table_attr_entry_string_decode_def_string_length()
458
459### Fixed
460
4611. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
4622. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
4633. transport: mctp-demux: Don't test socket for non-zero value
4644. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
4655. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
4666. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
4677. abi: Update to remove pldm_close() from reference dumps
4688. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
469
470## [0.3.0] - 2023-06-23
471
472### Added
473
4741. Add encode/decode pldmMessagePollEvent data
4752. README: Add a section on working with libpldm
4763. pdr: Introduce remote_container_id and associated APIs
4774. pdr: Add APIs for creating and locating remote PDRs
4785. pdr: Add pldm_pdr_find_last_in_range()
4796. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
4807. pdr: Add pldm_pdr_find_container_id_range_exclude()
481
482### Changed
483
4841. include: Move installed transport.h under libpldm/
4852. libpldm: Explicit deprecated, stable and testing ABI classes
4863. meson: Reduce strength of oem-ibm requirements from enabled to allowed
487
488   The `oem-ibm` feature is now enabled by the default meson configuration, for
489   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
490   recipe:
491
492   <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10>
493
494   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
495   when invoking `meson setup`
496
4974. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
4985. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
499
500### Deprecated
501
5021. bios_table: Deprecate APIs with arguments sanitized using assert()
503
504   C provides enough foot-guns without us encoding them into library APIs.
505   Specifically, deprecate the following in favour of their `*_check()` variants
506   which ensure assertions won't fail or otherwise invoke UB:
507
508   - pldm_bios_table_string_entry_encode()
509   - pldm_bios_table_string_entry_decode_string()
510   - pldm_bios_table_attr_entry_enum_encode()
511   - pldm_bios_table_attr_entry_enum_decode_pv_num()
512   - pldm_bios_table_attr_entry_enum_decode_def_num()
513   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
514   - pldm_bios_table_attr_entry_string_encode()
515   - pldm_bios_table_attr_entry_string_decode_def_string_length()
516
517### Removed
518
5191. libpldm: Remove the requester-api option
520
521### Fixed
522
5231. requester: Make pldm_open() return existing fd
5242. transport: Prevent sticking in waiting for response
5253. transport: Match on response in pldm_transport_send_recv_msg()
5264. requester: Add check before accessing hdr in pldm_recv()
5275. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
528