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### Changed 21 221. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity() 232. meson: Apply `b_ndebug=if-release` by default 243. pdr : Stabilize pldm_entity_association_tree_add_entity() 254. pdr: Stabilise pldm_entity_association_tree_find_with_locality() 265. pdr: Stabilize pldm_entity_node_get_remote_container_id() 27 28### Removed 29 301. pdr: Remove pldm_entity_association_pdr_add() 31 32### Fixed 33 341. transport: register init_pollfd callback for af-mctp 352. transport: fix init_pollfd function parameter 36 37## [0.5.0] - 2023-08-09 38 39### Added 40 411. pdr: Introduce pldm_entity_association_pdr_add_check() 42 43### Changed 44 451. pdr: Allow record_handle to be NULL for pldm_pdr_add_check() 462. transport: pldm_transport_poll(): Adjust return value semantics 473. transport: free un-wanted responses in pldm_transport_send_recv_msg() 48 49### Deprecated 50 511. state-set: Enum pldm_state_set_operational_fault_status_values 52 53 The enum operational_fault_status is defined with wrong members and will 54 eventually be replaced with the correct members. Any uses of 55 pldm_state_set_operational_fault_status_values members should move to 56 equivalent pldm_state_set_operational_stress_status_values members if needed. 57 582. platform: Struct field name in fru_record_set PDR 59 60 References to entity_instance_num should be changed to entity_instance 61 623. platform: Struct field name in numeric sensor value PDR 63 64 References to entity_instance_num should be changed to entity_instance 65 66### Removed 67 681. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 692. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 703. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 714. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 725. bios_table: Remove pldm_bios_table_append_pad_checksum() 736. fru: Remove get_fru_record_by_option() 747. pdr: Make is_present() static 758. pdr: Remove pldm_pdr_add() 769. pdr: Remove pldm_pdr_add_fru_record_set() 7710. pdr: Remove pldm_entity_association_pdr_add_from_node() 7811. pdr: Make find_entity_ref_in_tree() static 7912. pdr: Make entity_association_tree_find() static 80 81### Fixed 82 831. requester: Fix response buffer cast in pldm_send_recv() 842. pdr: Hoist record handle overflow test to avoid memory leak 853. transport: Correct comparison in while loop condition 86 87## [0.4.0] - 2023-07-14 88 89### Added 90 911. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 922. fru: Introduce get_fru_record_by_option_check() 933. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 944. pdr: Introduce pldm_pdr_add_check() 955. pdr: Introduce pldm_pdr_add_fru_record_set_check() 96 97### Changed 98 991. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 1002. requester: Expose pldm_close() in header 1013. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 1024. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 1035. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 1046. pdr: pldm_pdr_init(): Return NULL on allocation failure 1057. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 1068. pdr: Document preconditions for trivial accessor functions 107 108 A trivial accessor function is one that exposes properties of an object in a 109 way can't result in an error, beyond passing an invalid argument to the 110 function. For APIs meeting this definition we define a precondition that 111 struct pointers must point to valid objects to avoid polluting the function 112 prototypes. The following APIs now have this precondition explicitly defined: 113 114 - pldm_entity_extract() 115 - pldm_entity_get_parent() 116 - pldm_entity_is_exist_parent() 117 - pldm_entity_is_node_parent() 118 - pldm_is_current_parent_child 119 - pldm_is_empty_entity_assoc_tree() 120 - pldm_pdr_get_record_count() 121 - pldm_pdr_get_record_handle() 122 - pldm_pdr_get_repo_size() 123 - pldm_pdr_record_is_remote() 124 1259. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 12610. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 12711. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 12812. pdr: pldm_entity_association_tree_visit(): Document preconditions 12913. pdr: pldm_entity_association_tree_visit(): Exit early on failure 13014. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 13115. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 13216. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 13317. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 13418. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 13519. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 13620. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 13721. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 13822. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 13923. pdr: pldm_entity_get_num_children(): Don't return invalid values 14024. libpldm: Lift or remove asserts where a subsequent check exists 141 142### Deprecated 143 1441. pldm_bios_table_attr_entry_integer_encode() 145 146 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 147 1482. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 149 150 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 151 1523. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 153 154 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 155 1564. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 157 158 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 159 1605. pdr: Deprecate is_present() 161 162 There should be no users of this symbol. If you are a user, you should figure 163 out how to stop, or get in touch. This symbol will be marked static the 164 release after deprecation. 165 1666. pdr: Deprecate find_entity_ref_in_tree() 167 168 There should be no users of this symbol. If you are a user, you should figure 169 out how to stop, or get in touch. This symbol will be marked static the 170 release after deprecation. 171 1727. pdr: Deprecate entity_association_tree_find() 173 174 There should be no users of this symbol. If you are a user, you should figure 175 out how to stop, or get in touch. This symbol will be marked static the 176 release after deprecation. 177 1788. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 179 180 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 181 pldm_bios_table_append_pad_checksum() should migrate to 182 pldm_bios_table_append_pad_checksum_check() 183 1849. fru: Stabilise get_fru_record_by_option_check() 185 186 get_fru_record_by_option() is deprecated by this change. Users of 187 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 188 18910. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 190 191 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 192 Users of pldm_entity_association_pdr_add_from_node() should migrate to 193 pldm_entity_association_pdr_add_from_node_check() 194 19511. pdr: Stabilise pldm_pdr_add_check() 196 197 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 198 migrate to pldm_pdr_add_check() 199 20012. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 201 202 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 203 pldm_pdr_add_fru_record_set() should migrate to 204 pldm_pdr_add_fru_record_set_check() 205 206### Removed 207 2081. bios_table: Remove deprecated APIs sanitized by assert(): 209 210 - pldm_bios_table_string_entry_encode() 211 - pldm_bios_table_string_entry_decode_string() 212 - pldm_bios_table_attr_entry_enum_encode() 213 - pldm_bios_table_attr_entry_enum_decode_pv_num() 214 - pldm_bios_table_attr_entry_enum_decode_def_num() 215 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 216 - pldm_bios_table_attr_entry_string_encode() 217 - pldm_bios_table_attr_entry_string_decode_def_string_length() 218 219### Fixed 220 2211. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 2222. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 2233. transport: mctp-demux: Don't test socket for non-zero value 2244. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 2255. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 2266. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 2277. abi: Update to remove pldm_close() from reference dumps 2288. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 229 230## [0.3.0] - 2023-06-23 231 232### Added 233 2341. Add encode/decode pldmMessagePollEvent data 2352. README: Add a section on working with libpldm 2363. pdr: Introduce remote_container_id and associated APIs 2374. pdr: Add APIs for creating and locating remote PDRs 2385. pdr: Add pldm_pdr_find_last_in_range() 2396. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 2407. pdr: Add pldm_pdr_find_container_id_range_exclude() 241 242### Changed 243 2441. include: Move installed transport.h under libpldm/ 2452. libpldm: Explicit deprecated, stable and testing ABI classes 2463. meson: Reduce strength of oem-ibm requirements from enabled to allowed 247 248 The `oem-ibm` feature is now enabled by the default meson configuration, for 249 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 250 recipe: 251 252 https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 253 254 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 255 when invoking `meson setup` 256 2574. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 2585. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 259 260### Deprecated 261 2621. bios_table: Deprecate APIs with arguments sanitized using assert() 263 264 C provides enough foot-guns without us encoding them into library APIs. 265 Specifically, deprecate the following in favour of their `*_check()` variants 266 which ensure assertions won't fail or otherwise invoke UB: 267 268 - pldm_bios_table_string_entry_encode() 269 - pldm_bios_table_string_entry_decode_string() 270 - pldm_bios_table_attr_entry_enum_encode() 271 - pldm_bios_table_attr_entry_enum_decode_pv_num() 272 - pldm_bios_table_attr_entry_enum_decode_def_num() 273 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 274 - pldm_bios_table_attr_entry_string_encode() 275 - pldm_bios_table_attr_entry_string_decode_def_string_length() 276 277### Removed 278 2791. libpldm: Remove the requester-api option 280 281### Fixed 282 2831. requester: Make pldm_open() return existing fd 2842. transport: Prevent sticking in waiting for response 2853. transport: Match on response in pldm_transport_send_recv_msg() 2864. requester: Add check before accessing hdr in pldm_recv() 2875. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 288