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. fru: Deprecate `get_fru_record_by_option_check()` 39 40 Users should switch to `get_fru_record_by_option()`. Migration can be 41 performed using the [Coccinelle semantic patch][coccinelle] 42 `get_fru_record_by_option_check.cocci`: 43 44 ``` 45 $ spatch \ 46 --sp-file=${LIBPLDM_DIR}/evolutions/current/get_fru_record_by_option_check.cocci \ 47 --in-place \ 48 $(git ls-files | grep -E '\.[ch](pp)?') 49 ``` 50 51[coccinelle]: https://coccinelle.gitlabpages.inria.fr/website/ 52 53### Removed 54 551. IBM OEM header compatibility symlinks. 56 57 Anyone left using the deprecated paths can migrate using the coccinelle patch 58 at `evolutions/current/oem-ibm-header-compat.cocci`. 59 60### Fixed 61 621. requester: instance-id: Release read lock on conflict 63 64## [0.8.0] - 2024-05-23 65 66### Added 67 681. base: Provide pldm_msg_hdr_correlate_response() 692. transport: af-mctp: Add pldm_transport_af_mctp_bind() 703. oem: ibm: Add chapdata file type support 714. base: Added PLDM_SMBIOS & PLDM_RDE message types 725. oem: meta: Add decode_oem_meta_file_io_req() 736. state-set: Add all state set values to system power state enum as per DSP0249 747. platform: Add alias members to the enum 75 pldm_pdr_repository_chg_event_change_record_event_data_operation. 76 77 enum constants with inconsistent names are deprecated with this change. 78 remove old inconsistent enum members after backward compatibility cleanup is 79 done 80 818. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*` 829. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type 8310. platform: Add 3 PDR type enum for Redfish Device Enablement per 84 DSP0248_1.2.0 8511. state_set: Add CONNECTED and DISCONNECTED enum for Link State set 8612. entity: Add enum for Network Interface Connectors and Network Ports 87 Connection Types 8813. pdr: Add decode_numeric_effecter_pdr_data() 8914. oem: ibm: Support for the Real SAI entity id 9015. fw_update: Add encode req & decode resp for query_downstream_devices 9116. fw_update: Add encode req & decode resp for query_downstream_identifiers 9217. platform: Add support for GetStateEffecterStates command 93 94### Changed 95 961. base: Stabilise pldm_msg_hdr_correlate_response() 972. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind() 983. libpldm: Fix header use 994. libpldm: More fixes for header use 1005. pdr: Stabilise pldm_pdr_find_last_in_range() API 1016. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle() 1027. oem: meta: stabilise decode_oem_meta_file_io_req() 1038. pdr: pldm_entity_association_tree_copy_root(): Document preconditions 104 105### Deprecated 106 1071. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed 108 with `PLDM_OEM_IBM_` 109 110### Fixed 111 1121. libpldm: Rationalise the local and installed path of pldm.h 1132. pdr: Assign record_handle in entity_association_pdr_add_children() 1143. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value() 1154. pdr: Remove redundant constant for minimum numeric sensor PDR length 1165. tests: oem: meta: Fix fileio use of msgbuf 117 118## [0.7.0] - 2023-08-29 119 120### Added 121 1221. state-set: Add new enum for Operational Fault Status enum 123 124### Changed 125 1261. transport: Match specified metadata in pldm_transport_send_recv_msg() 1272. transport: mctp-demux: Drop ABI annotation for internal symbols 1283. transport: Stabilise core transport and implementation APIs 129 130 This stabilisation covers the following headers and functions: 131 132 - libpldm/transport.h 133 134 - pldm_transport_poll() 135 - pldm_transport_send_msg() 136 - pldm_transport_recv_msg() 137 - pldm_transport_send_recv_msg() 138 139 - libpldm/transport/af-mctp.h 140 141 - pldm_transport_af_mctp_init() 142 - pldm_transport_af_mctp_destroy() 143 - pldm_transport_af_mctp_core() 144 - pldm_transport_af_mctp_init_pollfd() 145 - pldm_transport_af_mctp_map_tid() 146 - pldm_transport_af_mctp_unmap_tid() 147 148 - libpldm/transport/mctp-demux.h 149 - pldm_transport_mctp_demux_init() 150 - pldm_transport_mctp_demux_destroy() 151 - pldm_transport_mctp_demux_core() 152 - pldm_transport_mctp_demux_init_pollfd() 153 - pldm_transport_mctp_demux_map_tid() 154 - pldm_transport_mctp_demux_unmap_tid() 155 156### Deprecated 157 1581. All the existing "requester" APIs from `libpldm/pldm.h` (also known as 159 `libpldm/requester/pldm.h`): 160 161 - pldm_open() 162 - pldm_send_recv() 163 - pldm_send() 164 - pldm_recv() 165 - pldm_recv_any() 166 - pldm_close() 167 168 Users should migrate to the newer "transport" APIs instead. 169 170## Fixed 171 1721. tests: Exclude transport tests when build excludes testing ABIs 1732. abi: Capture deprecation of pldm_close() 174 175## [0.6.0] - 2023-08-22 176 177### Changed 178 1791. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity() 1802. meson: Apply `b_ndebug=if-release` by default 1813. pdr : Stabilize pldm_entity_association_tree_add_entity() 1824. pdr: Stabilise pldm_entity_association_tree_find_with_locality() 1835. pdr: Stabilize pldm_entity_node_get_remote_container_id() 1846. transport: af-mctp: Assign out-params on success in \*\_recv() 1857. transport: Generalise the pldm_transport_recv_msg() API 186 187### Removed 188 1891. pdr: Remove pldm_entity_association_pdr_add() 1902. state-set: Remove enum pldm_state_set_operational_fault_status_values 191 192### Fixed 193 1941. transport: register init_pollfd callback for af-mctp 1952. transport: fix init_pollfd function parameter 1963. transport: Fix doxygen and variables for send and recv functions 1974. transport: af-mctp: Ensure malloc() succeeds in \*\_recv() 198 199## [0.5.0] - 2023-08-09 200 201### Added 202 2031. pdr: Introduce pldm_entity_association_pdr_add_check() 204 205### Changed 206 2071. pdr: Allow record_handle to be NULL for pldm_pdr_add_check() 2082. transport: pldm_transport_poll(): Adjust return value semantics 2093. transport: free un-wanted responses in pldm_transport_send_recv_msg() 210 211### Deprecated 212 2131. state-set: Enum pldm_state_set_operational_fault_status_values 214 215 The enum operational_fault_status is defined with wrong members and will 216 eventually be replaced with the correct members. Any uses of 217 pldm_state_set_operational_fault_status_values members should move to 218 equivalent pldm_state_set_operational_stress_status_values members if needed. 219 2202. platform: Struct field name in fru_record_set PDR 221 222 References to entity_instance_num should be changed to entity_instance 223 2243. platform: Struct field name in numeric sensor value PDR 225 226 References to entity_instance_num should be changed to entity_instance 227 228### Removed 229 2301. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 2312. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 2323. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 2334. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 2345. bios_table: Remove pldm_bios_table_append_pad_checksum() 2356. fru: Remove get_fru_record_by_option() 2367. pdr: Make is_present() static 2378. pdr: Remove pldm_pdr_add() 2389. pdr: Remove pldm_pdr_add_fru_record_set() 23910. pdr: Remove pldm_entity_association_pdr_add_from_node() 24011. pdr: Make find_entity_ref_in_tree() static 24112. pdr: Make entity_association_tree_find() static 242 243### Fixed 244 2451. requester: Fix response buffer cast in pldm_send_recv() 2462. pdr: Hoist record handle overflow test to avoid memory leak 2473. transport: Correct comparison in while loop condition 248 249## [0.4.0] - 2023-07-14 250 251### Added 252 2531. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 2542. fru: Introduce get_fru_record_by_option_check() 2553. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 2564. pdr: Introduce pldm_pdr_add_check() 2575. pdr: Introduce pldm_pdr_add_fru_record_set_check() 258 259### Changed 260 2611. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 2622. requester: Expose pldm_close() in header 2633. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 2644. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 2655. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 2666. pdr: pldm_pdr_init(): Return NULL on allocation failure 2677. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 2688. pdr: Document preconditions for trivial accessor functions 269 270 A trivial accessor function is one that exposes properties of an object in a 271 way can't result in an error, beyond passing an invalid argument to the 272 function. For APIs meeting this definition we define a precondition that 273 struct pointers must point to valid objects to avoid polluting the function 274 prototypes. The following APIs now have this precondition explicitly defined: 275 276 - pldm_entity_extract() 277 - pldm_entity_get_parent() 278 - pldm_entity_is_exist_parent() 279 - pldm_entity_is_node_parent() 280 - pldm_is_current_parent_child 281 - pldm_is_empty_entity_assoc_tree() 282 - pldm_pdr_get_record_count() 283 - pldm_pdr_get_record_handle() 284 - pldm_pdr_get_repo_size() 285 - pldm_pdr_record_is_remote() 286 2879. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 28810. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 28911. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 29012. pdr: pldm_entity_association_tree_visit(): Document preconditions 29113. pdr: pldm_entity_association_tree_visit(): Exit early on failure 29214. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 29315. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 29416. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 29517. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 29618. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 29719. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 29820. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 29921. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 30022. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 30123. pdr: pldm_entity_get_num_children(): Don't return invalid values 30224. libpldm: Lift or remove asserts where a subsequent check exists 303 304### Deprecated 305 3061. pldm_bios_table_attr_entry_integer_encode() 307 308 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 309 3102. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 311 312 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 313 3143. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 315 316 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 317 3184. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 319 320 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 321 3225. pdr: Deprecate is_present() 323 324 There should be no users of this symbol. If you are a user, you should figure 325 out how to stop, or get in touch. This symbol will be marked static the 326 release after deprecation. 327 3286. pdr: Deprecate find_entity_ref_in_tree() 329 330 There should be no users of this symbol. If you are a user, you should figure 331 out how to stop, or get in touch. This symbol will be marked static the 332 release after deprecation. 333 3347. pdr: Deprecate entity_association_tree_find() 335 336 There should be no users of this symbol. If you are a user, you should figure 337 out how to stop, or get in touch. This symbol will be marked static the 338 release after deprecation. 339 3408. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 341 342 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 343 pldm_bios_table_append_pad_checksum() should migrate to 344 pldm_bios_table_append_pad_checksum_check() 345 3469. fru: Stabilise get_fru_record_by_option_check() 347 348 get_fru_record_by_option() is deprecated by this change. Users of 349 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 350 35110. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 352 353 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 354 Users of pldm_entity_association_pdr_add_from_node() should migrate to 355 pldm_entity_association_pdr_add_from_node_check() 356 35711. pdr: Stabilise pldm_pdr_add_check() 358 359 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 360 migrate to pldm_pdr_add_check() 361 36212. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 363 364 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 365 pldm_pdr_add_fru_record_set() should migrate to 366 pldm_pdr_add_fru_record_set_check() 367 368### Removed 369 3701. bios_table: Remove deprecated APIs sanitized by assert(): 371 372 - pldm_bios_table_string_entry_encode() 373 - pldm_bios_table_string_entry_decode_string() 374 - pldm_bios_table_attr_entry_enum_encode() 375 - pldm_bios_table_attr_entry_enum_decode_pv_num() 376 - pldm_bios_table_attr_entry_enum_decode_def_num() 377 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 378 - pldm_bios_table_attr_entry_string_encode() 379 - pldm_bios_table_attr_entry_string_decode_def_string_length() 380 381### Fixed 382 3831. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 3842. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 3853. transport: mctp-demux: Don't test socket for non-zero value 3864. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 3875. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 3886. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 3897. abi: Update to remove pldm_close() from reference dumps 3908. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 391 392## [0.3.0] - 2023-06-23 393 394### Added 395 3961. Add encode/decode pldmMessagePollEvent data 3972. README: Add a section on working with libpldm 3983. pdr: Introduce remote_container_id and associated APIs 3994. pdr: Add APIs for creating and locating remote PDRs 4005. pdr: Add pldm_pdr_find_last_in_range() 4016. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 4027. pdr: Add pldm_pdr_find_container_id_range_exclude() 403 404### Changed 405 4061. include: Move installed transport.h under libpldm/ 4072. libpldm: Explicit deprecated, stable and testing ABI classes 4083. meson: Reduce strength of oem-ibm requirements from enabled to allowed 409 410 The `oem-ibm` feature is now enabled by the default meson configuration, for 411 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 412 recipe: 413 414 https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 415 416 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 417 when invoking `meson setup` 418 4194. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 4205. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 421 422### Deprecated 423 4241. bios_table: Deprecate APIs with arguments sanitized using assert() 425 426 C provides enough foot-guns without us encoding them into library APIs. 427 Specifically, deprecate the following in favour of their `*_check()` variants 428 which ensure assertions won't fail or otherwise invoke UB: 429 430 - pldm_bios_table_string_entry_encode() 431 - pldm_bios_table_string_entry_decode_string() 432 - pldm_bios_table_attr_entry_enum_encode() 433 - pldm_bios_table_attr_entry_enum_decode_pv_num() 434 - pldm_bios_table_attr_entry_enum_decode_def_num() 435 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 436 - pldm_bios_table_attr_entry_string_encode() 437 - pldm_bios_table_attr_entry_string_decode_def_string_length() 438 439### Removed 440 4411. libpldm: Remove the requester-api option 442 443### Fixed 444 4451. requester: Make pldm_open() return existing fd 4462. transport: Prevent sticking in waiting for response 4473. transport: Match on response in pldm_transport_send_recv_msg() 4484. requester: Add check before accessing hdr in pldm_recv() 4495. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 450