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() 27 28### Changed 29 301. base: Stabilise pldm_msg_hdr_correlate_response() 312. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind() 323. libpldm: Fix header use 334. libpldm: More fixes for header use 345. pdr: Stabilise pldm_pdr_find_last_in_range() API 356. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle() 367. oem: meta: stabilise decode_oem_meta_file_io_req() 37 38### Fixed 39 401. libpldm: Rationalise the local and installed path of pldm.h 412. pdr: Assign record_handle in entity_association_pdr_add_children() 42 43## [0.7.0] - 2023-08-29 44 45### Added 46 471. state-set: Add new enum for Operational Fault Status enum 48 49### Changed 50 511. transport: Match specified metadata in pldm_transport_send_recv_msg() 522. transport: mctp-demux: Drop ABI annotation for internal symbols 533. transport: Stabilise core transport and implementation APIs 54 55 This stabilisation covers the following headers and functions: 56 57 - libpldm/transport.h 58 59 - pldm_transport_poll() 60 - pldm_transport_send_msg() 61 - pldm_transport_recv_msg() 62 - pldm_transport_send_recv_msg() 63 64 - libpldm/transport/af-mctp.h 65 66 - pldm_transport_af_mctp_init() 67 - pldm_transport_af_mctp_destroy() 68 - pldm_transport_af_mctp_core() 69 - pldm_transport_af_mctp_init_pollfd() 70 - pldm_transport_af_mctp_map_tid() 71 - pldm_transport_af_mctp_unmap_tid() 72 73 - libpldm/transport/mctp-demux.h 74 - pldm_transport_mctp_demux_init() 75 - pldm_transport_mctp_demux_destroy() 76 - pldm_transport_mctp_demux_core() 77 - pldm_transport_mctp_demux_init_pollfd() 78 - pldm_transport_mctp_demux_map_tid() 79 - pldm_transport_mctp_demux_unmap_tid() 80 81### Deprecated 82 831. All the existing "requester" APIs from `libpldm/pldm.h` (also known as 84 `libpldm/requester/pldm.h`): 85 86 - pldm_open() 87 - pldm_send_recv() 88 - pldm_send() 89 - pldm_recv() 90 - pldm_recv_any() 91 - pldm_close() 92 93 Users should migrate to the newer "transport" APIs instead. 94 95## Fixed 96 971. tests: Exclude transport tests when build excludes testing ABIs 982. abi: Capture deprecation of pldm_close() 99 100## [0.6.0] - 2023-08-22 101 102### Changed 103 1041. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity() 1052. meson: Apply `b_ndebug=if-release` by default 1063. pdr : Stabilize pldm_entity_association_tree_add_entity() 1074. pdr: Stabilise pldm_entity_association_tree_find_with_locality() 1085. pdr: Stabilize pldm_entity_node_get_remote_container_id() 1096. transport: af-mctp: Assign out-params on success in \*\_recv() 1107. transport: Generalise the pldm_transport_recv_msg() API 111 112### Removed 113 1141. pdr: Remove pldm_entity_association_pdr_add() 1152. state-set: Remove enum pldm_state_set_operational_fault_status_values 116 117### Fixed 118 1191. transport: register init_pollfd callback for af-mctp 1202. transport: fix init_pollfd function parameter 1213. transport: Fix doxygen and variables for send and recv functions 1224. transport: af-mctp: Ensure malloc() succeeds in \*\_recv() 123 124## [0.5.0] - 2023-08-09 125 126### Added 127 1281. pdr: Introduce pldm_entity_association_pdr_add_check() 129 130### Changed 131 1321. pdr: Allow record_handle to be NULL for pldm_pdr_add_check() 1332. transport: pldm_transport_poll(): Adjust return value semantics 1343. transport: free un-wanted responses in pldm_transport_send_recv_msg() 135 136### Deprecated 137 1381. state-set: Enum pldm_state_set_operational_fault_status_values 139 140 The enum operational_fault_status is defined with wrong members and will 141 eventually be replaced with the correct members. Any uses of 142 pldm_state_set_operational_fault_status_values members should move to 143 equivalent pldm_state_set_operational_stress_status_values members if needed. 144 1452. platform: Struct field name in fru_record_set PDR 146 147 References to entity_instance_num should be changed to entity_instance 148 1493. platform: Struct field name in numeric sensor value PDR 150 151 References to entity_instance_num should be changed to entity_instance 152 153### Removed 154 1551. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 1562. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 1573. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 1584. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 1595. bios_table: Remove pldm_bios_table_append_pad_checksum() 1606. fru: Remove get_fru_record_by_option() 1617. pdr: Make is_present() static 1628. pdr: Remove pldm_pdr_add() 1639. pdr: Remove pldm_pdr_add_fru_record_set() 16410. pdr: Remove pldm_entity_association_pdr_add_from_node() 16511. pdr: Make find_entity_ref_in_tree() static 16612. pdr: Make entity_association_tree_find() static 167 168### Fixed 169 1701. requester: Fix response buffer cast in pldm_send_recv() 1712. pdr: Hoist record handle overflow test to avoid memory leak 1723. transport: Correct comparison in while loop condition 173 174## [0.4.0] - 2023-07-14 175 176### Added 177 1781. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 1792. fru: Introduce get_fru_record_by_option_check() 1803. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 1814. pdr: Introduce pldm_pdr_add_check() 1825. pdr: Introduce pldm_pdr_add_fru_record_set_check() 183 184### Changed 185 1861. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 1872. requester: Expose pldm_close() in header 1883. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 1894. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 1905. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 1916. pdr: pldm_pdr_init(): Return NULL on allocation failure 1927. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 1938. pdr: Document preconditions for trivial accessor functions 194 195 A trivial accessor function is one that exposes properties of an object in a 196 way can't result in an error, beyond passing an invalid argument to the 197 function. For APIs meeting this definition we define a precondition that 198 struct pointers must point to valid objects to avoid polluting the function 199 prototypes. The following APIs now have this precondition explicitly defined: 200 201 - pldm_entity_extract() 202 - pldm_entity_get_parent() 203 - pldm_entity_is_exist_parent() 204 - pldm_entity_is_node_parent() 205 - pldm_is_current_parent_child 206 - pldm_is_empty_entity_assoc_tree() 207 - pldm_pdr_get_record_count() 208 - pldm_pdr_get_record_handle() 209 - pldm_pdr_get_repo_size() 210 - pldm_pdr_record_is_remote() 211 2129. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 21310. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 21411. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 21512. pdr: pldm_entity_association_tree_visit(): Document preconditions 21613. pdr: pldm_entity_association_tree_visit(): Exit early on failure 21714. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 21815. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 21916. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 22017. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 22118. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 22219. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 22320. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 22421. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 22522. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 22623. pdr: pldm_entity_get_num_children(): Don't return invalid values 22724. libpldm: Lift or remove asserts where a subsequent check exists 228 229### Deprecated 230 2311. pldm_bios_table_attr_entry_integer_encode() 232 233 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 234 2352. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 236 237 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 238 2393. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 240 241 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 242 2434. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 244 245 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 246 2475. pdr: Deprecate is_present() 248 249 There should be no users of this symbol. If you are a user, you should figure 250 out how to stop, or get in touch. This symbol will be marked static the 251 release after deprecation. 252 2536. pdr: Deprecate find_entity_ref_in_tree() 254 255 There should be no users of this symbol. If you are a user, you should figure 256 out how to stop, or get in touch. This symbol will be marked static the 257 release after deprecation. 258 2597. pdr: Deprecate entity_association_tree_find() 260 261 There should be no users of this symbol. If you are a user, you should figure 262 out how to stop, or get in touch. This symbol will be marked static the 263 release after deprecation. 264 2658. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 266 267 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 268 pldm_bios_table_append_pad_checksum() should migrate to 269 pldm_bios_table_append_pad_checksum_check() 270 2719. fru: Stabilise get_fru_record_by_option_check() 272 273 get_fru_record_by_option() is deprecated by this change. Users of 274 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 275 27610. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 277 278 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 279 Users of pldm_entity_association_pdr_add_from_node() should migrate to 280 pldm_entity_association_pdr_add_from_node_check() 281 28211. pdr: Stabilise pldm_pdr_add_check() 283 284 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 285 migrate to pldm_pdr_add_check() 286 28712. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 288 289 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 290 pldm_pdr_add_fru_record_set() should migrate to 291 pldm_pdr_add_fru_record_set_check() 292 293### Removed 294 2951. bios_table: Remove deprecated APIs sanitized by assert(): 296 297 - pldm_bios_table_string_entry_encode() 298 - pldm_bios_table_string_entry_decode_string() 299 - pldm_bios_table_attr_entry_enum_encode() 300 - pldm_bios_table_attr_entry_enum_decode_pv_num() 301 - pldm_bios_table_attr_entry_enum_decode_def_num() 302 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 303 - pldm_bios_table_attr_entry_string_encode() 304 - pldm_bios_table_attr_entry_string_decode_def_string_length() 305 306### Fixed 307 3081. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 3092. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 3103. transport: mctp-demux: Don't test socket for non-zero value 3114. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 3125. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 3136. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 3147. abi: Update to remove pldm_close() from reference dumps 3158. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 316 317## [0.3.0] - 2023-06-23 318 319### Added 320 3211. Add encode/decode pldmMessagePollEvent data 3222. README: Add a section on working with libpldm 3233. pdr: Introduce remote_container_id and associated APIs 3244. pdr: Add APIs for creating and locating remote PDRs 3255. pdr: Add pldm_pdr_find_last_in_range() 3266. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 3277. pdr: Add pldm_pdr_find_container_id_range_exclude() 328 329### Changed 330 3311. include: Move installed transport.h under libpldm/ 3322. libpldm: Explicit deprecated, stable and testing ABI classes 3333. meson: Reduce strength of oem-ibm requirements from enabled to allowed 334 335 The `oem-ibm` feature is now enabled by the default meson configuration, for 336 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 337 recipe: 338 339 https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 340 341 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 342 when invoking `meson setup` 343 3444. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 3455. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 346 347### Deprecated 348 3491. bios_table: Deprecate APIs with arguments sanitized using assert() 350 351 C provides enough foot-guns without us encoding them into library APIs. 352 Specifically, deprecate the following in favour of their `*_check()` variants 353 which ensure assertions won't fail or otherwise invoke UB: 354 355 - pldm_bios_table_string_entry_encode() 356 - pldm_bios_table_string_entry_decode_string() 357 - pldm_bios_table_attr_entry_enum_encode() 358 - pldm_bios_table_attr_entry_enum_decode_pv_num() 359 - pldm_bios_table_attr_entry_enum_decode_def_num() 360 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 361 - pldm_bios_table_attr_entry_string_encode() 362 - pldm_bios_table_attr_entry_string_decode_def_string_length() 363 364### Removed 365 3661. libpldm: Remove the requester-api option 367 368### Fixed 369 3701. requester: Make pldm_open() return existing fd 3712. transport: Prevent sticking in waiting for response 3723. transport: Match on response in pldm_transport_send_recv_msg() 3734. requester: Add check before accessing hdr in pldm_recv() 3745. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 375