xref: /openbmc/libpldm/CHANGELOG.md (revision 5f288563)
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
33## [0.9.1] - 2024-09-07
34
35### Changed
36
371. Moved evolutions intended for v0.9.0 into place
38
39   Evolutions for the release have been moved from `evolutions/current` to
40   `evolutions/v0.9.1`. Library users can apply them to migrate off of
41   deprecated APIs.
42
43## [0.9.0] - 2024-09-07
44
45### Added
46
471. base: Define macros for reserved TIDs
482. pdr: Add pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
493. pdr: Add pldm_entity_association_pdr_create_new()
504. platform: Define macros for the responded transferflags
515. pdr: Add pldm_pdr_get_terminus_handle() API
526. pdr: Add related decode_entity_auxiliary_names_pdr() APIs
537. fw_update: Add encode req & decode resp for get_downstream_fw_params
548. platform: Add decode_pldm_platform_cper_event() API
559. decode_get_pdr_repository_info_resp_safe()
56
57   Replaces decode_get_pdr_repository_info_resp() as discussed in the
58   `Deprecated` section below
59
6010. decode_get_pdr_resp_safe()
61
62    Replaces decode_get_pdr_resp() as discussed in the `Deprecated` section
63    below
64
65### Changed
66
671. pdr: Stabilise related decode_entity_auxiliary_names_pdr() APIs
682. platform: Rework decode/encode_pldm_message_poll_event_data() APIs
693. platform: Stabilise decode_pldm_message_poll_event_data() APIs
704. ABI break for decode_sensor_op_data()
71
72   Applying LIBPLDM_CC_NONNULL to the internal msgbuf APIs caused
73   abi-compliance-checker to flag a change in the register containing the
74   parameter `previous_op_state`.
75
765. platform: Stabilise decode_pldm_platform_cper_event() API
77
78### Deprecated
79
801. Rename and deprecate functions with the `_check` suffix
81
82   All library function return values always need to be checked. The `_check`
83   suffix is redundant, so remove it. Migration to the non-deprecated
84   equivalents without the `_check` suffix can be performed using
85   `scripts/ apply-renames` and the [clang-rename][] configurations under
86   `evolutions/`
87
88   The deprecated functions:
89
90   - `get_fru_record_by_option_check()`
91   - `pldm_bios_table_append_pad_checksum_check()`
92   - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
93   - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
94   - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
95   - `pldm_bios_table_attr_entry_enum_encode_check()`
96   - `pldm_bios_table_attr_entry_integer_encode_check()`
97   - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
98   - `pldm_bios_table_attr_entry_string_encode_check()`
99   - `pldm_bios_table_attr_value_entry_encode_enum_check()`
100   - `pldm_bios_table_attr_value_entry_encode_integer_check()`
101   - `pldm_bios_table_attr_value_entry_encode_string_check()`
102   - `pldm_bios_table_string_entry_decode_string_check()`
103   - `pldm_bios_table_string_entry_encode_check()`
104   - `pldm_entity_association_pdr_add_check()`
105   - `pldm_entity_association_pdr_add_from_node_check()`
106   - `pldm_pdr_add_check()`
107   - `pldm_pdr_add_fru_record_set_check()`
108
109[clang-rename]: https://clang.llvm.org/extra/clang-rename.html
110
1112. `decode_get_pdr_repository_info_resp()`
112
113   Users should move to `decode_get_pdr_repository_info_resp_safe()` which
114   eliminates the opportunity for buffer overruns when extracting objects from
115   the message.
116
1173. `decode_get_pdr_resp()`
118
119   Users should move to `decode_get_pdr_resp_safe()` which reduces the
120   invocation tedium and improves memory safety over `decode_get_pdr_resp()`.
121
122### Removed
123
1241. IBM OEM header compatibility symlinks.
125
126   Anyone left using the deprecated paths can migrate using the coccinelle patch
127   at `evolutions/current/oem-ibm-header-compat.cocci`.
128
129### Fixed
130
1311. requester: instance-id: Release read lock on conflict
132
133## [0.8.0] - 2024-05-23
134
135### Added
136
1371. base: Provide pldm_msg_hdr_correlate_response()
1382. transport: af-mctp: Add pldm_transport_af_mctp_bind()
1393. oem: ibm: Add chapdata file type support
1404. base: Added PLDM_SMBIOS & PLDM_RDE message types
1415. oem: meta: Add decode_oem_meta_file_io_req()
1426. state-set: Add all state set values to system power state enum as per DSP0249
1437. platform: Add alias members to the enum
144   pldm_pdr_repository_chg_event_change_record_event_data_operation.
145
146   enum constants with inconsistent names are deprecated with this change.
147   remove old inconsistent enum members after backward compatibility cleanup is
148   done
149
1508. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
1519. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
15210. platform: Add 3 PDR type enum for Redfish Device Enablement per
153    DSP0248_1.2.0
15411. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
15512. entity: Add enum for Network Interface Connectors and Network Ports
156    Connection Types
15713. pdr: Add decode_numeric_effecter_pdr_data()
15814. oem: ibm: Support for the Real SAI entity id
15915. fw_update: Add encode req & decode resp for query_downstream_devices
16016. fw_update: Add encode req & decode resp for query_downstream_identifiers
16117. platform: Add support for GetStateEffecterStates command
162
163### Changed
164
1651. base: Stabilise pldm_msg_hdr_correlate_response()
1662. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
1673. libpldm: Fix header use
1684. libpldm: More fixes for header use
1695. pdr: Stabilise pldm_pdr_find_last_in_range() API
1706. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
1717. oem: meta: stabilise decode_oem_meta_file_io_req()
1728. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
173
174### Deprecated
175
1761. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
177   with `PLDM_OEM_IBM_`
178
179### Fixed
180
1811. libpldm: Rationalise the local and installed path of pldm.h
1822. pdr: Assign record_handle in entity_association_pdr_add_children()
1833. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
1844. pdr: Remove redundant constant for minimum numeric sensor PDR length
1855. tests: oem: meta: Fix fileio use of msgbuf
186
187## [0.7.0] - 2023-08-29
188
189### Added
190
1911. state-set: Add new enum for Operational Fault Status enum
192
193### Changed
194
1951. transport: Match specified metadata in pldm_transport_send_recv_msg()
1962. transport: mctp-demux: Drop ABI annotation for internal symbols
1973. transport: Stabilise core transport and implementation APIs
198
199   This stabilisation covers the following headers and functions:
200
201   - libpldm/transport.h
202
203     - pldm_transport_poll()
204     - pldm_transport_send_msg()
205     - pldm_transport_recv_msg()
206     - pldm_transport_send_recv_msg()
207
208   - libpldm/transport/af-mctp.h
209
210     - pldm_transport_af_mctp_init()
211     - pldm_transport_af_mctp_destroy()
212     - pldm_transport_af_mctp_core()
213     - pldm_transport_af_mctp_init_pollfd()
214     - pldm_transport_af_mctp_map_tid()
215     - pldm_transport_af_mctp_unmap_tid()
216
217   - libpldm/transport/mctp-demux.h
218     - pldm_transport_mctp_demux_init()
219     - pldm_transport_mctp_demux_destroy()
220     - pldm_transport_mctp_demux_core()
221     - pldm_transport_mctp_demux_init_pollfd()
222     - pldm_transport_mctp_demux_map_tid()
223     - pldm_transport_mctp_demux_unmap_tid()
224
225### Deprecated
226
2271. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
228   `libpldm/requester/pldm.h`):
229
230   - pldm_open()
231   - pldm_send_recv()
232   - pldm_send()
233   - pldm_recv()
234   - pldm_recv_any()
235   - pldm_close()
236
237   Users should migrate to the newer "transport" APIs instead.
238
239## Fixed
240
2411. tests: Exclude transport tests when build excludes testing ABIs
2422. abi: Capture deprecation of pldm_close()
243
244## [0.6.0] - 2023-08-22
245
246### Changed
247
2481. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
2492. meson: Apply `b_ndebug=if-release` by default
2503. pdr : Stabilize pldm_entity_association_tree_add_entity()
2514. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
2525. pdr: Stabilize pldm_entity_node_get_remote_container_id()
2536. transport: af-mctp: Assign out-params on success in \*\_recv()
2547. transport: Generalise the pldm_transport_recv_msg() API
255
256### Removed
257
2581. pdr: Remove pldm_entity_association_pdr_add()
2592. state-set: Remove enum pldm_state_set_operational_fault_status_values
260
261### Fixed
262
2631. transport: register init_pollfd callback for af-mctp
2642. transport: fix init_pollfd function parameter
2653. transport: Fix doxygen and variables for send and recv functions
2664. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
267
268## [0.5.0] - 2023-08-09
269
270### Added
271
2721. pdr: Introduce pldm_entity_association_pdr_add_check()
273
274### Changed
275
2761. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
2772. transport: pldm_transport_poll(): Adjust return value semantics
2783. transport: free un-wanted responses in pldm_transport_send_recv_msg()
279
280### Deprecated
281
2821. state-set: Enum pldm_state_set_operational_fault_status_values
283
284   The enum operational_fault_status is defined with wrong members and will
285   eventually be replaced with the correct members. Any uses of
286   pldm_state_set_operational_fault_status_values members should move to
287   equivalent pldm_state_set_operational_stress_status_values members if needed.
288
2892. platform: Struct field name in fru_record_set PDR
290
291   References to entity_instance_num should be changed to entity_instance
292
2933. platform: Struct field name in numeric sensor value PDR
294
295   References to entity_instance_num should be changed to entity_instance
296
297### Removed
298
2991. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
3002. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
3013. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
3024. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
3035. bios_table: Remove pldm_bios_table_append_pad_checksum()
3046. fru: Remove get_fru_record_by_option()
3057. pdr: Make is_present() static
3068. pdr: Remove pldm_pdr_add()
3079. pdr: Remove pldm_pdr_add_fru_record_set()
30810. pdr: Remove pldm_entity_association_pdr_add_from_node()
30911. pdr: Make find_entity_ref_in_tree() static
31012. pdr: Make entity_association_tree_find() static
311
312### Fixed
313
3141. requester: Fix response buffer cast in pldm_send_recv()
3152. pdr: Hoist record handle overflow test to avoid memory leak
3163. transport: Correct comparison in while loop condition
317
318## [0.4.0] - 2023-07-14
319
320### Added
321
3221. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
3232. fru: Introduce get_fru_record_by_option_check()
3243. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
3254. pdr: Introduce pldm_pdr_add_check()
3265. pdr: Introduce pldm_pdr_add_fru_record_set_check()
327
328### Changed
329
3301. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
3312. requester: Expose pldm_close() in header
3323. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
3334. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
3345. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
3356. pdr: pldm_pdr_init(): Return NULL on allocation failure
3367. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
3378. pdr: Document preconditions for trivial accessor functions
338
339   A trivial accessor function is one that exposes properties of an object in a
340   way can't result in an error, beyond passing an invalid argument to the
341   function. For APIs meeting this definition we define a precondition that
342   struct pointers must point to valid objects to avoid polluting the function
343   prototypes. The following APIs now have this precondition explicitly defined:
344
345   - pldm_entity_extract()
346   - pldm_entity_get_parent()
347   - pldm_entity_is_exist_parent()
348   - pldm_entity_is_node_parent()
349   - pldm_is_current_parent_child
350   - pldm_is_empty_entity_assoc_tree()
351   - pldm_pdr_get_record_count()
352   - pldm_pdr_get_record_handle()
353   - pldm_pdr_get_repo_size()
354   - pldm_pdr_record_is_remote()
355
3569. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
35710. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
35811. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
35912. pdr: pldm_entity_association_tree_visit(): Document preconditions
36013. pdr: pldm_entity_association_tree_visit(): Exit early on failure
36114. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
36215. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
36316. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
36417. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
36518. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
36619. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
36720. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
36821. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
36922. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
37023. pdr: pldm_entity_get_num_children(): Don't return invalid values
37124. libpldm: Lift or remove asserts where a subsequent check exists
372
373### Deprecated
374
3751. pldm_bios_table_attr_entry_integer_encode()
376
377   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
378
3792. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
380
381   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
382
3833. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
384
385   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
386
3874. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
388
389   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
390
3915. pdr: Deprecate is_present()
392
393   There should be no users of this symbol. If you are a user, you should figure
394   out how to stop, or get in touch. This symbol will be marked static the
395   release after deprecation.
396
3976. pdr: Deprecate find_entity_ref_in_tree()
398
399   There should be no users of this symbol. If you are a user, you should figure
400   out how to stop, or get in touch. This symbol will be marked static the
401   release after deprecation.
402
4037. pdr: Deprecate entity_association_tree_find()
404
405   There should be no users of this symbol. If you are a user, you should figure
406   out how to stop, or get in touch. This symbol will be marked static the
407   release after deprecation.
408
4098. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
410
411   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
412   pldm_bios_table_append_pad_checksum() should migrate to
413   pldm_bios_table_append_pad_checksum_check()
414
4159. fru: Stabilise get_fru_record_by_option_check()
416
417   get_fru_record_by_option() is deprecated by this change. Users of
418   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
419
42010. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
421
422    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
423    Users of pldm_entity_association_pdr_add_from_node() should migrate to
424    pldm_entity_association_pdr_add_from_node_check()
425
42611. pdr: Stabilise pldm_pdr_add_check()
427
428    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
429    migrate to pldm_pdr_add_check()
430
43112. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
432
433    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
434    pldm_pdr_add_fru_record_set() should migrate to
435    pldm_pdr_add_fru_record_set_check()
436
437### Removed
438
4391. bios_table: Remove deprecated APIs sanitized by assert():
440
441   - pldm_bios_table_string_entry_encode()
442   - pldm_bios_table_string_entry_decode_string()
443   - pldm_bios_table_attr_entry_enum_encode()
444   - pldm_bios_table_attr_entry_enum_decode_pv_num()
445   - pldm_bios_table_attr_entry_enum_decode_def_num()
446   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
447   - pldm_bios_table_attr_entry_string_encode()
448   - pldm_bios_table_attr_entry_string_decode_def_string_length()
449
450### Fixed
451
4521. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
4532. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
4543. transport: mctp-demux: Don't test socket for non-zero value
4554. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
4565. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
4576. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
4587. abi: Update to remove pldm_close() from reference dumps
4598. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
460
461## [0.3.0] - 2023-06-23
462
463### Added
464
4651. Add encode/decode pldmMessagePollEvent data
4662. README: Add a section on working with libpldm
4673. pdr: Introduce remote_container_id and associated APIs
4684. pdr: Add APIs for creating and locating remote PDRs
4695. pdr: Add pldm_pdr_find_last_in_range()
4706. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
4717. pdr: Add pldm_pdr_find_container_id_range_exclude()
472
473### Changed
474
4751. include: Move installed transport.h under libpldm/
4762. libpldm: Explicit deprecated, stable and testing ABI classes
4773. meson: Reduce strength of oem-ibm requirements from enabled to allowed
478
479   The `oem-ibm` feature is now enabled by the default meson configuration, for
480   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
481   recipe:
482
483   <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10>
484
485   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
486   when invoking `meson setup`
487
4884. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
4895. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
490
491### Deprecated
492
4931. bios_table: Deprecate APIs with arguments sanitized using assert()
494
495   C provides enough foot-guns without us encoding them into library APIs.
496   Specifically, deprecate the following in favour of their `*_check()` variants
497   which ensure assertions won't fail or otherwise invoke UB:
498
499   - pldm_bios_table_string_entry_encode()
500   - pldm_bios_table_string_entry_decode_string()
501   - pldm_bios_table_attr_entry_enum_encode()
502   - pldm_bios_table_attr_entry_enum_decode_pv_num()
503   - pldm_bios_table_attr_entry_enum_decode_def_num()
504   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
505   - pldm_bios_table_attr_entry_string_encode()
506   - pldm_bios_table_attr_entry_string_decode_def_string_length()
507
508### Removed
509
5101. libpldm: Remove the requester-api option
511
512### Fixed
513
5141. requester: Make pldm_open() return existing fd
5152. transport: Prevent sticking in waiting for response
5163. transport: Match on response in pldm_transport_send_recv_msg()
5174. requester: Add check before accessing hdr in pldm_recv()
5185. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
519