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. pdr: Introduce pldm_entity_association_pdr_add_check() 23 24### Changed 25 261. pdr: Allow record_handle to be NULL for pldm_pdr_add_check() 272. transport: pldm_transport_poll(): Adjust return value semantics 28 29### Deprecated 30 311. state-set: Enum pldm_state_set_operational_fault_status_values 32 33 The enum operational_fault_status is defined with wrong members and will 34 eventually be replaced with the correct members. Any uses of 35 pldm_state_set_operational_fault_status_values members should move to 36 equivalent pldm_state_set_operational_stress_status_values members if needed. 37 382. platform: Struct field name in fru_record_set PDR 39 40 References to entity_instance_num should be changed to entity_instance 41 423. platform: Struct field name in numeric sensor value PDR 43 44 References to entity_instance_num should be changed to entity_instance 45 46### Removed 47 481. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 492. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 503. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 514. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 525. bios_table: Remove pldm_bios_table_append_pad_checksum() 536. fru: Remove get_fru_record_by_option() 547. pdr: Make is_present() static 558. pdr: Remove pldm_pdr_add() 569. pdr: Remove pldm_pdr_add_fru_record_set() 5710. pdr: Remove pldm_entity_association_pdr_add_from_node() 5811. pdr: Make find_entity_ref_in_tree() static 5912. pdr: Make entity_association_tree_find() static 60 61### Fixed 62 631. requester: Fix response buffer cast in pldm_send_recv() 642. pdr: Hoist record handle overflow test to avoid memory leak 653. transport: Correct comparison in while loop condition 66 67## [0.4.0] - 2023-07-14 68 69### Added 70 711. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 722. fru: Introduce get_fru_record_by_option_check() 733. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 744. pdr: Introduce pldm_pdr_add_check() 755. pdr: Introduce pldm_pdr_add_fru_record_set_check() 76 77### Changed 78 791. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 802. requester: Expose pldm_close() in header 813. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 824. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 835. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 846. pdr: pldm_pdr_init(): Return NULL on allocation failure 857. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 868. pdr: Document preconditions for trivial accessor functions 87 88 A trivial accessor function is one that exposes properties of an object in a 89 way can't result in an error, beyond passing an invalid argument to the 90 function. For APIs meeting this definition we define a precondition that 91 struct pointers must point to valid objects to avoid polluting the function 92 prototypes. The following APIs now have this precondition explicitly defined: 93 94 - pldm_entity_extract() 95 - pldm_entity_get_parent() 96 - pldm_entity_is_exist_parent() 97 - pldm_entity_is_node_parent() 98 - pldm_is_current_parent_child 99 - pldm_is_empty_entity_assoc_tree() 100 - pldm_pdr_get_record_count() 101 - pldm_pdr_get_record_handle() 102 - pldm_pdr_get_repo_size() 103 - pldm_pdr_record_is_remote() 104 1059. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 10610. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 10711. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 10812. pdr: pldm_entity_association_tree_visit(): Document preconditions 10913. pdr: pldm_entity_association_tree_visit(): Exit early on failure 11014. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 11115. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 11216. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 11317. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 11418. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 11519. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 11620. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 11721. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 11822. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 11923. pdr: pldm_entity_get_num_children(): Don't return invalid values 12024. libpldm: Lift or remove asserts where a subsequent check exists 121 122### Deprecated 123 1241. pldm_bios_table_attr_entry_integer_encode() 125 126 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 127 1282. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 129 130 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 131 1323. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 133 134 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 135 1364. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 137 138 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 139 1405. pdr: Deprecate is_present() 141 142 There should be no users of this symbol. If you are a user, you should figure 143 out how to stop, or get in touch. This symbol will be marked static the 144 release after deprecation. 145 1466. pdr: Deprecate find_entity_ref_in_tree() 147 148 There should be no users of this symbol. If you are a user, you should figure 149 out how to stop, or get in touch. This symbol will be marked static the 150 release after deprecation. 151 1527. pdr: Deprecate entity_association_tree_find() 153 154 There should be no users of this symbol. If you are a user, you should figure 155 out how to stop, or get in touch. This symbol will be marked static the 156 release after deprecation. 157 1588. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 159 160 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 161 pldm_bios_table_append_pad_checksum() should migrate to 162 pldm_bios_table_append_pad_checksum_check() 163 1649. fru: Stabilise get_fru_record_by_option_check() 165 166 get_fru_record_by_option() is deprecated by this change. Users of 167 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 168 16910. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 170 171 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 172 Users of pldm_entity_association_pdr_add_from_node() should migrate to 173 pldm_entity_association_pdr_add_from_node_check() 174 17511. pdr: Stabilise pldm_pdr_add_check() 176 177 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 178 migrate to pldm_pdr_add_check() 179 18012. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 181 182 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 183 pldm_pdr_add_fru_record_set() should migrate to 184 pldm_pdr_add_fru_record_set_check() 185 186### Removed 187 1881. bios_table: Remove deprecated APIs sanitized by assert(): 189 190 - pldm_bios_table_string_entry_encode() 191 - pldm_bios_table_string_entry_decode_string() 192 - pldm_bios_table_attr_entry_enum_encode() 193 - pldm_bios_table_attr_entry_enum_decode_pv_num() 194 - pldm_bios_table_attr_entry_enum_decode_def_num() 195 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 196 - pldm_bios_table_attr_entry_string_encode() 197 - pldm_bios_table_attr_entry_string_decode_def_string_length() 198 199### Fixed 200 2011. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 2022. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 2033. transport: mctp-demux: Don't test socket for non-zero value 2044. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 2055. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 2066. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 2077. abi: Update to remove pldm_close() from reference dumps 2088. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 209 210## [0.3.0] - 2023-06-23 211 212### Added 213 2141. Add encode/decode pldmMessagePollEvent data 2152. README: Add a section on working with libpldm 2163. pdr: Introduce remote_container_id and associated APIs 2174. pdr: Add APIs for creating and locating remote PDRs 2185. pdr: Add pldm_pdr_find_last_in_range() 2196. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 2207. pdr: Add pldm_pdr_find_container_id_range_exclude() 221 222### Changed 223 2241. include: Move installed transport.h under libpldm/ 2252. libpldm: Explicit deprecated, stable and testing ABI classes 2263. meson: Reduce strength of oem-ibm requirements from enabled to allowed 227 228 The `oem-ibm` feature is now enabled by the default meson configuration, for 229 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 230 recipe: 231 232 https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 233 234 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 235 when invoking `meson setup` 236 2374. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 2385. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 239 240### Deprecated 241 2421. bios_table: Deprecate APIs with arguments sanitized using assert() 243 244 C provides enough foot-guns without us encoding them into library APIs. 245 Specifically, deprecate the following in favour of their `*_check()` variants 246 which ensure assertions won't fail or otherwise invoke UB: 247 248 - pldm_bios_table_string_entry_encode() 249 - pldm_bios_table_string_entry_decode_string() 250 - pldm_bios_table_attr_entry_enum_encode() 251 - pldm_bios_table_attr_entry_enum_decode_pv_num() 252 - pldm_bios_table_attr_entry_enum_decode_def_num() 253 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 254 - pldm_bios_table_attr_entry_string_encode() 255 - pldm_bios_table_attr_entry_string_decode_def_string_length() 256 257### Removed 258 2591. libpldm: Remove the requester-api option 260 261### Fixed 262 2631. requester: Make pldm_open() return existing fd 2642. transport: Prevent sticking in waiting for response 2653. transport: Match on response in pldm_transport_send_recv_msg() 2664. requester: Add check before accessing hdr in pldm_recv() 2675. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 268