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 33 34### Deprecated 35 361. fru: Deprecate `get_fru_record_by_option_check()` 37 38 Users should switch to `get_fru_record_by_option()`. Migration can be 39 performed using the [Coccinelle semantic patch][coccinelle] 40 `get_fru_record_by_option_check.cocci`: 41 42 ``` 43 $ spatch \ 44 --sp-file=${LIBPLDM_DIR}/evolutions/current/get_fru_record_by_option_check.cocci \ 45 --in-place \ 46 $(git ls-files | grep -E '\.[ch](pp)?') 47 ``` 48 49[coccinelle]: https://coccinelle.gitlabpages.inria.fr/website/ 50 51### Removed 52 531. IBM OEM header compatibility symlinks. 54 55 Anyone left using the deprecated paths can migrate using the coccinelle patch 56 at `evolutions/current/oem-ibm-header-compat.cocci`. 57 58### Fixed 59 601. requester: instance-id: Release read lock on conflict 61 62## [0.8.0] - 2024-05-23 63 64### Added 65 661. base: Provide pldm_msg_hdr_correlate_response() 672. transport: af-mctp: Add pldm_transport_af_mctp_bind() 683. oem: ibm: Add chapdata file type support 694. base: Added PLDM_SMBIOS & PLDM_RDE message types 705. oem: meta: Add decode_oem_meta_file_io_req() 716. state-set: Add all state set values to system power state enum as per DSP0249 727. platform: Add alias members to the enum 73 pldm_pdr_repository_chg_event_change_record_event_data_operation. 74 75 enum constants with inconsistent names are deprecated with this change. 76 remove old inconsistent enum members after backward compatibility cleanup is 77 done 78 798. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*` 809. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type 8110. platform: Add 3 PDR type enum for Redfish Device Enablement per 82 DSP0248_1.2.0 8311. state_set: Add CONNECTED and DISCONNECTED enum for Link State set 8412. entity: Add enum for Network Interface Connectors and Network Ports 85 Connection Types 8613. pdr: Add decode_numeric_effecter_pdr_data() 8714. oem: ibm: Support for the Real SAI entity id 8815. fw_update: Add encode req & decode resp for query_downstream_devices 8916. fw_update: Add encode req & decode resp for query_downstream_identifiers 9017. platform: Add support for GetStateEffecterStates command 91 92### Changed 93 941. base: Stabilise pldm_msg_hdr_correlate_response() 952. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind() 963. libpldm: Fix header use 974. libpldm: More fixes for header use 985. pdr: Stabilise pldm_pdr_find_last_in_range() API 996. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle() 1007. oem: meta: stabilise decode_oem_meta_file_io_req() 1018. pdr: pldm_entity_association_tree_copy_root(): Document preconditions 102 103### Deprecated 104 1051. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed 106 with `PLDM_OEM_IBM_` 107 108### Fixed 109 1101. libpldm: Rationalise the local and installed path of pldm.h 1112. pdr: Assign record_handle in entity_association_pdr_add_children() 1123. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value() 1134. pdr: Remove redundant constant for minimum numeric sensor PDR length 1145. tests: oem: meta: Fix fileio use of msgbuf 115 116## [0.7.0] - 2023-08-29 117 118### Added 119 1201. state-set: Add new enum for Operational Fault Status enum 121 122### Changed 123 1241. transport: Match specified metadata in pldm_transport_send_recv_msg() 1252. transport: mctp-demux: Drop ABI annotation for internal symbols 1263. transport: Stabilise core transport and implementation APIs 127 128 This stabilisation covers the following headers and functions: 129 130 - libpldm/transport.h 131 132 - pldm_transport_poll() 133 - pldm_transport_send_msg() 134 - pldm_transport_recv_msg() 135 - pldm_transport_send_recv_msg() 136 137 - libpldm/transport/af-mctp.h 138 139 - pldm_transport_af_mctp_init() 140 - pldm_transport_af_mctp_destroy() 141 - pldm_transport_af_mctp_core() 142 - pldm_transport_af_mctp_init_pollfd() 143 - pldm_transport_af_mctp_map_tid() 144 - pldm_transport_af_mctp_unmap_tid() 145 146 - libpldm/transport/mctp-demux.h 147 - pldm_transport_mctp_demux_init() 148 - pldm_transport_mctp_demux_destroy() 149 - pldm_transport_mctp_demux_core() 150 - pldm_transport_mctp_demux_init_pollfd() 151 - pldm_transport_mctp_demux_map_tid() 152 - pldm_transport_mctp_demux_unmap_tid() 153 154### Deprecated 155 1561. All the existing "requester" APIs from `libpldm/pldm.h` (also known as 157 `libpldm/requester/pldm.h`): 158 159 - pldm_open() 160 - pldm_send_recv() 161 - pldm_send() 162 - pldm_recv() 163 - pldm_recv_any() 164 - pldm_close() 165 166 Users should migrate to the newer "transport" APIs instead. 167 168## Fixed 169 1701. tests: Exclude transport tests when build excludes testing ABIs 1712. abi: Capture deprecation of pldm_close() 172 173## [0.6.0] - 2023-08-22 174 175### Changed 176 1771. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity() 1782. meson: Apply `b_ndebug=if-release` by default 1793. pdr : Stabilize pldm_entity_association_tree_add_entity() 1804. pdr: Stabilise pldm_entity_association_tree_find_with_locality() 1815. pdr: Stabilize pldm_entity_node_get_remote_container_id() 1826. transport: af-mctp: Assign out-params on success in \*\_recv() 1837. transport: Generalise the pldm_transport_recv_msg() API 184 185### Removed 186 1871. pdr: Remove pldm_entity_association_pdr_add() 1882. state-set: Remove enum pldm_state_set_operational_fault_status_values 189 190### Fixed 191 1921. transport: register init_pollfd callback for af-mctp 1932. transport: fix init_pollfd function parameter 1943. transport: Fix doxygen and variables for send and recv functions 1954. transport: af-mctp: Ensure malloc() succeeds in \*\_recv() 196 197## [0.5.0] - 2023-08-09 198 199### Added 200 2011. pdr: Introduce pldm_entity_association_pdr_add_check() 202 203### Changed 204 2051. pdr: Allow record_handle to be NULL for pldm_pdr_add_check() 2062. transport: pldm_transport_poll(): Adjust return value semantics 2073. transport: free un-wanted responses in pldm_transport_send_recv_msg() 208 209### Deprecated 210 2111. state-set: Enum pldm_state_set_operational_fault_status_values 212 213 The enum operational_fault_status is defined with wrong members and will 214 eventually be replaced with the correct members. Any uses of 215 pldm_state_set_operational_fault_status_values members should move to 216 equivalent pldm_state_set_operational_stress_status_values members if needed. 217 2182. platform: Struct field name in fru_record_set PDR 219 220 References to entity_instance_num should be changed to entity_instance 221 2223. platform: Struct field name in numeric sensor value PDR 223 224 References to entity_instance_num should be changed to entity_instance 225 226### Removed 227 2281. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 2292. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 2303. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 2314. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 2325. bios_table: Remove pldm_bios_table_append_pad_checksum() 2336. fru: Remove get_fru_record_by_option() 2347. pdr: Make is_present() static 2358. pdr: Remove pldm_pdr_add() 2369. pdr: Remove pldm_pdr_add_fru_record_set() 23710. pdr: Remove pldm_entity_association_pdr_add_from_node() 23811. pdr: Make find_entity_ref_in_tree() static 23912. pdr: Make entity_association_tree_find() static 240 241### Fixed 242 2431. requester: Fix response buffer cast in pldm_send_recv() 2442. pdr: Hoist record handle overflow test to avoid memory leak 2453. transport: Correct comparison in while loop condition 246 247## [0.4.0] - 2023-07-14 248 249### Added 250 2511. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 2522. fru: Introduce get_fru_record_by_option_check() 2533. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 2544. pdr: Introduce pldm_pdr_add_check() 2555. pdr: Introduce pldm_pdr_add_fru_record_set_check() 256 257### Changed 258 2591. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 2602. requester: Expose pldm_close() in header 2613. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 2624. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 2635. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 2646. pdr: pldm_pdr_init(): Return NULL on allocation failure 2657. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 2668. pdr: Document preconditions for trivial accessor functions 267 268 A trivial accessor function is one that exposes properties of an object in a 269 way can't result in an error, beyond passing an invalid argument to the 270 function. For APIs meeting this definition we define a precondition that 271 struct pointers must point to valid objects to avoid polluting the function 272 prototypes. The following APIs now have this precondition explicitly defined: 273 274 - pldm_entity_extract() 275 - pldm_entity_get_parent() 276 - pldm_entity_is_exist_parent() 277 - pldm_entity_is_node_parent() 278 - pldm_is_current_parent_child 279 - pldm_is_empty_entity_assoc_tree() 280 - pldm_pdr_get_record_count() 281 - pldm_pdr_get_record_handle() 282 - pldm_pdr_get_repo_size() 283 - pldm_pdr_record_is_remote() 284 2859. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 28610. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 28711. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 28812. pdr: pldm_entity_association_tree_visit(): Document preconditions 28913. pdr: pldm_entity_association_tree_visit(): Exit early on failure 29014. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 29115. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 29216. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 29317. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 29418. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 29519. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 29620. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 29721. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 29822. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 29923. pdr: pldm_entity_get_num_children(): Don't return invalid values 30024. libpldm: Lift or remove asserts where a subsequent check exists 301 302### Deprecated 303 3041. pldm_bios_table_attr_entry_integer_encode() 305 306 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 307 3082. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 309 310 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 311 3123. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 313 314 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 315 3164. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 317 318 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 319 3205. pdr: Deprecate is_present() 321 322 There should be no users of this symbol. If you are a user, you should figure 323 out how to stop, or get in touch. This symbol will be marked static the 324 release after deprecation. 325 3266. pdr: Deprecate find_entity_ref_in_tree() 327 328 There should be no users of this symbol. If you are a user, you should figure 329 out how to stop, or get in touch. This symbol will be marked static the 330 release after deprecation. 331 3327. pdr: Deprecate entity_association_tree_find() 333 334 There should be no users of this symbol. If you are a user, you should figure 335 out how to stop, or get in touch. This symbol will be marked static the 336 release after deprecation. 337 3388. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 339 340 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 341 pldm_bios_table_append_pad_checksum() should migrate to 342 pldm_bios_table_append_pad_checksum_check() 343 3449. fru: Stabilise get_fru_record_by_option_check() 345 346 get_fru_record_by_option() is deprecated by this change. Users of 347 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 348 34910. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 350 351 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 352 Users of pldm_entity_association_pdr_add_from_node() should migrate to 353 pldm_entity_association_pdr_add_from_node_check() 354 35511. pdr: Stabilise pldm_pdr_add_check() 356 357 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 358 migrate to pldm_pdr_add_check() 359 36012. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 361 362 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 363 pldm_pdr_add_fru_record_set() should migrate to 364 pldm_pdr_add_fru_record_set_check() 365 366### Removed 367 3681. bios_table: Remove deprecated APIs sanitized by assert(): 369 370 - pldm_bios_table_string_entry_encode() 371 - pldm_bios_table_string_entry_decode_string() 372 - pldm_bios_table_attr_entry_enum_encode() 373 - pldm_bios_table_attr_entry_enum_decode_pv_num() 374 - pldm_bios_table_attr_entry_enum_decode_def_num() 375 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 376 - pldm_bios_table_attr_entry_string_encode() 377 - pldm_bios_table_attr_entry_string_decode_def_string_length() 378 379### Fixed 380 3811. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 3822. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 3833. transport: mctp-demux: Don't test socket for non-zero value 3844. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 3855. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 3866. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 3877. abi: Update to remove pldm_close() from reference dumps 3888. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 389 390## [0.3.0] - 2023-06-23 391 392### Added 393 3941. Add encode/decode pldmMessagePollEvent data 3952. README: Add a section on working with libpldm 3963. pdr: Introduce remote_container_id and associated APIs 3974. pdr: Add APIs for creating and locating remote PDRs 3985. pdr: Add pldm_pdr_find_last_in_range() 3996. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 4007. pdr: Add pldm_pdr_find_container_id_range_exclude() 401 402### Changed 403 4041. include: Move installed transport.h under libpldm/ 4052. libpldm: Explicit deprecated, stable and testing ABI classes 4063. meson: Reduce strength of oem-ibm requirements from enabled to allowed 407 408 The `oem-ibm` feature is now enabled by the default meson configuration, for 409 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 410 recipe: 411 412 https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 413 414 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 415 when invoking `meson setup` 416 4174. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 4185. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 419 420### Deprecated 421 4221. bios_table: Deprecate APIs with arguments sanitized using assert() 423 424 C provides enough foot-guns without us encoding them into library APIs. 425 Specifically, deprecate the following in favour of their `*_check()` variants 426 which ensure assertions won't fail or otherwise invoke UB: 427 428 - pldm_bios_table_string_entry_encode() 429 - pldm_bios_table_string_entry_decode_string() 430 - pldm_bios_table_attr_entry_enum_encode() 431 - pldm_bios_table_attr_entry_enum_decode_pv_num() 432 - pldm_bios_table_attr_entry_enum_decode_def_num() 433 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 434 - pldm_bios_table_attr_entry_string_encode() 435 - pldm_bios_table_attr_entry_string_decode_def_string_length() 436 437### Removed 438 4391. libpldm: Remove the requester-api option 440 441### Fixed 442 4431. requester: Make pldm_open() return existing fd 4442. transport: Prevent sticking in waiting for response 4453. transport: Match on response in pldm_transport_send_recv_msg() 4464. requester: Add check before accessing hdr in pldm_recv() 4475. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 448