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 45 46### Changed 47 481. base: Stabilise pldm_msg_hdr_correlate_response() 492. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind() 503. libpldm: Fix header use 514. libpldm: More fixes for header use 525. pdr: Stabilise pldm_pdr_find_last_in_range() API 536. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle() 547. oem: meta: stabilise decode_oem_meta_file_io_req() 558. pdr: pldm_entity_association_tree_copy_root(): Document preconditions 56 57### Deprecated 58 591. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed 60 with `PLDM_OEM_IBM_` 61 62### Fixed 63 641. libpldm: Rationalise the local and installed path of pldm.h 652. pdr: Assign record_handle in entity_association_pdr_add_children() 663. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value() 674. pdr: Remove redundant constant for minimum numeric sensor PDR length 68 69## [0.7.0] - 2023-08-29 70 71### Added 72 731. state-set: Add new enum for Operational Fault Status enum 74 75### Changed 76 771. transport: Match specified metadata in pldm_transport_send_recv_msg() 782. transport: mctp-demux: Drop ABI annotation for internal symbols 793. transport: Stabilise core transport and implementation APIs 80 81 This stabilisation covers the following headers and functions: 82 83 - libpldm/transport.h 84 85 - pldm_transport_poll() 86 - pldm_transport_send_msg() 87 - pldm_transport_recv_msg() 88 - pldm_transport_send_recv_msg() 89 90 - libpldm/transport/af-mctp.h 91 92 - pldm_transport_af_mctp_init() 93 - pldm_transport_af_mctp_destroy() 94 - pldm_transport_af_mctp_core() 95 - pldm_transport_af_mctp_init_pollfd() 96 - pldm_transport_af_mctp_map_tid() 97 - pldm_transport_af_mctp_unmap_tid() 98 99 - libpldm/transport/mctp-demux.h 100 - pldm_transport_mctp_demux_init() 101 - pldm_transport_mctp_demux_destroy() 102 - pldm_transport_mctp_demux_core() 103 - pldm_transport_mctp_demux_init_pollfd() 104 - pldm_transport_mctp_demux_map_tid() 105 - pldm_transport_mctp_demux_unmap_tid() 106 107### Deprecated 108 1091. All the existing "requester" APIs from `libpldm/pldm.h` (also known as 110 `libpldm/requester/pldm.h`): 111 112 - pldm_open() 113 - pldm_send_recv() 114 - pldm_send() 115 - pldm_recv() 116 - pldm_recv_any() 117 - pldm_close() 118 119 Users should migrate to the newer "transport" APIs instead. 120 121## Fixed 122 1231. tests: Exclude transport tests when build excludes testing ABIs 1242. abi: Capture deprecation of pldm_close() 125 126## [0.6.0] - 2023-08-22 127 128### Changed 129 1301. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity() 1312. meson: Apply `b_ndebug=if-release` by default 1323. pdr : Stabilize pldm_entity_association_tree_add_entity() 1334. pdr: Stabilise pldm_entity_association_tree_find_with_locality() 1345. pdr: Stabilize pldm_entity_node_get_remote_container_id() 1356. transport: af-mctp: Assign out-params on success in \*\_recv() 1367. transport: Generalise the pldm_transport_recv_msg() API 137 138### Removed 139 1401. pdr: Remove pldm_entity_association_pdr_add() 1412. state-set: Remove enum pldm_state_set_operational_fault_status_values 142 143### Fixed 144 1451. transport: register init_pollfd callback for af-mctp 1462. transport: fix init_pollfd function parameter 1473. transport: Fix doxygen and variables for send and recv functions 1484. transport: af-mctp: Ensure malloc() succeeds in \*\_recv() 149 150## [0.5.0] - 2023-08-09 151 152### Added 153 1541. pdr: Introduce pldm_entity_association_pdr_add_check() 155 156### Changed 157 1581. pdr: Allow record_handle to be NULL for pldm_pdr_add_check() 1592. transport: pldm_transport_poll(): Adjust return value semantics 1603. transport: free un-wanted responses in pldm_transport_send_recv_msg() 161 162### Deprecated 163 1641. state-set: Enum pldm_state_set_operational_fault_status_values 165 166 The enum operational_fault_status is defined with wrong members and will 167 eventually be replaced with the correct members. Any uses of 168 pldm_state_set_operational_fault_status_values members should move to 169 equivalent pldm_state_set_operational_stress_status_values members if needed. 170 1712. platform: Struct field name in fru_record_set PDR 172 173 References to entity_instance_num should be changed to entity_instance 174 1753. platform: Struct field name in numeric sensor value PDR 176 177 References to entity_instance_num should be changed to entity_instance 178 179### Removed 180 1811. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 1822. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 1833. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 1844. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 1855. bios_table: Remove pldm_bios_table_append_pad_checksum() 1866. fru: Remove get_fru_record_by_option() 1877. pdr: Make is_present() static 1888. pdr: Remove pldm_pdr_add() 1899. pdr: Remove pldm_pdr_add_fru_record_set() 19010. pdr: Remove pldm_entity_association_pdr_add_from_node() 19111. pdr: Make find_entity_ref_in_tree() static 19212. pdr: Make entity_association_tree_find() static 193 194### Fixed 195 1961. requester: Fix response buffer cast in pldm_send_recv() 1972. pdr: Hoist record handle overflow test to avoid memory leak 1983. transport: Correct comparison in while loop condition 199 200## [0.4.0] - 2023-07-14 201 202### Added 203 2041. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 2052. fru: Introduce get_fru_record_by_option_check() 2063. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 2074. pdr: Introduce pldm_pdr_add_check() 2085. pdr: Introduce pldm_pdr_add_fru_record_set_check() 209 210### Changed 211 2121. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 2132. requester: Expose pldm_close() in header 2143. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 2154. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 2165. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 2176. pdr: pldm_pdr_init(): Return NULL on allocation failure 2187. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 2198. pdr: Document preconditions for trivial accessor functions 220 221 A trivial accessor function is one that exposes properties of an object in a 222 way can't result in an error, beyond passing an invalid argument to the 223 function. For APIs meeting this definition we define a precondition that 224 struct pointers must point to valid objects to avoid polluting the function 225 prototypes. The following APIs now have this precondition explicitly defined: 226 227 - pldm_entity_extract() 228 - pldm_entity_get_parent() 229 - pldm_entity_is_exist_parent() 230 - pldm_entity_is_node_parent() 231 - pldm_is_current_parent_child 232 - pldm_is_empty_entity_assoc_tree() 233 - pldm_pdr_get_record_count() 234 - pldm_pdr_get_record_handle() 235 - pldm_pdr_get_repo_size() 236 - pldm_pdr_record_is_remote() 237 2389. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 23910. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 24011. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 24112. pdr: pldm_entity_association_tree_visit(): Document preconditions 24213. pdr: pldm_entity_association_tree_visit(): Exit early on failure 24314. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 24415. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 24516. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 24617. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 24718. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 24819. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 24920. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 25021. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 25122. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 25223. pdr: pldm_entity_get_num_children(): Don't return invalid values 25324. libpldm: Lift or remove asserts where a subsequent check exists 254 255### Deprecated 256 2571. pldm_bios_table_attr_entry_integer_encode() 258 259 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 260 2612. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 262 263 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 264 2653. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 266 267 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 268 2694. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 270 271 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 272 2735. pdr: Deprecate is_present() 274 275 There should be no users of this symbol. If you are a user, you should figure 276 out how to stop, or get in touch. This symbol will be marked static the 277 release after deprecation. 278 2796. pdr: Deprecate find_entity_ref_in_tree() 280 281 There should be no users of this symbol. If you are a user, you should figure 282 out how to stop, or get in touch. This symbol will be marked static the 283 release after deprecation. 284 2857. pdr: Deprecate entity_association_tree_find() 286 287 There should be no users of this symbol. If you are a user, you should figure 288 out how to stop, or get in touch. This symbol will be marked static the 289 release after deprecation. 290 2918. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 292 293 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 294 pldm_bios_table_append_pad_checksum() should migrate to 295 pldm_bios_table_append_pad_checksum_check() 296 2979. fru: Stabilise get_fru_record_by_option_check() 298 299 get_fru_record_by_option() is deprecated by this change. Users of 300 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 301 30210. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 303 304 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 305 Users of pldm_entity_association_pdr_add_from_node() should migrate to 306 pldm_entity_association_pdr_add_from_node_check() 307 30811. pdr: Stabilise pldm_pdr_add_check() 309 310 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 311 migrate to pldm_pdr_add_check() 312 31312. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 314 315 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 316 pldm_pdr_add_fru_record_set() should migrate to 317 pldm_pdr_add_fru_record_set_check() 318 319### Removed 320 3211. bios_table: Remove deprecated APIs sanitized by assert(): 322 323 - pldm_bios_table_string_entry_encode() 324 - pldm_bios_table_string_entry_decode_string() 325 - pldm_bios_table_attr_entry_enum_encode() 326 - pldm_bios_table_attr_entry_enum_decode_pv_num() 327 - pldm_bios_table_attr_entry_enum_decode_def_num() 328 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 329 - pldm_bios_table_attr_entry_string_encode() 330 - pldm_bios_table_attr_entry_string_decode_def_string_length() 331 332### Fixed 333 3341. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 3352. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 3363. transport: mctp-demux: Don't test socket for non-zero value 3374. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 3385. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 3396. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 3407. abi: Update to remove pldm_close() from reference dumps 3418. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 342 343## [0.3.0] - 2023-06-23 344 345### Added 346 3471. Add encode/decode pldmMessagePollEvent data 3482. README: Add a section on working with libpldm 3493. pdr: Introduce remote_container_id and associated APIs 3504. pdr: Add APIs for creating and locating remote PDRs 3515. pdr: Add pldm_pdr_find_last_in_range() 3526. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 3537. pdr: Add pldm_pdr_find_container_id_range_exclude() 354 355### Changed 356 3571. include: Move installed transport.h under libpldm/ 3582. libpldm: Explicit deprecated, stable and testing ABI classes 3593. meson: Reduce strength of oem-ibm requirements from enabled to allowed 360 361 The `oem-ibm` feature is now enabled by the default meson configuration, for 362 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 363 recipe: 364 365 https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 366 367 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 368 when invoking `meson setup` 369 3704. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 3715. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 372 373### Deprecated 374 3751. bios_table: Deprecate APIs with arguments sanitized using assert() 376 377 C provides enough foot-guns without us encoding them into library APIs. 378 Specifically, deprecate the following in favour of their `*_check()` variants 379 which ensure assertions won't fail or otherwise invoke UB: 380 381 - pldm_bios_table_string_entry_encode() 382 - pldm_bios_table_string_entry_decode_string() 383 - pldm_bios_table_attr_entry_enum_encode() 384 - pldm_bios_table_attr_entry_enum_decode_pv_num() 385 - pldm_bios_table_attr_entry_enum_decode_def_num() 386 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 387 - pldm_bios_table_attr_entry_string_encode() 388 - pldm_bios_table_attr_entry_string_decode_def_string_length() 389 390### Removed 391 3921. libpldm: Remove the requester-api option 393 394### Fixed 395 3961. requester: Make pldm_open() return existing fd 3972. transport: Prevent sticking in waiting for response 3983. transport: Match on response in pldm_transport_send_recv_msg() 3994. requester: Add check before accessing hdr in pldm_recv() 4005. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 401