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() 276. transport: af-mctp: Assign out-params on success in \*\_recv() 287. transport: Generalise the pldm_transport_recv_msg() API 29 30### Removed 31 321. pdr: Remove pldm_entity_association_pdr_add() 33 34### Fixed 35 361. transport: register init_pollfd callback for af-mctp 372. transport: fix init_pollfd function parameter 383. transport: Fix doxygen and variables for send and recv functions 394. transport: af-mctp: Ensure malloc() succeeds in \*\_recv() 40 41## [0.5.0] - 2023-08-09 42 43### Added 44 451. pdr: Introduce pldm_entity_association_pdr_add_check() 46 47### Changed 48 491. pdr: Allow record_handle to be NULL for pldm_pdr_add_check() 502. transport: pldm_transport_poll(): Adjust return value semantics 513. transport: free un-wanted responses in pldm_transport_send_recv_msg() 52 53### Deprecated 54 551. state-set: Enum pldm_state_set_operational_fault_status_values 56 57 The enum operational_fault_status is defined with wrong members and will 58 eventually be replaced with the correct members. Any uses of 59 pldm_state_set_operational_fault_status_values members should move to 60 equivalent pldm_state_set_operational_stress_status_values members if needed. 61 622. platform: Struct field name in fru_record_set PDR 63 64 References to entity_instance_num should be changed to entity_instance 65 663. platform: Struct field name in numeric sensor value PDR 67 68 References to entity_instance_num should be changed to entity_instance 69 70### Removed 71 721. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length() 732. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum() 743. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string() 754. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer() 765. bios_table: Remove pldm_bios_table_append_pad_checksum() 776. fru: Remove get_fru_record_by_option() 787. pdr: Make is_present() static 798. pdr: Remove pldm_pdr_add() 809. pdr: Remove pldm_pdr_add_fru_record_set() 8110. pdr: Remove pldm_entity_association_pdr_add_from_node() 8211. pdr: Make find_entity_ref_in_tree() static 8312. pdr: Make entity_association_tree_find() static 84 85### Fixed 86 871. requester: Fix response buffer cast in pldm_send_recv() 882. pdr: Hoist record handle overflow test to avoid memory leak 893. transport: Correct comparison in while loop condition 90 91## [0.4.0] - 2023-07-14 92 93### Added 94 951. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 962. fru: Introduce get_fru_record_by_option_check() 973. pdr: Introduce pldm_entity_association_pdr_add_from_node_check() 984. pdr: Introduce pldm_pdr_add_check() 995. pdr: Introduce pldm_pdr_add_fru_record_set_check() 100 101### Changed 102 1031. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 1042. requester: Expose pldm_close() in header 1053. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 1064. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 1075. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 1086. pdr: pldm_pdr_init(): Return NULL on allocation failure 1097. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 1108. pdr: Document preconditions for trivial accessor functions 111 112 A trivial accessor function is one that exposes properties of an object in a 113 way can't result in an error, beyond passing an invalid argument to the 114 function. For APIs meeting this definition we define a precondition that 115 struct pointers must point to valid objects to avoid polluting the function 116 prototypes. The following APIs now have this precondition explicitly defined: 117 118 - pldm_entity_extract() 119 - pldm_entity_get_parent() 120 - pldm_entity_is_exist_parent() 121 - pldm_entity_is_node_parent() 122 - pldm_is_current_parent_child 123 - pldm_is_empty_entity_assoc_tree() 124 - pldm_pdr_get_record_count() 125 - pldm_pdr_get_record_handle() 126 - pldm_pdr_get_repo_size() 127 - pldm_pdr_record_is_remote() 128 1299. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 13010. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 13111. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 13212. pdr: pldm_entity_association_tree_visit(): Document preconditions 13313. pdr: pldm_entity_association_tree_visit(): Exit early on failure 13414. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 13515. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 13616. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 13717. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 13818. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 13919. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments 14020. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg 14121. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments 14222. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit 14323. pdr: pldm_entity_get_num_children(): Don't return invalid values 14424. libpldm: Lift or remove asserts where a subsequent check exists 145 146### Deprecated 147 1481. pldm_bios_table_attr_entry_integer_encode() 149 150 Migrate to pldm_bios_table_attr_entry_integer_encode_check() 151 1522. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 153 154 Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 155 1563. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 157 158 Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 159 1604. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 161 162 Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 163 1645. pdr: Deprecate is_present() 165 166 There should be no users of this symbol. If you are a user, you should figure 167 out how to stop, or get in touch. This symbol will be marked static the 168 release after deprecation. 169 1706. pdr: Deprecate find_entity_ref_in_tree() 171 172 There should be no users of this symbol. If you are a user, you should figure 173 out how to stop, or get in touch. This symbol will be marked static the 174 release after deprecation. 175 1767. pdr: Deprecate entity_association_tree_find() 177 178 There should be no users of this symbol. If you are a user, you should figure 179 out how to stop, or get in touch. This symbol will be marked static the 180 release after deprecation. 181 1828. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check() 183 184 pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of 185 pldm_bios_table_append_pad_checksum() should migrate to 186 pldm_bios_table_append_pad_checksum_check() 187 1889. fru: Stabilise get_fru_record_by_option_check() 189 190 get_fru_record_by_option() is deprecated by this change. Users of 191 get_fru_record_by_option() should migrate to get_fru_record_by_option_check() 192 19310. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check() 194 195 pldm_entity_association_pdr_add_from_node() is deprecated by this change. 196 Users of pldm_entity_association_pdr_add_from_node() should migrate to 197 pldm_entity_association_pdr_add_from_node_check() 198 19911. pdr: Stabilise pldm_pdr_add_check() 200 201 pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should 202 migrate to pldm_pdr_add_check() 203 20412. pdr: Stabilise pldm_pdr_add_fru_record_set_check() 205 206 pldm_pdr_add_fru_record_set() is deprecated by this change. Users of 207 pldm_pdr_add_fru_record_set() should migrate to 208 pldm_pdr_add_fru_record_set_check() 209 210### Removed 211 2121. bios_table: Remove deprecated APIs sanitized by assert(): 213 214 - pldm_bios_table_string_entry_encode() 215 - pldm_bios_table_string_entry_decode_string() 216 - pldm_bios_table_attr_entry_enum_encode() 217 - pldm_bios_table_attr_entry_enum_decode_pv_num() 218 - pldm_bios_table_attr_entry_enum_decode_def_num() 219 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 220 - pldm_bios_table_attr_entry_string_encode() 221 - pldm_bios_table_attr_entry_string_decode_def_string_length() 222 223### Fixed 224 2251. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 2262. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 2273. transport: mctp-demux: Don't test socket for non-zero value 2284. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 2295. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 2306. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init() 2317. abi: Update to remove pldm_close() from reference dumps 2328. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer() 233 234## [0.3.0] - 2023-06-23 235 236### Added 237 2381. Add encode/decode pldmMessagePollEvent data 2392. README: Add a section on working with libpldm 2403. pdr: Introduce remote_container_id and associated APIs 2414. pdr: Add APIs for creating and locating remote PDRs 2425. pdr: Add pldm_pdr_find_last_in_range() 2436. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 2447. pdr: Add pldm_pdr_find_container_id_range_exclude() 245 246### Changed 247 2481. include: Move installed transport.h under libpldm/ 2492. libpldm: Explicit deprecated, stable and testing ABI classes 2503. meson: Reduce strength of oem-ibm requirements from enabled to allowed 251 252 The `oem-ibm` feature is now enabled by the default meson configuration, for 253 CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 254 recipe: 255 256 https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 257 258 To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 259 when invoking `meson setup` 260 2614. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 2625. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 263 264### Deprecated 265 2661. bios_table: Deprecate APIs with arguments sanitized using assert() 267 268 C provides enough foot-guns without us encoding them into library APIs. 269 Specifically, deprecate the following in favour of their `*_check()` variants 270 which ensure assertions won't fail or otherwise invoke UB: 271 272 - pldm_bios_table_string_entry_encode() 273 - pldm_bios_table_string_entry_decode_string() 274 - pldm_bios_table_attr_entry_enum_encode() 275 - pldm_bios_table_attr_entry_enum_decode_pv_num() 276 - pldm_bios_table_attr_entry_enum_decode_def_num() 277 - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 278 - pldm_bios_table_attr_entry_string_encode() 279 - pldm_bios_table_attr_entry_string_decode_def_string_length() 280 281### Removed 282 2831. libpldm: Remove the requester-api option 284 285### Fixed 286 2871. requester: Make pldm_open() return existing fd 2882. transport: Prevent sticking in waiting for response 2893. transport: Match on response in pldm_transport_send_recv_msg() 2904. requester: Add check before accessing hdr in pldm_recv() 2915. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 292