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: Provide pldm_msg_hdr_correlate_response() 232. transport: af-mctp: Add pldm_transport_af_mctp_bind() 243. oem: ibm: Add chapdata file type support 254. base: Added PLDM_SMBIOS & PLDM_RDE message types 265. oem: meta: Add decode_oem_meta_file_io_req() 276. state-set: Add all state set values to system power state enum as per DSP0249 287. platform: Add alias members to the enum 29 pldm_pdr_repository_chg_event_change_record_event_data_operation. 30 31 enum constants with inconsistent names are deprecated with this change. 32 remove old inconsistent enum members after backward compatibility cleanup is 33 done 34 358. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*` 369. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type 3710. platform: Add 3 PDR type enum for Redfish Device Enablement per 38 DSP0248_1.2.0 3911. state_set: Add CONNECTED and DISCONNECTED enum for Link State set 4012. entity: Add enum for Network Interface Connectors and Network Ports 41 Connection Types 4213. pdr: Add decode_numeric_effecter_pdr_data() 4314. oem: ibm: Support for the Real SAI entity id 4415. fw_update: Add encode req & decode resp for query_downstream_devices 4516. fw_update: Add encode req & decode resp for query_downstream_identifiers 46 47### Changed 48 491. base: Stabilise pldm_msg_hdr_correlate_response() 502. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind() 513. libpldm: Fix header use 524. libpldm: More fixes for header use 535. pdr: Stabilise pldm_pdr_find_last_in_range() API 546. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle() 557. oem: meta: stabilise decode_oem_meta_file_io_req() 568. pdr: pldm_entity_association_tree_copy_root(): Document preconditions 57 58### Deprecated 59 601. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed 61 with `PLDM_OEM_IBM_` 62 63### Fixed 64 651. libpldm: Rationalise the local and installed path of pldm.h 662. pdr: Assign record_handle in entity_association_pdr_add_children() 673. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value() 684. pdr: Remove redundant constant for minimum numeric sensor PDR length 695. tests: oem: meta: Fix fileio use of msgbuf 70 71## [0.7.0] - 2023-08-29 72 73### Added 74 751. state-set: Add new enum for Operational Fault Status enum 76 77### Changed 78 791. transport: Match specified metadata in pldm_transport_send_recv_msg() 802. transport: mctp-demux: Drop ABI annotation for internal symbols 813. transport: Stabilise core transport and implementation APIs 82 83 This stabilisation covers the following headers and functions: 84 85 - libpldm/transport.h 86 87 - pldm_transport_poll() 88 - pldm_transport_send_msg() 89 - pldm_transport_recv_msg() 90 - pldm_transport_send_recv_msg() 91 92 - libpldm/transport/af-mctp.h 93 94 - pldm_transport_af_mctp_init() 95 - pldm_transport_af_mctp_destroy() 96 - pldm_transport_af_mctp_core() 97 - pldm_transport_af_mctp_init_pollfd() 98 - pldm_transport_af_mctp_map_tid() 99 - pldm_transport_af_mctp_unmap_tid() 100 101 - libpldm/transport/mctp-demux.h 102 - pldm_transport_mctp_demux_init() 103 - pldm_transport_mctp_demux_destroy() 104 - pldm_transport_mctp_demux_core() 105 - pldm_transport_mctp_demux_init_pollfd() 106 - pldm_transport_mctp_demux_map_tid() 107 - pldm_transport_mctp_demux_unmap_tid() 108 109### Deprecated 110 1111. All the existing "requester" APIs from `libpldm/pldm.h` (also known as 112 `libpldm/requester/pldm.h`): 113 114 - pldm_open() 115 - pldm_send_recv() 116 - pldm_send() 117 - pldm_recv() 118 - pldm_recv_any() 119 - pldm_close() 120 121 Users should migrate to the newer "transport" APIs instead. 122 123## Fixed 124 1251. tests: Exclude transport tests when build excludes testing ABIs 1262. abi: Capture deprecation of pldm_close() 127 128## [0.6.0] - 2023-08-22 129 130### Changed 131 1321. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity() 1332. meson: Apply `b_ndebug=if-release` by default 1343. pdr : Stabilize pldm_entity_association_tree_add_entity() 1354. pdr: Stabilise pldm_entity_association_tree_find_with_locality() 1365. pdr: Stabilize pldm_entity_node_get_remote_container_id() 1376. transport: af-mctp: Assign out-params on success in \*\_recv() 1387. transport: Generalise the pldm_transport_recv_msg() API 139 140### Removed 141 1421. pdr: Remove pldm_entity_association_pdr_add() 1432. state-set: Remove enum pldm_state_set_operational_fault_status_values 144 145### Fixed 146 1471. transport: register init_pollfd callback for af-mctp 1482. transport: fix init_pollfd function parameter 1493. transport: Fix doxygen and variables for send and recv functions 1504. transport: af-mctp: Ensure malloc() succeeds in \*\_recv() 151 152## [0.5.0] - 2023-08-09 153 154### Added 155 1561. pdr: Introduce pldm_entity_association_pdr_add_check() 157 158### Changed 159 1601. pdr: Allow record_handle to be NULL for pldm_pdr_add_check() 1612. transport: pldm_transport_poll(): Adjust return value semantics 1623. transport: free un-wanted responses in pldm_transport_send_recv_msg() 163 164### Deprecated 165 1661. state-set: Enum pldm_state_set_operational_fault_status_values 167 168 The enum operational_fault_status is defined with wrong members and will 169 eventually be replaced with the correct members. Any uses of 170 pldm_state_set_operational_fault_status_values members should move to 171 equivalent pldm_state_set_operational_stress_status_values members if needed. 172 1732. platform: Struct field name in fru_record_set PDR 174 175 References to entity_instance_num should be changed to entity_instance 176 1773. platform: Struct field name in numeric sensor value PDR 178 179 References to entity_instance_num should be changed to entity_instance 180 181### Removed 182 1831. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 1842. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 1853. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 1864. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 1875. bios_table: Remove pldm_bios_table_append_pad_checksum() 1886. fru: Remove get_fru_record_by_option() 1897. pdr: Make is_present() static 1908. pdr: Remove pldm_pdr_add() 1919. pdr: Remove pldm_pdr_add_fru_record_set() 19210. pdr: Remove pldm_entity_association_pdr_add_from_node() 19311. pdr: Make find_entity_ref_in_tree() static 19412. pdr: Make entity_association_tree_find() static 195 196### Fixed 197 1981. requester: Fix response buffer cast in pldm_send_recv() 1992. pdr: Hoist record handle overflow test to avoid memory leak 2003. transport: Correct comparison in while loop condition 201 202## [0.4.0] - 2023-07-14 203 204### Added 205 2061. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 2072. fru: Introduce get_fru_record_by_option_check() 2083. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 2094. pdr: Introduce pldm_pdr_add_check() 2105. pdr: Introduce pldm_pdr_add_fru_record_set_check() 211 212### Changed 213 2141. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 2152. requester: Expose pldm_close() in header 2163. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 2174. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 2185. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 2196. pdr: pldm_pdr_init(): Return NULL on allocation failure 2207. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 2218. pdr: Document preconditions for trivial accessor functions 222 223 A trivial accessor function is one that exposes properties of an object in a 224 way can't result in an error, beyond passing an invalid argument to the 225 function. For APIs meeting this definition we define a precondition that 226 struct pointers must point to valid objects to avoid polluting the function 227 prototypes. The following APIs now have this precondition explicitly defined: 228 229 - pldm_entity_extract() 230 - pldm_entity_get_parent() 231 - pldm_entity_is_exist_parent() 232 - pldm_entity_is_node_parent() 233 - pldm_is_current_parent_child 234 - pldm_is_empty_entity_assoc_tree() 235 - pldm_pdr_get_record_count() 236 - pldm_pdr_get_record_handle() 237 - pldm_pdr_get_repo_size() 238 - pldm_pdr_record_is_remote() 239 2409. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 24110. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 24211. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 24312. pdr: pldm_entity_association_tree_visit(): Document preconditions 24413. pdr: pldm_entity_association_tree_visit(): Exit early on failure 24514. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 24615. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 24716. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 24817. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 24918. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 25019. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 25120. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 25221. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 25322. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 25423. pdr: pldm_entity_get_num_children(): Don't return invalid values 25524. libpldm: Lift or remove asserts where a subsequent check exists 256 257### Deprecated 258 2591. pldm_bios_table_attr_entry_integer_encode() 260 261 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 262 2632. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 264 265 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 266 2673. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 268 269 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 270 2714. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 272 273 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 274 2755. pdr: Deprecate is_present() 276 277 There should be no users of this symbol. If you are a user, you should figure 278 out how to stop, or get in touch. This symbol will be marked static the 279 release after deprecation. 280 2816. pdr: Deprecate find_entity_ref_in_tree() 282 283 There should be no users of this symbol. If you are a user, you should figure 284 out how to stop, or get in touch. This symbol will be marked static the 285 release after deprecation. 286 2877. pdr: Deprecate entity_association_tree_find() 288 289 There should be no users of this symbol. If you are a user, you should figure 290 out how to stop, or get in touch. This symbol will be marked static the 291 release after deprecation. 292 2938. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 294 295 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 296 pldm_bios_table_append_pad_checksum() should migrate to 297 pldm_bios_table_append_pad_checksum_check() 298 2999. fru: Stabilise get_fru_record_by_option_check() 300 301 get_fru_record_by_option() is deprecated by this change. Users of 302 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 303 30410. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 305 306 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 307 Users of pldm_entity_association_pdr_add_from_node() should migrate to 308 pldm_entity_association_pdr_add_from_node_check() 309 31011. pdr: Stabilise pldm_pdr_add_check() 311 312 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 313 migrate to pldm_pdr_add_check() 314 31512. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 316 317 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 318 pldm_pdr_add_fru_record_set() should migrate to 319 pldm_pdr_add_fru_record_set_check() 320 321### Removed 322 3231. bios_table: Remove deprecated APIs sanitized by assert(): 324 325 - pldm_bios_table_string_entry_encode() 326 - pldm_bios_table_string_entry_decode_string() 327 - pldm_bios_table_attr_entry_enum_encode() 328 - pldm_bios_table_attr_entry_enum_decode_pv_num() 329 - pldm_bios_table_attr_entry_enum_decode_def_num() 330 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 331 - pldm_bios_table_attr_entry_string_encode() 332 - pldm_bios_table_attr_entry_string_decode_def_string_length() 333 334### Fixed 335 3361. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 3372. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 3383. transport: mctp-demux: Don't test socket for non-zero value 3394. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 3405. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 3416. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 3427. abi: Update to remove pldm_close() from reference dumps 3438. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 344 345## [0.3.0] - 2023-06-23 346 347### Added 348 3491. Add encode/decode pldmMessagePollEvent data 3502. README: Add a section on working with libpldm 3513. pdr: Introduce remote_container_id and associated APIs 3524. pdr: Add APIs for creating and locating remote PDRs 3535. pdr: Add pldm_pdr_find_last_in_range() 3546. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 3557. pdr: Add pldm_pdr_find_container_id_range_exclude() 356 357### Changed 358 3591. include: Move installed transport.h under libpldm/ 3602. libpldm: Explicit deprecated, stable and testing ABI classes 3613. meson: Reduce strength of oem-ibm requirements from enabled to allowed 362 363 The `oem-ibm` feature is now enabled by the default meson configuration, for 364 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 365 recipe: 366 367 https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 368 369 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 370 when invoking `meson setup` 371 3724. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 3735. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 374 375### Deprecated 376 3771. bios_table: Deprecate APIs with arguments sanitized using assert() 378 379 C provides enough foot-guns without us encoding them into library APIs. 380 Specifically, deprecate the following in favour of their `*_check()` variants 381 which ensure assertions won't fail or otherwise invoke UB: 382 383 - pldm_bios_table_string_entry_encode() 384 - pldm_bios_table_string_entry_decode_string() 385 - pldm_bios_table_attr_entry_enum_encode() 386 - pldm_bios_table_attr_entry_enum_decode_pv_num() 387 - pldm_bios_table_attr_entry_enum_decode_def_num() 388 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 389 - pldm_bios_table_attr_entry_string_encode() 390 - pldm_bios_table_attr_entry_string_decode_def_string_length() 391 392### Removed 393 3941. libpldm: Remove the requester-api option 395 396### Fixed 397 3981. requester: Make pldm_open() return existing fd 3992. transport: Prevent sticking in waiting for response 4003. transport: Match on response in pldm_transport_send_recv_msg() 4014. requester: Add check before accessing hdr in pldm_recv() 4025. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 403