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### Added 21 221. base: Define macros for reserved TIDs 232. pdr: Add pldm_entity_association_pdr_add_contained_entity_to_remote_pdr() 243. pdr: Add pldm_entity_association_pdr_create_new() 254. platform: Define macros for the responded transferflags 265. pdr: Add pldm_pdr_get_terminus_handle() API 276. pdr: Add related decode_entity_auxiliary_names_pdr() APIs 287. fw_update: Add encode req & decode resp for get_downstream_fw_params 29 30### Changed 31 321. pdr: Stabilise related decode_entity_auxiliary_names_pdr() APIs 332. platform: Rework decode/encode_pldm_message_poll_event_data() APIs 343. platform: Stabilise decode_pldm_message_poll_event_data() APIs 35 36### Deprecated 37 381. Rename and deprecate functions with the `_check` suffix 39 40 All library function return values always need to be checked. The `_check` 41 suffix is redundant, so remove it. Migration to the non-deprecated 42 equivalents without the `_check` suffix can be performed using 43 `scripts/ apply-renames` and the [clang-rename][] configurations under 44 `evolutions/` 45 46 The deprecated functions: 47 48 - `get_fru_record_by_option_check()` 49 - `pldm_entity_association_pdr_add_check()` 50 - `pldm_pdr_add_check()` 51 - `pldm_pdr_add_fru_record_set_check()` 52 53[clang-rename]: https://clang.llvm.org/extra/clang-rename.html 54 55### Removed 56 571. IBM OEM header compatibility symlinks. 58 59 Anyone left using the deprecated paths can migrate using the coccinelle patch 60 at `evolutions/current/oem-ibm-header-compat.cocci`. 61 62### Fixed 63 641. requester: instance-id: Release read lock on conflict 65 66## [0.8.0] - 2024-05-23 67 68### Added 69 701. base: Provide pldm_msg_hdr_correlate_response() 712. transport: af-mctp: Add pldm_transport_af_mctp_bind() 723. oem: ibm: Add chapdata file type support 734. base: Added PLDM_SMBIOS & PLDM_RDE message types 745. oem: meta: Add decode_oem_meta_file_io_req() 756. state-set: Add all state set values to system power state enum as per DSP0249 767. platform: Add alias members to the enum 77 pldm_pdr_repository_chg_event_change_record_event_data_operation. 78 79 enum constants with inconsistent names are deprecated with this change. 80 remove old inconsistent enum members after backward compatibility cleanup is 81 done 82 838. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*` 849. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type 8510. platform: Add 3 PDR type enum for Redfish Device Enablement per 86 DSP0248_1.2.0 8711. state_set: Add CONNECTED and DISCONNECTED enum for Link State set 8812. entity: Add enum for Network Interface Connectors and Network Ports 89 Connection Types 9013. pdr: Add decode_numeric_effecter_pdr_data() 9114. oem: ibm: Support for the Real SAI entity id 9215. fw_update: Add encode req & decode resp for query_downstream_devices 9316. fw_update: Add encode req & decode resp for query_downstream_identifiers 9417. platform: Add support for GetStateEffecterStates command 95 96### Changed 97 981. base: Stabilise pldm_msg_hdr_correlate_response() 992. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind() 1003. libpldm: Fix header use 1014. libpldm: More fixes for header use 1025. pdr: Stabilise pldm_pdr_find_last_in_range() API 1036. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle() 1047. oem: meta: stabilise decode_oem_meta_file_io_req() 1058. pdr: pldm_entity_association_tree_copy_root(): Document preconditions 106 107### Deprecated 108 1091. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed 110 with `PLDM_OEM_IBM_` 111 112### Fixed 113 1141. libpldm: Rationalise the local and installed path of pldm.h 1152. pdr: Assign record_handle in entity_association_pdr_add_children() 1163. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value() 1174. pdr: Remove redundant constant for minimum numeric sensor PDR length 1185. tests: oem: meta: Fix fileio use of msgbuf 119 120## [0.7.0] - 2023-08-29 121 122### Added 123 1241. state-set: Add new enum for Operational Fault Status enum 125 126### Changed 127 1281. transport: Match specified metadata in pldm_transport_send_recv_msg() 1292. transport: mctp-demux: Drop ABI annotation for internal symbols 1303. transport: Stabilise core transport and implementation APIs 131 132 This stabilisation covers the following headers and functions: 133 134 - libpldm/transport.h 135 136 - pldm_transport_poll() 137 - pldm_transport_send_msg() 138 - pldm_transport_recv_msg() 139 - pldm_transport_send_recv_msg() 140 141 - libpldm/transport/af-mctp.h 142 143 - pldm_transport_af_mctp_init() 144 - pldm_transport_af_mctp_destroy() 145 - pldm_transport_af_mctp_core() 146 - pldm_transport_af_mctp_init_pollfd() 147 - pldm_transport_af_mctp_map_tid() 148 - pldm_transport_af_mctp_unmap_tid() 149 150 - libpldm/transport/mctp-demux.h 151 - pldm_transport_mctp_demux_init() 152 - pldm_transport_mctp_demux_destroy() 153 - pldm_transport_mctp_demux_core() 154 - pldm_transport_mctp_demux_init_pollfd() 155 - pldm_transport_mctp_demux_map_tid() 156 - pldm_transport_mctp_demux_unmap_tid() 157 158### Deprecated 159 1601. All the existing "requester" APIs from `libpldm/pldm.h` (also known as 161 `libpldm/requester/pldm.h`): 162 163 - pldm_open() 164 - pldm_send_recv() 165 - pldm_send() 166 - pldm_recv() 167 - pldm_recv_any() 168 - pldm_close() 169 170 Users should migrate to the newer "transport" APIs instead. 171 172## Fixed 173 1741. tests: Exclude transport tests when build excludes testing ABIs 1752. abi: Capture deprecation of pldm_close() 176 177## [0.6.0] - 2023-08-22 178 179### Changed 180 1811. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity() 1822. meson: Apply `b_ndebug=if-release` by default 1833. pdr : Stabilize pldm_entity_association_tree_add_entity() 1844. pdr: Stabilise pldm_entity_association_tree_find_with_locality() 1855. pdr: Stabilize pldm_entity_node_get_remote_container_id() 1866. transport: af-mctp: Assign out-params on success in \*\_recv() 1877. transport: Generalise the pldm_transport_recv_msg() API 188 189### Removed 190 1911. pdr: Remove pldm_entity_association_pdr_add() 1922. state-set: Remove enum pldm_state_set_operational_fault_status_values 193 194### Fixed 195 1961. transport: register init_pollfd callback for af-mctp 1972. transport: fix init_pollfd function parameter 1983. transport: Fix doxygen and variables for send and recv functions 1994. transport: af-mctp: Ensure malloc() succeeds in \*\_recv() 200 201## [0.5.0] - 2023-08-09 202 203### Added 204 2051. pdr: Introduce pldm_entity_association_pdr_add_check() 206 207### Changed 208 2091. pdr: Allow record_handle to be NULL for pldm_pdr_add_check() 2102. transport: pldm_transport_poll(): Adjust return value semantics 2113. transport: free un-wanted responses in pldm_transport_send_recv_msg() 212 213### Deprecated 214 2151. state-set: Enum pldm_state_set_operational_fault_status_values 216 217 The enum operational_fault_status is defined with wrong members and will 218 eventually be replaced with the correct members. Any uses of 219 pldm_state_set_operational_fault_status_values members should move to 220 equivalent pldm_state_set_operational_stress_status_values members if needed. 221 2222. platform: Struct field name in fru_record_set PDR 223 224 References to entity_instance_num should be changed to entity_instance 225 2263. platform: Struct field name in numeric sensor value PDR 227 228 References to entity_instance_num should be changed to entity_instance 229 230### Removed 231 2321. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 2332. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 2343. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 2354. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 2365. bios_table: Remove pldm_bios_table_append_pad_checksum() 2376. fru: Remove get_fru_record_by_option() 2387. pdr: Make is_present() static 2398. pdr: Remove pldm_pdr_add() 2409. pdr: Remove pldm_pdr_add_fru_record_set() 24110. pdr: Remove pldm_entity_association_pdr_add_from_node() 24211. pdr: Make find_entity_ref_in_tree() static 24312. pdr: Make entity_association_tree_find() static 244 245### Fixed 246 2471. requester: Fix response buffer cast in pldm_send_recv() 2482. pdr: Hoist record handle overflow test to avoid memory leak 2493. transport: Correct comparison in while loop condition 250 251## [0.4.0] - 2023-07-14 252 253### Added 254 2551. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 2562. fru: Introduce get_fru_record_by_option_check() 2573. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 2584. pdr: Introduce pldm_pdr_add_check() 2595. pdr: Introduce pldm_pdr_add_fru_record_set_check() 260 261### Changed 262 2631. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 2642. requester: Expose pldm_close() in header 2653. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 2664. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 2675. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 2686. pdr: pldm_pdr_init(): Return NULL on allocation failure 2697. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 2708. pdr: Document preconditions for trivial accessor functions 271 272 A trivial accessor function is one that exposes properties of an object in a 273 way can't result in an error, beyond passing an invalid argument to the 274 function. For APIs meeting this definition we define a precondition that 275 struct pointers must point to valid objects to avoid polluting the function 276 prototypes. The following APIs now have this precondition explicitly defined: 277 278 - pldm_entity_extract() 279 - pldm_entity_get_parent() 280 - pldm_entity_is_exist_parent() 281 - pldm_entity_is_node_parent() 282 - pldm_is_current_parent_child 283 - pldm_is_empty_entity_assoc_tree() 284 - pldm_pdr_get_record_count() 285 - pldm_pdr_get_record_handle() 286 - pldm_pdr_get_repo_size() 287 - pldm_pdr_record_is_remote() 288 2899. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 29010. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 29111. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 29212. pdr: pldm_entity_association_tree_visit(): Document preconditions 29313. pdr: pldm_entity_association_tree_visit(): Exit early on failure 29414. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 29515. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 29616. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 29717. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 29818. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 29919. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 30020. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 30121. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 30222. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 30323. pdr: pldm_entity_get_num_children(): Don't return invalid values 30424. libpldm: Lift or remove asserts where a subsequent check exists 305 306### Deprecated 307 3081. pldm_bios_table_attr_entry_integer_encode() 309 310 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 311 3122. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 313 314 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 315 3163. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 317 318 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 319 3204. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 321 322 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 323 3245. pdr: Deprecate is_present() 325 326 There should be no users of this symbol. If you are a user, you should figure 327 out how to stop, or get in touch. This symbol will be marked static the 328 release after deprecation. 329 3306. pdr: Deprecate find_entity_ref_in_tree() 331 332 There should be no users of this symbol. If you are a user, you should figure 333 out how to stop, or get in touch. This symbol will be marked static the 334 release after deprecation. 335 3367. pdr: Deprecate entity_association_tree_find() 337 338 There should be no users of this symbol. If you are a user, you should figure 339 out how to stop, or get in touch. This symbol will be marked static the 340 release after deprecation. 341 3428. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 343 344 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 345 pldm_bios_table_append_pad_checksum() should migrate to 346 pldm_bios_table_append_pad_checksum_check() 347 3489. fru: Stabilise get_fru_record_by_option_check() 349 350 get_fru_record_by_option() is deprecated by this change. Users of 351 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 352 35310. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 354 355 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 356 Users of pldm_entity_association_pdr_add_from_node() should migrate to 357 pldm_entity_association_pdr_add_from_node_check() 358 35911. pdr: Stabilise pldm_pdr_add_check() 360 361 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 362 migrate to pldm_pdr_add_check() 363 36412. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 365 366 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 367 pldm_pdr_add_fru_record_set() should migrate to 368 pldm_pdr_add_fru_record_set_check() 369 370### Removed 371 3721. bios_table: Remove deprecated APIs sanitized by assert(): 373 374 - pldm_bios_table_string_entry_encode() 375 - pldm_bios_table_string_entry_decode_string() 376 - pldm_bios_table_attr_entry_enum_encode() 377 - pldm_bios_table_attr_entry_enum_decode_pv_num() 378 - pldm_bios_table_attr_entry_enum_decode_def_num() 379 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 380 - pldm_bios_table_attr_entry_string_encode() 381 - pldm_bios_table_attr_entry_string_decode_def_string_length() 382 383### Fixed 384 3851. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 3862. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 3873. transport: mctp-demux: Don't test socket for non-zero value 3884. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 3895. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 3906. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 3917. abi: Update to remove pldm_close() from reference dumps 3928. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 393 394## [0.3.0] - 2023-06-23 395 396### Added 397 3981. Add encode/decode pldmMessagePollEvent data 3992. README: Add a section on working with libpldm 4003. pdr: Introduce remote_container_id and associated APIs 4014. pdr: Add APIs for creating and locating remote PDRs 4025. pdr: Add pldm_pdr_find_last_in_range() 4036. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 4047. pdr: Add pldm_pdr_find_container_id_range_exclude() 405 406### Changed 407 4081. include: Move installed transport.h under libpldm/ 4092. libpldm: Explicit deprecated, stable and testing ABI classes 4103. meson: Reduce strength of oem-ibm requirements from enabled to allowed 411 412 The `oem-ibm` feature is now enabled by the default meson configuration, for 413 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 414 recipe: 415 416 <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10> 417 418 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 419 when invoking `meson setup` 420 4214. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 4225. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 423 424### Deprecated 425 4261. bios_table: Deprecate APIs with arguments sanitized using assert() 427 428 C provides enough foot-guns without us encoding them into library APIs. 429 Specifically, deprecate the following in favour of their `*_check()` variants 430 which ensure assertions won't fail or otherwise invoke UB: 431 432 - pldm_bios_table_string_entry_encode() 433 - pldm_bios_table_string_entry_decode_string() 434 - pldm_bios_table_attr_entry_enum_encode() 435 - pldm_bios_table_attr_entry_enum_decode_pv_num() 436 - pldm_bios_table_attr_entry_enum_decode_def_num() 437 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 438 - pldm_bios_table_attr_entry_string_encode() 439 - pldm_bios_table_attr_entry_string_decode_def_string_length() 440 441### Removed 442 4431. libpldm: Remove the requester-api option 444 445### Fixed 446 4471. requester: Make pldm_open() return existing fd 4482. transport: Prevent sticking in waiting for response 4493. transport: Match on response in pldm_transport_send_recv_msg() 4504. requester: Add check before accessing hdr in pldm_recv() 4515. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 452