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() 36 37### Fixed 38 391. libpldm: Rationalise the local and installed path of pldm.h 40 41## [0.7.0] - 2023-08-29 42 43### Added 44 451. state-set: Add new enum for Operational Fault Status enum 46 47### Changed 48 491. transport: Match specified metadata in pldm_transport_send_recv_msg() 502. transport: mctp-demux: Drop ABI annotation for internal symbols 513. transport: Stabilise core transport and implementation APIs 52 53 This stabilisation covers the following headers and functions: 54 55 - libpldm/transport.h 56 57 - pldm_transport_poll() 58 - pldm_transport_send_msg() 59 - pldm_transport_recv_msg() 60 - pldm_transport_send_recv_msg() 61 62 - libpldm/transport/af-mctp.h 63 64 - pldm_transport_af_mctp_init() 65 - pldm_transport_af_mctp_destroy() 66 - pldm_transport_af_mctp_core() 67 - pldm_transport_af_mctp_init_pollfd() 68 - pldm_transport_af_mctp_map_tid() 69 - pldm_transport_af_mctp_unmap_tid() 70 71 - libpldm/transport/mctp-demux.h 72 - pldm_transport_mctp_demux_init() 73 - pldm_transport_mctp_demux_destroy() 74 - pldm_transport_mctp_demux_core() 75 - pldm_transport_mctp_demux_init_pollfd() 76 - pldm_transport_mctp_demux_map_tid() 77 - pldm_transport_mctp_demux_unmap_tid() 78 79### Deprecated 80 811. All the existing "requester" APIs from `libpldm/pldm.h` (also known as 82 `libpldm/requester/pldm.h`): 83 84 - pldm_open() 85 - pldm_send_recv() 86 - pldm_send() 87 - pldm_recv() 88 - pldm_recv_any() 89 - pldm_close() 90 91 Users should migrate to the newer "transport" APIs instead. 92 93## Fixed 94 951. tests: Exclude transport tests when build excludes testing ABIs 962. abi: Capture deprecation of pldm_close() 97 98## [0.6.0] - 2023-08-22 99 100### Changed 101 1021. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity() 1032. meson: Apply `b_ndebug=if-release` by default 1043. pdr : Stabilize pldm_entity_association_tree_add_entity() 1054. pdr: Stabilise pldm_entity_association_tree_find_with_locality() 1065. pdr: Stabilize pldm_entity_node_get_remote_container_id() 1076. transport: af-mctp: Assign out-params on success in \*\_recv() 1087. transport: Generalise the pldm_transport_recv_msg() API 109 110### Removed 111 1121. pdr: Remove pldm_entity_association_pdr_add() 1132. state-set: Remove enum pldm_state_set_operational_fault_status_values 114 115### Fixed 116 1171. transport: register init_pollfd callback for af-mctp 1182. transport: fix init_pollfd function parameter 1193. transport: Fix doxygen and variables for send and recv functions 1204. transport: af-mctp: Ensure malloc() succeeds in \*\_recv() 121 122## [0.5.0] - 2023-08-09 123 124### Added 125 1261. pdr: Introduce pldm_entity_association_pdr_add_check() 127 128### Changed 129 1301. pdr: Allow record_handle to be NULL for pldm_pdr_add_check() 1312. transport: pldm_transport_poll(): Adjust return value semantics 1323. transport: free un-wanted responses in pldm_transport_send_recv_msg() 133 134### Deprecated 135 1361. state-set: Enum pldm_state_set_operational_fault_status_values 137 138 The enum operational_fault_status is defined with wrong members and will 139 eventually be replaced with the correct members. Any uses of 140 pldm_state_set_operational_fault_status_values members should move to 141 equivalent pldm_state_set_operational_stress_status_values members if needed. 142 1432. platform: Struct field name in fru_record_set PDR 144 145 References to entity_instance_num should be changed to entity_instance 146 1473. platform: Struct field name in numeric sensor value PDR 148 149 References to entity_instance_num should be changed to entity_instance 150 151### Removed 152 1531. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 1542. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 1553. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 1564. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 1575. bios_table: Remove pldm_bios_table_append_pad_checksum() 1586. fru: Remove get_fru_record_by_option() 1597. pdr: Make is_present() static 1608. pdr: Remove pldm_pdr_add() 1619. pdr: Remove pldm_pdr_add_fru_record_set() 16210. pdr: Remove pldm_entity_association_pdr_add_from_node() 16311. pdr: Make find_entity_ref_in_tree() static 16412. pdr: Make entity_association_tree_find() static 165 166### Fixed 167 1681. requester: Fix response buffer cast in pldm_send_recv() 1692. pdr: Hoist record handle overflow test to avoid memory leak 1703. transport: Correct comparison in while loop condition 171 172## [0.4.0] - 2023-07-14 173 174### Added 175 1761. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 1772. fru: Introduce get_fru_record_by_option_check() 1783. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 1794. pdr: Introduce pldm_pdr_add_check() 1805. pdr: Introduce pldm_pdr_add_fru_record_set_check() 181 182### Changed 183 1841. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 1852. requester: Expose pldm_close() in header 1863. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 1874. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 1885. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 1896. pdr: pldm_pdr_init(): Return NULL on allocation failure 1907. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 1918. pdr: Document preconditions for trivial accessor functions 192 193 A trivial accessor function is one that exposes properties of an object in a 194 way can't result in an error, beyond passing an invalid argument to the 195 function. For APIs meeting this definition we define a precondition that 196 struct pointers must point to valid objects to avoid polluting the function 197 prototypes. The following APIs now have this precondition explicitly defined: 198 199 - pldm_entity_extract() 200 - pldm_entity_get_parent() 201 - pldm_entity_is_exist_parent() 202 - pldm_entity_is_node_parent() 203 - pldm_is_current_parent_child 204 - pldm_is_empty_entity_assoc_tree() 205 - pldm_pdr_get_record_count() 206 - pldm_pdr_get_record_handle() 207 - pldm_pdr_get_repo_size() 208 - pldm_pdr_record_is_remote() 209 2109. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 21110. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 21211. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 21312. pdr: pldm_entity_association_tree_visit(): Document preconditions 21413. pdr: pldm_entity_association_tree_visit(): Exit early on failure 21514. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 21615. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 21716. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 21817. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 21918. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 22019. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 22120. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 22221. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 22322. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 22423. pdr: pldm_entity_get_num_children(): Don't return invalid values 22524. libpldm: Lift or remove asserts where a subsequent check exists 226 227### Deprecated 228 2291. pldm_bios_table_attr_entry_integer_encode() 230 231 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 232 2332. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 234 235 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 236 2373. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 238 239 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 240 2414. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 242 243 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 244 2455. pdr: Deprecate is_present() 246 247 There should be no users of this symbol. If you are a user, you should figure 248 out how to stop, or get in touch. This symbol will be marked static the 249 release after deprecation. 250 2516. pdr: Deprecate find_entity_ref_in_tree() 252 253 There should be no users of this symbol. If you are a user, you should figure 254 out how to stop, or get in touch. This symbol will be marked static the 255 release after deprecation. 256 2577. pdr: Deprecate entity_association_tree_find() 258 259 There should be no users of this symbol. If you are a user, you should figure 260 out how to stop, or get in touch. This symbol will be marked static the 261 release after deprecation. 262 2638. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 264 265 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 266 pldm_bios_table_append_pad_checksum() should migrate to 267 pldm_bios_table_append_pad_checksum_check() 268 2699. fru: Stabilise get_fru_record_by_option_check() 270 271 get_fru_record_by_option() is deprecated by this change. Users of 272 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 273 27410. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 275 276 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 277 Users of pldm_entity_association_pdr_add_from_node() should migrate to 278 pldm_entity_association_pdr_add_from_node_check() 279 28011. pdr: Stabilise pldm_pdr_add_check() 281 282 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 283 migrate to pldm_pdr_add_check() 284 28512. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 286 287 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 288 pldm_pdr_add_fru_record_set() should migrate to 289 pldm_pdr_add_fru_record_set_check() 290 291### Removed 292 2931. bios_table: Remove deprecated APIs sanitized by assert(): 294 295 - pldm_bios_table_string_entry_encode() 296 - pldm_bios_table_string_entry_decode_string() 297 - pldm_bios_table_attr_entry_enum_encode() 298 - pldm_bios_table_attr_entry_enum_decode_pv_num() 299 - pldm_bios_table_attr_entry_enum_decode_def_num() 300 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 301 - pldm_bios_table_attr_entry_string_encode() 302 - pldm_bios_table_attr_entry_string_decode_def_string_length() 303 304### Fixed 305 3061. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 3072. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 3083. transport: mctp-demux: Don't test socket for non-zero value 3094. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 3105. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 3116. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 3127. abi: Update to remove pldm_close() from reference dumps 3138. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 314 315## [0.3.0] - 2023-06-23 316 317### Added 318 3191. Add encode/decode pldmMessagePollEvent data 3202. README: Add a section on working with libpldm 3213. pdr: Introduce remote_container_id and associated APIs 3224. pdr: Add APIs for creating and locating remote PDRs 3235. pdr: Add pldm_pdr_find_last_in_range() 3246. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 3257. pdr: Add pldm_pdr_find_container_id_range_exclude() 326 327### Changed 328 3291. include: Move installed transport.h under libpldm/ 3302. libpldm: Explicit deprecated, stable and testing ABI classes 3313. meson: Reduce strength of oem-ibm requirements from enabled to allowed 332 333 The `oem-ibm` feature is now enabled by the default meson configuration, for 334 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 335 recipe: 336 337 https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 338 339 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 340 when invoking `meson setup` 341 3424. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 3435. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 344 345### Deprecated 346 3471. bios_table: Deprecate APIs with arguments sanitized using assert() 348 349 C provides enough foot-guns without us encoding them into library APIs. 350 Specifically, deprecate the following in favour of their `*_check()` variants 351 which ensure assertions won't fail or otherwise invoke UB: 352 353 - pldm_bios_table_string_entry_encode() 354 - pldm_bios_table_string_entry_decode_string() 355 - pldm_bios_table_attr_entry_enum_encode() 356 - pldm_bios_table_attr_entry_enum_decode_pv_num() 357 - pldm_bios_table_attr_entry_enum_decode_def_num() 358 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 359 - pldm_bios_table_attr_entry_string_encode() 360 - pldm_bios_table_attr_entry_string_decode_def_string_length() 361 362### Removed 363 3641. libpldm: Remove the requester-api option 365 366### Fixed 367 3681. requester: Make pldm_open() return existing fd 3692. transport: Prevent sticking in waiting for response 3703. transport: Match on response in pldm_transport_send_recv_msg() 3714. requester: Add check before accessing hdr in pldm_recv() 3725. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 373