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() 27 28### Removed 29 301. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 312. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 323. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 334. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 345. bios_table: Remove pldm_bios_table_append_pad_checksum() 356. fru: Remove get_fru_record_by_option() 367. pdr: Make is_present() static 378. pdr: Remove pldm_pdr_add() 389. pdr: Remove pldm_pdr_add_fru_record_set() 39 40### Fixed 41 421. requester: Fix response buffer cast in pldm_send_recv() 432. pdr: Hoist record handle overflow test to avoid memory leak 44 45## [0.4.0] - 2023-07-14 46 47### Added 48 491. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 502. fru: Introduce get_fru_record_by_option_check() 513. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 524. pdr: Introduce pldm_pdr_add_check() 535. pdr: Introduce pldm_pdr_add_fru_record_set_check() 54 55### Changed 56 571. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 582. requester: Expose pldm_close() in header 593. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 604. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 615. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 626. pdr: pldm_pdr_init(): Return NULL on allocation failure 637. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 648. pdr: Document preconditions for trivial accessor functions 65 66 A trivial accessor function is one that exposes properties of an object in a 67 way can't result in an error, beyond passing an invalid argument to the 68 function. For APIs meeting this definition we define a precondition that 69 struct pointers must point to valid objects to avoid polluting the function 70 prototypes. The following APIs now have this precondition explicitly defined: 71 72 - pldm_entity_extract() 73 - pldm_entity_get_parent() 74 - pldm_entity_is_exist_parent() 75 - pldm_entity_is_node_parent() 76 - pldm_is_current_parent_child 77 - pldm_is_empty_entity_assoc_tree() 78 - pldm_pdr_get_record_count() 79 - pldm_pdr_get_record_handle() 80 - pldm_pdr_get_repo_size() 81 - pldm_pdr_record_is_remote() 82 839. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 8410. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 8511. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 8612. pdr: pldm_entity_association_tree_visit(): Document preconditions 8713. pdr: pldm_entity_association_tree_visit(): Exit early on failure 8814. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 8915. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 9016. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 9117. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 9218. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 9319. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 9420. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 9521. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 9622. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 9723. pdr: pldm_entity_get_num_children(): Don't return invalid values 9824. libpldm: Lift or remove asserts where a subsequent check exists 99 100### Deprecated 101 1021. pldm_bios_table_attr_entry_integer_encode() 103 104 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 105 1062. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 107 108 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 109 1103. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 111 112 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 113 1144. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 115 116 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 117 1185. pdr: Deprecate is_present() 119 120 There should be no users of this symbol. If you are a user, you should figure 121 out how to stop, or get in touch. This symbol will be marked static the 122 release after deprecation. 123 1246. pdr: Deprecate find_entity_ref_in_tree() 125 126 There should be no users of this symbol. If you are a user, you should figure 127 out how to stop, or get in touch. This symbol will be marked static the 128 release after deprecation. 129 1307. pdr: Deprecate entity_association_tree_find() 131 132 There should be no users of this symbol. If you are a user, you should figure 133 out how to stop, or get in touch. This symbol will be marked static the 134 release after deprecation. 135 1368. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 137 138 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 139 pldm_bios_table_append_pad_checksum() should migrate to 140 pldm_bios_table_append_pad_checksum_check() 141 1429. fru: Stabilise get_fru_record_by_option_check() 143 144 get_fru_record_by_option() is deprecated by this change. Users of 145 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 146 14710. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 148 149 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 150 Users of pldm_entity_association_pdr_add_from_node() should migrate to 151 pldm_entity_association_pdr_add_from_node_check() 152 15311. pdr: Stabilise pldm_pdr_add_check() 154 155 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 156 migrate to pldm_pdr_add_check() 157 15812. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 159 160 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 161 pldm_pdr_add_fru_record_set() should migrate to 162 pldm_pdr_add_fru_record_set_check() 163 164### Removed 165 1661. bios_table: Remove deprecated APIs sanitized by assert(): 167 168 - pldm_bios_table_string_entry_encode() 169 - pldm_bios_table_string_entry_decode_string() 170 - pldm_bios_table_attr_entry_enum_encode() 171 - pldm_bios_table_attr_entry_enum_decode_pv_num() 172 - pldm_bios_table_attr_entry_enum_decode_def_num() 173 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 174 - pldm_bios_table_attr_entry_string_encode() 175 - pldm_bios_table_attr_entry_string_decode_def_string_length() 176 177### Fixed 178 1791. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 1802. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 1813. transport: mctp-demux: Don't test socket for non-zero value 1824. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 1835. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 1846. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 1857. abi: Update to remove pldm_close() from reference dumps 1868. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 187 188## [0.3.0] - 2023-06-23 189 190### Added 191 1921. Add encode/decode pldmMessagePollEvent data 1932. README: Add a section on working with libpldm 1943. pdr: Introduce remote_container_id and associated APIs 1954. pdr: Add APIs for creating and locating remote PDRs 1965. pdr: Add pldm_pdr_find_last_in_range() 1976. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 1987. pdr: Add pldm_pdr_find_container_id_range_exclude() 199 200### Changed 201 2021. include: Move installed transport.h under libpldm/ 2032. libpldm: Explicit deprecated, stable and testing ABI classes 2043. meson: Reduce strength of oem-ibm requirements from enabled to allowed 205 206 The `oem-ibm` feature is now enabled by the default meson configuration, for 207 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 208 recipe: 209 210 https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 211 212 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 213 when invoking `meson setup` 214 2154. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 2165. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 217 218### Deprecated 219 2201. bios_table: Deprecate APIs with arguments sanitized using assert() 221 222 C provides enough foot-guns without us encoding them into library APIs. 223 Specifically, deprecate the following in favour of their `*_check()` variants 224 which ensure assertions won't fail or otherwise invoke UB: 225 226 - pldm_bios_table_string_entry_encode() 227 - pldm_bios_table_string_entry_decode_string() 228 - pldm_bios_table_attr_entry_enum_encode() 229 - pldm_bios_table_attr_entry_enum_decode_pv_num() 230 - pldm_bios_table_attr_entry_enum_decode_def_num() 231 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 232 - pldm_bios_table_attr_entry_string_encode() 233 - pldm_bios_table_attr_entry_string_decode_def_string_length() 234 235### Removed 236 2371. libpldm: Remove the requester-api option 238 239### Fixed 240 2411. requester: Make pldm_open() return existing fd 2422. transport: Prevent sticking in waiting for response 2433. transport: Match on response in pldm_transport_send_recv_msg() 2444. requester: Add check before accessing hdr in pldm_recv() 2455. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 246