xref: /openbmc/libpldm/CHANGELOG.md (revision 615344fc)
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## [0.9.1] - 2024-09-07
19
20### Changed
21
221. Moved evolutions intended for v0.9.0 into place
23
24   Evolutions for the release have been moved from `evolutions/current` to
25   `evolutions/v0.9.1`. Library users can apply them to migrate off of
26   deprecated APIs.
27
28## [0.9.0] - 2024-09-07
29
30### Added
31
321. base: Define macros for reserved TIDs
332. pdr: Add pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
343. pdr: Add pldm_entity_association_pdr_create_new()
354. platform: Define macros for the responded transferflags
365. pdr: Add pldm_pdr_get_terminus_handle() API
376. pdr: Add related decode_entity_auxiliary_names_pdr() APIs
387. fw_update: Add encode req & decode resp for get_downstream_fw_params
398. platform: Add decode_pldm_platform_cper_event() API
409. decode_get_pdr_repository_info_resp_safe()
41
42   Replaces decode_get_pdr_repository_info_resp() as discussed in the
43   `Deprecated` section below
44
4510. decode_get_pdr_resp_safe()
46
47    Replaces decode_get_pdr_resp() as discussed in the `Deprecated` section
48    below
49
50### Changed
51
521. pdr: Stabilise related decode_entity_auxiliary_names_pdr() APIs
532. platform: Rework decode/encode_pldm_message_poll_event_data() APIs
543. platform: Stabilise decode_pldm_message_poll_event_data() APIs
554. ABI break for decode_sensor_op_data()
56
57   Applying LIBPLDM_CC_NONNULL to the internal msgbuf APIs caused
58   abi-compliance-checker to flag a change in the register containing the
59   parameter `previous_op_state`.
60
615. platform: Stabilise decode_pldm_platform_cper_event() API
62
63### Deprecated
64
651. Rename and deprecate functions with the `_check` suffix
66
67   All library function return values always need to be checked. The `_check`
68   suffix is redundant, so remove it. Migration to the non-deprecated
69   equivalents without the `_check` suffix can be performed using
70   `scripts/ apply-renames` and the [clang-rename][] configurations under
71   `evolutions/`
72
73   The deprecated functions:
74
75   - `get_fru_record_by_option_check()`
76   - `pldm_bios_table_append_pad_checksum_check()`
77   - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
78   - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
79   - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
80   - `pldm_bios_table_attr_entry_enum_encode_check()`
81   - `pldm_bios_table_attr_entry_integer_encode_check()`
82   - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
83   - `pldm_bios_table_attr_entry_string_encode_check()`
84   - `pldm_bios_table_attr_value_entry_encode_enum_check()`
85   - `pldm_bios_table_attr_value_entry_encode_integer_check()`
86   - `pldm_bios_table_attr_value_entry_encode_string_check()`
87   - `pldm_bios_table_string_entry_decode_string_check()`
88   - `pldm_bios_table_string_entry_encode_check()`
89   - `pldm_entity_association_pdr_add_check()`
90   - `pldm_entity_association_pdr_add_from_node_check()`
91   - `pldm_pdr_add_check()`
92   - `pldm_pdr_add_fru_record_set_check()`
93
94[clang-rename]: https://clang.llvm.org/extra/clang-rename.html
95
962. `decode_get_pdr_repository_info_resp()`
97
98   Users should move to `decode_get_pdr_repository_info_resp_safe()` which
99   eliminates the opportunity for buffer overruns when extracting objects from
100   the message.
101
1023. `decode_get_pdr_resp()`
103
104   Users should move to `decode_get_pdr_resp_safe()` which reduces the
105   invocation tedium and improves memory safety over `decode_get_pdr_resp()`.
106
107### Removed
108
1091. IBM OEM header compatibility symlinks.
110
111   Anyone left using the deprecated paths can migrate using the coccinelle patch
112   at `evolutions/current/oem-ibm-header-compat.cocci`.
113
114### Fixed
115
1161. requester: instance-id: Release read lock on conflict
117
118## [0.8.0] - 2024-05-23
119
120### Added
121
1221. base: Provide pldm_msg_hdr_correlate_response()
1232. transport: af-mctp: Add pldm_transport_af_mctp_bind()
1243. oem: ibm: Add chapdata file type support
1254. base: Added PLDM_SMBIOS & PLDM_RDE message types
1265. oem: meta: Add decode_oem_meta_file_io_req()
1276. state-set: Add all state set values to system power state enum as per DSP0249
1287. platform: Add alias members to the enum
129   pldm_pdr_repository_chg_event_change_record_event_data_operation.
130
131   enum constants with inconsistent names are deprecated with this change.
132   remove old inconsistent enum members after backward compatibility cleanup is
133   done
134
1358. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
1369. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
13710. platform: Add 3 PDR type enum for Redfish Device Enablement per
138    DSP0248_1.2.0
13911. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
14012. entity: Add enum for Network Interface Connectors and Network Ports
141    Connection Types
14213. pdr: Add decode_numeric_effecter_pdr_data()
14314. oem: ibm: Support for the Real SAI entity id
14415. fw_update: Add encode req & decode resp for query_downstream_devices
14516. fw_update: Add encode req & decode resp for query_downstream_identifiers
14617. platform: Add support for GetStateEffecterStates command
147
148### Changed
149
1501. base: Stabilise pldm_msg_hdr_correlate_response()
1512. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
1523. libpldm: Fix header use
1534. libpldm: More fixes for header use
1545. pdr: Stabilise pldm_pdr_find_last_in_range() API
1556. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
1567. oem: meta: stabilise decode_oem_meta_file_io_req()
1578. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
158
159### Deprecated
160
1611. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
162   with `PLDM_OEM_IBM_`
163
164### Fixed
165
1661. libpldm: Rationalise the local and installed path of pldm.h
1672. pdr: Assign record_handle in entity_association_pdr_add_children()
1683. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
1694. pdr: Remove redundant constant for minimum numeric sensor PDR length
1705. tests: oem: meta: Fix fileio use of msgbuf
171
172## [0.7.0] - 2023-08-29
173
174### Added
175
1761. state-set: Add new enum for Operational Fault Status enum
177
178### Changed
179
1801. transport: Match specified metadata in pldm_transport_send_recv_msg()
1812. transport: mctp-demux: Drop ABI annotation for internal symbols
1823. transport: Stabilise core transport and implementation APIs
183
184   This stabilisation covers the following headers and functions:
185
186   - libpldm/transport.h
187
188     - pldm_transport_poll()
189     - pldm_transport_send_msg()
190     - pldm_transport_recv_msg()
191     - pldm_transport_send_recv_msg()
192
193   - libpldm/transport/af-mctp.h
194
195     - pldm_transport_af_mctp_init()
196     - pldm_transport_af_mctp_destroy()
197     - pldm_transport_af_mctp_core()
198     - pldm_transport_af_mctp_init_pollfd()
199     - pldm_transport_af_mctp_map_tid()
200     - pldm_transport_af_mctp_unmap_tid()
201
202   - libpldm/transport/mctp-demux.h
203     - pldm_transport_mctp_demux_init()
204     - pldm_transport_mctp_demux_destroy()
205     - pldm_transport_mctp_demux_core()
206     - pldm_transport_mctp_demux_init_pollfd()
207     - pldm_transport_mctp_demux_map_tid()
208     - pldm_transport_mctp_demux_unmap_tid()
209
210### Deprecated
211
2121. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
213   `libpldm/requester/pldm.h`):
214
215   - pldm_open()
216   - pldm_send_recv()
217   - pldm_send()
218   - pldm_recv()
219   - pldm_recv_any()
220   - pldm_close()
221
222   Users should migrate to the newer "transport" APIs instead.
223
224## Fixed
225
2261. tests: Exclude transport tests when build excludes testing ABIs
2272. abi: Capture deprecation of pldm_close()
228
229## [0.6.0] - 2023-08-22
230
231### Changed
232
2331. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
2342. meson: Apply `b_ndebug=if-release` by default
2353. pdr : Stabilize pldm_entity_association_tree_add_entity()
2364. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
2375. pdr: Stabilize pldm_entity_node_get_remote_container_id()
2386. transport: af-mctp: Assign out-params on success in \*\_recv()
2397. transport: Generalise the pldm_transport_recv_msg() API
240
241### Removed
242
2431. pdr: Remove pldm_entity_association_pdr_add()
2442. state-set: Remove enum pldm_state_set_operational_fault_status_values
245
246### Fixed
247
2481. transport: register init_pollfd callback for af-mctp
2492. transport: fix init_pollfd function parameter
2503. transport: Fix doxygen and variables for send and recv functions
2514. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
252
253## [0.5.0] - 2023-08-09
254
255### Added
256
2571. pdr: Introduce pldm_entity_association_pdr_add_check()
258
259### Changed
260
2611. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
2622. transport: pldm_transport_poll(): Adjust return value semantics
2633. transport: free un-wanted responses in pldm_transport_send_recv_msg()
264
265### Deprecated
266
2671. state-set: Enum pldm_state_set_operational_fault_status_values
268
269   The enum operational_fault_status is defined with wrong members and will
270   eventually be replaced with the correct members. Any uses of
271   pldm_state_set_operational_fault_status_values members should move to
272   equivalent pldm_state_set_operational_stress_status_values members if needed.
273
2742. platform: Struct field name in fru_record_set PDR
275
276   References to entity_instance_num should be changed to entity_instance
277
2783. platform: Struct field name in numeric sensor value PDR
279
280   References to entity_instance_num should be changed to entity_instance
281
282### Removed
283
2841. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
2852. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
2863. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
2874. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
2885. bios_table: Remove pldm_bios_table_append_pad_checksum()
2896. fru: Remove get_fru_record_by_option()
2907. pdr: Make is_present() static
2918. pdr: Remove pldm_pdr_add()
2929. pdr: Remove pldm_pdr_add_fru_record_set()
29310. pdr: Remove pldm_entity_association_pdr_add_from_node()
29411. pdr: Make find_entity_ref_in_tree() static
29512. pdr: Make entity_association_tree_find() static
296
297### Fixed
298
2991. requester: Fix response buffer cast in pldm_send_recv()
3002. pdr: Hoist record handle overflow test to avoid memory leak
3013. transport: Correct comparison in while loop condition
302
303## [0.4.0] - 2023-07-14
304
305### Added
306
3071. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
3082. fru: Introduce get_fru_record_by_option_check()
3093. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
3104. pdr: Introduce pldm_pdr_add_check()
3115. pdr: Introduce pldm_pdr_add_fru_record_set_check()
312
313### Changed
314
3151. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
3162. requester: Expose pldm_close() in header
3173. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
3184. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
3195. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
3206. pdr: pldm_pdr_init(): Return NULL on allocation failure
3217. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
3228. pdr: Document preconditions for trivial accessor functions
323
324   A trivial accessor function is one that exposes properties of an object in a
325   way can't result in an error, beyond passing an invalid argument to the
326   function. For APIs meeting this definition we define a precondition that
327   struct pointers must point to valid objects to avoid polluting the function
328   prototypes. The following APIs now have this precondition explicitly defined:
329
330   - pldm_entity_extract()
331   - pldm_entity_get_parent()
332   - pldm_entity_is_exist_parent()
333   - pldm_entity_is_node_parent()
334   - pldm_is_current_parent_child
335   - pldm_is_empty_entity_assoc_tree()
336   - pldm_pdr_get_record_count()
337   - pldm_pdr_get_record_handle()
338   - pldm_pdr_get_repo_size()
339   - pldm_pdr_record_is_remote()
340
3419. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
34210. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
34311. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
34412. pdr: pldm_entity_association_tree_visit(): Document preconditions
34513. pdr: pldm_entity_association_tree_visit(): Exit early on failure
34614. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
34715. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
34816. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
34917. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
35018. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
35119. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
35220. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
35321. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
35422. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
35523. pdr: pldm_entity_get_num_children(): Don't return invalid values
35624. libpldm: Lift or remove asserts where a subsequent check exists
357
358### Deprecated
359
3601. pldm_bios_table_attr_entry_integer_encode()
361
362   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
363
3642. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
365
366   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
367
3683. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
369
370   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
371
3724. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
373
374   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
375
3765. pdr: Deprecate is_present()
377
378   There should be no users of this symbol. If you are a user, you should figure
379   out how to stop, or get in touch. This symbol will be marked static the
380   release after deprecation.
381
3826. pdr: Deprecate find_entity_ref_in_tree()
383
384   There should be no users of this symbol. If you are a user, you should figure
385   out how to stop, or get in touch. This symbol will be marked static the
386   release after deprecation.
387
3887. pdr: Deprecate entity_association_tree_find()
389
390   There should be no users of this symbol. If you are a user, you should figure
391   out how to stop, or get in touch. This symbol will be marked static the
392   release after deprecation.
393
3948. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
395
396   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
397   pldm_bios_table_append_pad_checksum() should migrate to
398   pldm_bios_table_append_pad_checksum_check()
399
4009. fru: Stabilise get_fru_record_by_option_check()
401
402   get_fru_record_by_option() is deprecated by this change. Users of
403   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
404
40510. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
406
407    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
408    Users of pldm_entity_association_pdr_add_from_node() should migrate to
409    pldm_entity_association_pdr_add_from_node_check()
410
41111. pdr: Stabilise pldm_pdr_add_check()
412
413    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
414    migrate to pldm_pdr_add_check()
415
41612. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
417
418    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
419    pldm_pdr_add_fru_record_set() should migrate to
420    pldm_pdr_add_fru_record_set_check()
421
422### Removed
423
4241. bios_table: Remove deprecated APIs sanitized by assert():
425
426   - pldm_bios_table_string_entry_encode()
427   - pldm_bios_table_string_entry_decode_string()
428   - pldm_bios_table_attr_entry_enum_encode()
429   - pldm_bios_table_attr_entry_enum_decode_pv_num()
430   - pldm_bios_table_attr_entry_enum_decode_def_num()
431   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
432   - pldm_bios_table_attr_entry_string_encode()
433   - pldm_bios_table_attr_entry_string_decode_def_string_length()
434
435### Fixed
436
4371. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
4382. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
4393. transport: mctp-demux: Don't test socket for non-zero value
4404. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
4415. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
4426. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
4437. abi: Update to remove pldm_close() from reference dumps
4448. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
445
446## [0.3.0] - 2023-06-23
447
448### Added
449
4501. Add encode/decode pldmMessagePollEvent data
4512. README: Add a section on working with libpldm
4523. pdr: Introduce remote_container_id and associated APIs
4534. pdr: Add APIs for creating and locating remote PDRs
4545. pdr: Add pldm_pdr_find_last_in_range()
4556. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
4567. pdr: Add pldm_pdr_find_container_id_range_exclude()
457
458### Changed
459
4601. include: Move installed transport.h under libpldm/
4612. libpldm: Explicit deprecated, stable and testing ABI classes
4623. meson: Reduce strength of oem-ibm requirements from enabled to allowed
463
464   The `oem-ibm` feature is now enabled by the default meson configuration, for
465   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
466   recipe:
467
468   <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10>
469
470   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
471   when invoking `meson setup`
472
4734. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
4745. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
475
476### Deprecated
477
4781. bios_table: Deprecate APIs with arguments sanitized using assert()
479
480   C provides enough foot-guns without us encoding them into library APIs.
481   Specifically, deprecate the following in favour of their `*_check()` variants
482   which ensure assertions won't fail or otherwise invoke UB:
483
484   - pldm_bios_table_string_entry_encode()
485   - pldm_bios_table_string_entry_decode_string()
486   - pldm_bios_table_attr_entry_enum_encode()
487   - pldm_bios_table_attr_entry_enum_decode_pv_num()
488   - pldm_bios_table_attr_entry_enum_decode_def_num()
489   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
490   - pldm_bios_table_attr_entry_string_encode()
491   - pldm_bios_table_attr_entry_string_decode_def_string_length()
492
493### Removed
494
4951. libpldm: Remove the requester-api option
496
497### Fixed
498
4991. requester: Make pldm_open() return existing fd
5002. transport: Prevent sticking in waiting for response
5013. transport: Match on response in pldm_transport_send_recv_msg()
5024. requester: Add check before accessing hdr in pldm_recv()
5035. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
504