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 25 26### Changed 27 281. base: Stabilise pldm_msg_hdr_correlate_response() 292. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind() 30 31## [0.7.0] - 2023-08-29 32 33### Added 34 351. state-set: Add new enum for Operational Fault Status enum 36 37### Changed 38 391. transport: Match specified metadata in pldm_transport_send_recv_msg() 402. transport: mctp-demux: Drop ABI annotation for internal symbols 413. transport: Stabilise core transport and implementation APIs 42 43 This stabilisation covers the following headers and functions: 44 45 - libpldm/transport.h 46 47 - pldm_transport_poll() 48 - pldm_transport_send_msg() 49 - pldm_transport_recv_msg() 50 - pldm_transport_send_recv_msg() 51 52 - libpldm/transport/af-mctp.h 53 54 - pldm_transport_af_mctp_init() 55 - pldm_transport_af_mctp_destroy() 56 - pldm_transport_af_mctp_core() 57 - pldm_transport_af_mctp_init_pollfd() 58 - pldm_transport_af_mctp_map_tid() 59 - pldm_transport_af_mctp_unmap_tid() 60 61 - libpldm/transport/mctp-demux.h 62 - pldm_transport_mctp_demux_init() 63 - pldm_transport_mctp_demux_destroy() 64 - pldm_transport_mctp_demux_core() 65 - pldm_transport_mctp_demux_init_pollfd() 66 - pldm_transport_mctp_demux_map_tid() 67 - pldm_transport_mctp_demux_unmap_tid() 68 69### Deprecated 70 711. All the existing "requester" APIs from `libpldm/pldm.h` (also known as 72 `libpldm/requester/pldm.h`): 73 74 - pldm_open() 75 - pldm_send_recv() 76 - pldm_send() 77 - pldm_recv() 78 - pldm_recv_any() 79 - pldm_close() 80 81 Users should migrate to the newer "transport" APIs instead. 82 83## Fixed 84 851. tests: Exclude transport tests when build excludes testing ABIs 862. abi: Capture deprecation of pldm_close() 87 88## [0.6.0] - 2023-08-22 89 90### Changed 91 921. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity() 932. meson: Apply `b_ndebug=if-release` by default 943. pdr : Stabilize pldm_entity_association_tree_add_entity() 954. pdr: Stabilise pldm_entity_association_tree_find_with_locality() 965. pdr: Stabilize pldm_entity_node_get_remote_container_id() 976. transport: af-mctp: Assign out-params on success in \*\_recv() 987. transport: Generalise the pldm_transport_recv_msg() API 99 100### Removed 101 1021. pdr: Remove pldm_entity_association_pdr_add() 1032. state-set: Remove enum pldm_state_set_operational_fault_status_values 104 105### Fixed 106 1071. transport: register init_pollfd callback for af-mctp 1082. transport: fix init_pollfd function parameter 1093. transport: Fix doxygen and variables for send and recv functions 1104. transport: af-mctp: Ensure malloc() succeeds in \*\_recv() 111 112## [0.5.0] - 2023-08-09 113 114### Added 115 1161. pdr: Introduce pldm_entity_association_pdr_add_check() 117 118### Changed 119 1201. pdr: Allow record_handle to be NULL for pldm_pdr_add_check() 1212. transport: pldm_transport_poll(): Adjust return value semantics 1223. transport: free un-wanted responses in pldm_transport_send_recv_msg() 123 124### Deprecated 125 1261. state-set: Enum pldm_state_set_operational_fault_status_values 127 128 The enum operational_fault_status is defined with wrong members and will 129 eventually be replaced with the correct members. Any uses of 130 pldm_state_set_operational_fault_status_values members should move to 131 equivalent pldm_state_set_operational_stress_status_values members if needed. 132 1332. platform: Struct field name in fru_record_set PDR 134 135 References to entity_instance_num should be changed to entity_instance 136 1373. platform: Struct field name in numeric sensor value PDR 138 139 References to entity_instance_num should be changed to entity_instance 140 141### Removed 142 1431. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 1442. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 1453. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 1464. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 1475. bios_table: Remove pldm_bios_table_append_pad_checksum() 1486. fru: Remove get_fru_record_by_option() 1497. pdr: Make is_present() static 1508. pdr: Remove pldm_pdr_add() 1519. pdr: Remove pldm_pdr_add_fru_record_set() 15210. pdr: Remove pldm_entity_association_pdr_add_from_node() 15311. pdr: Make find_entity_ref_in_tree() static 15412. pdr: Make entity_association_tree_find() static 155 156### Fixed 157 1581. requester: Fix response buffer cast in pldm_send_recv() 1592. pdr: Hoist record handle overflow test to avoid memory leak 1603. transport: Correct comparison in while loop condition 161 162## [0.4.0] - 2023-07-14 163 164### Added 165 1661. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 1672. fru: Introduce get_fru_record_by_option_check() 1683. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 1694. pdr: Introduce pldm_pdr_add_check() 1705. pdr: Introduce pldm_pdr_add_fru_record_set_check() 171 172### Changed 173 1741. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 1752. requester: Expose pldm_close() in header 1763. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 1774. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 1785. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 1796. pdr: pldm_pdr_init(): Return NULL on allocation failure 1807. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 1818. pdr: Document preconditions for trivial accessor functions 182 183 A trivial accessor function is one that exposes properties of an object in a 184 way can't result in an error, beyond passing an invalid argument to the 185 function. For APIs meeting this definition we define a precondition that 186 struct pointers must point to valid objects to avoid polluting the function 187 prototypes. The following APIs now have this precondition explicitly defined: 188 189 - pldm_entity_extract() 190 - pldm_entity_get_parent() 191 - pldm_entity_is_exist_parent() 192 - pldm_entity_is_node_parent() 193 - pldm_is_current_parent_child 194 - pldm_is_empty_entity_assoc_tree() 195 - pldm_pdr_get_record_count() 196 - pldm_pdr_get_record_handle() 197 - pldm_pdr_get_repo_size() 198 - pldm_pdr_record_is_remote() 199 2009. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 20110. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 20211. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 20312. pdr: pldm_entity_association_tree_visit(): Document preconditions 20413. pdr: pldm_entity_association_tree_visit(): Exit early on failure 20514. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 20615. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 20716. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 20817. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 20918. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 21019. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 21120. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 21221. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 21322. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 21423. pdr: pldm_entity_get_num_children(): Don't return invalid values 21524. libpldm: Lift or remove asserts where a subsequent check exists 216 217### Deprecated 218 2191. pldm_bios_table_attr_entry_integer_encode() 220 221 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 222 2232. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 224 225 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 226 2273. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 228 229 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 230 2314. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 232 233 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 234 2355. pdr: Deprecate is_present() 236 237 There should be no users of this symbol. If you are a user, you should figure 238 out how to stop, or get in touch. This symbol will be marked static the 239 release after deprecation. 240 2416. pdr: Deprecate find_entity_ref_in_tree() 242 243 There should be no users of this symbol. If you are a user, you should figure 244 out how to stop, or get in touch. This symbol will be marked static the 245 release after deprecation. 246 2477. pdr: Deprecate entity_association_tree_find() 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 2538. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 254 255 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 256 pldm_bios_table_append_pad_checksum() should migrate to 257 pldm_bios_table_append_pad_checksum_check() 258 2599. fru: Stabilise get_fru_record_by_option_check() 260 261 get_fru_record_by_option() is deprecated by this change. Users of 262 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 263 26410. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 265 266 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 267 Users of pldm_entity_association_pdr_add_from_node() should migrate to 268 pldm_entity_association_pdr_add_from_node_check() 269 27011. pdr: Stabilise pldm_pdr_add_check() 271 272 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 273 migrate to pldm_pdr_add_check() 274 27512. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 276 277 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 278 pldm_pdr_add_fru_record_set() should migrate to 279 pldm_pdr_add_fru_record_set_check() 280 281### Removed 282 2831. bios_table: Remove deprecated APIs sanitized by assert(): 284 285 - pldm_bios_table_string_entry_encode() 286 - pldm_bios_table_string_entry_decode_string() 287 - pldm_bios_table_attr_entry_enum_encode() 288 - pldm_bios_table_attr_entry_enum_decode_pv_num() 289 - pldm_bios_table_attr_entry_enum_decode_def_num() 290 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 291 - pldm_bios_table_attr_entry_string_encode() 292 - pldm_bios_table_attr_entry_string_decode_def_string_length() 293 294### Fixed 295 2961. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 2972. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 2983. transport: mctp-demux: Don't test socket for non-zero value 2994. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 3005. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 3016. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 3027. abi: Update to remove pldm_close() from reference dumps 3038. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 304 305## [0.3.0] - 2023-06-23 306 307### Added 308 3091. Add encode/decode pldmMessagePollEvent data 3102. README: Add a section on working with libpldm 3113. pdr: Introduce remote_container_id and associated APIs 3124. pdr: Add APIs for creating and locating remote PDRs 3135. pdr: Add pldm_pdr_find_last_in_range() 3146. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 3157. pdr: Add pldm_pdr_find_container_id_range_exclude() 316 317### Changed 318 3191. include: Move installed transport.h under libpldm/ 3202. libpldm: Explicit deprecated, stable and testing ABI classes 3213. meson: Reduce strength of oem-ibm requirements from enabled to allowed 322 323 The `oem-ibm` feature is now enabled by the default meson configuration, for 324 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 325 recipe: 326 327 https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 328 329 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 330 when invoking `meson setup` 331 3324. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 3335. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 334 335### Deprecated 336 3371. bios_table: Deprecate APIs with arguments sanitized using assert() 338 339 C provides enough foot-guns without us encoding them into library APIs. 340 Specifically, deprecate the following in favour of their `*_check()` variants 341 which ensure assertions won't fail or otherwise invoke UB: 342 343 - pldm_bios_table_string_entry_encode() 344 - pldm_bios_table_string_entry_decode_string() 345 - pldm_bios_table_attr_entry_enum_encode() 346 - pldm_bios_table_attr_entry_enum_decode_pv_num() 347 - pldm_bios_table_attr_entry_enum_decode_def_num() 348 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 349 - pldm_bios_table_attr_entry_string_encode() 350 - pldm_bios_table_attr_entry_string_decode_def_string_length() 351 352### Removed 353 3541. libpldm: Remove the requester-api option 355 356### Fixed 357 3581. requester: Make pldm_open() return existing fd 3592. transport: Prevent sticking in waiting for response 3603. transport: Match on response in pldm_transport_send_recv_msg() 3614. requester: Add check before accessing hdr in pldm_recv() 3625. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 363