16fd81a51SAndrew Jeffery# Changelog 26fd81a51SAndrew Jeffery 36fd81a51SAndrew JefferyAll notable changes to this project will be documented in this file. 46fd81a51SAndrew Jeffery 56fd81a51SAndrew JefferyThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 66fd81a51SAndrew Jefferyand this project adheres to 76fd81a51SAndrew Jeffery[Semantic Versioning](https://semver.org/spec/v2.0.0.html). 86fd81a51SAndrew Jeffery 96fd81a51SAndrew JefferyChange categories: 106fd81a51SAndrew Jeffery 116fd81a51SAndrew Jeffery- Added 126fd81a51SAndrew Jeffery- Changed 136fd81a51SAndrew Jeffery- Deprecated 146fd81a51SAndrew Jeffery- Removed 156fd81a51SAndrew Jeffery- Fixed 166fd81a51SAndrew Jeffery- Security 176fd81a51SAndrew Jeffery 186fd81a51SAndrew Jeffery## [Unreleased] 1939f88325SRashmica Gupta 20044ee19aSAndrew Jeffery### Added 21044ee19aSAndrew Jeffery 22044ee19aSAndrew Jeffery1. bios_table: Introduce pldm_bios_table_append_pad_checksum_check() 237cd16ff8SAndrew Jeffery2. fru: Introduce get_fru_record_by_option_check() 24044ee19aSAndrew Jeffery 25986df2a1SAndrew Jeffery### Changed 26986df2a1SAndrew Jeffery 27986df2a1SAndrew Jeffery1. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING 285fb9680bSAndrew Jeffery2. requester: Expose pldm_close() in header 29a873eca0SAndrew Jeffery3. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow 30757e81a1SAndrew Jeffery4. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc 3173d9176aSAndrew Jeffery5. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration 32a8bb22edSAndrew Jeffery6. pdr: pldm_pdr_init(): Return NULL on allocation failure 33fca1b60fSAndrew Jeffery7. pdr: pldm_pdr_destroy(): Exit early if repo is NULL 345565fcdeSAndrew Jeffery8. pdr: Document preconditions for trivial accessor functions 355565fcdeSAndrew Jeffery 365565fcdeSAndrew Jeffery A trivial accessor function is one that exposes properties of an object in a 375565fcdeSAndrew Jeffery way can't result in an error, beyond passing an invalid argument to the 385565fcdeSAndrew Jeffery function. For APIs meeting this definition we define a precondition that 395565fcdeSAndrew Jeffery struct pointers must point to valid objects to avoid polluting the function 405565fcdeSAndrew Jeffery prototypes. The following APIs now have this precondition explicitly defined: 415565fcdeSAndrew Jeffery 425565fcdeSAndrew Jeffery - pldm_entity_extract() 435565fcdeSAndrew Jeffery - pldm_entity_get_parent() 445565fcdeSAndrew Jeffery - pldm_entity_is_exist_parent() 455565fcdeSAndrew Jeffery - pldm_entity_is_node_parent() 465565fcdeSAndrew Jeffery - pldm_is_current_parent_child 475565fcdeSAndrew Jeffery - pldm_is_empty_entity_assoc_tree() 485565fcdeSAndrew Jeffery - pldm_pdr_get_record_count() 495565fcdeSAndrew Jeffery - pldm_pdr_get_record_handle() 505565fcdeSAndrew Jeffery - pldm_pdr_get_repo_size() 515565fcdeSAndrew Jeffery - pldm_pdr_record_is_remote() 52986df2a1SAndrew Jeffery 5315b8818cSAndrew Jeffery9. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor 5401425e96SAndrew Jeffery10. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments 55c40037d5SAndrew Jeffery11. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc 568e9b0de8SAndrew Jeffery12. pdr: pldm_entity_association_tree_visit(): Document preconditions 57cd17e5ccSAndrew Jeffery13. pdr: pldm_entity_association_tree_visit(): Exit early on failure 58a89e015cSAndrew Jeffery14. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument 596e8a2617SAndrew Jeffery15. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments 60375d9fc1SAndrew Jeffery16. pdr: pldm_is_current_parent_child(): Return false for invalid arguments 61c788348eSAndrew Jeffery17. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments 62*ba47e83eSAndrew Jeffery18. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments 6315b8818cSAndrew Jeffery 64fe0f01d8SAndrew Jeffery### Deprecated 65fe0f01d8SAndrew Jeffery 66fe0f01d8SAndrew Jeffery1. pldm_bios_table_attr_entry_integer_encode() 67fe0f01d8SAndrew Jeffery 68fe0f01d8SAndrew Jeffery Migrate to pldm_bios_table_attr_entry_integer_encode_check() 69fe0f01d8SAndrew Jeffery 707aeb7edbSAndrew Jeffery2. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum() 717aeb7edbSAndrew Jeffery 727aeb7edbSAndrew Jeffery Migrate to pldm_bios_table_attr_value_entry_encode_enum_check() 737aeb7edbSAndrew Jeffery 742d66393fSAndrew Jeffery3. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string() 752d66393fSAndrew Jeffery 762d66393fSAndrew Jeffery Migrate to pldm_bios_table_attr_value_entry_encode_string_check() 772d66393fSAndrew Jeffery 780088a6aeSAndrew Jeffery4. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer() 790088a6aeSAndrew Jeffery 800088a6aeSAndrew Jeffery Migrate to pldm_bios_table_attr_value_entry_encode_integer_check() 810088a6aeSAndrew Jeffery 82d11bf9f7SAndrew Jeffery5. pdr: Deprecate is_present() 83d11bf9f7SAndrew Jeffery 84d11bf9f7SAndrew Jeffery There should be no users of this symbol. If you are a user, you should figure 85d11bf9f7SAndrew Jeffery out how to stop, or get in touch. This symbol will be marked static the 86d11bf9f7SAndrew Jeffery release after deprecation. 87d11bf9f7SAndrew Jeffery 88bfeb65ebSAndrew Jeffery6. pdr: Deprecate find_entity_ref_in_tree() 89bfeb65ebSAndrew Jeffery 90bfeb65ebSAndrew Jeffery There should be no users of this symbol. If you are a user, you should figure 91bfeb65ebSAndrew Jeffery out how to stop, or get in touch. This symbol will be marked static the 92bfeb65ebSAndrew Jeffery release after deprecation. 93bfeb65ebSAndrew Jeffery 946409c8a0SAndrew Jeffery### Removed 956409c8a0SAndrew Jeffery 966409c8a0SAndrew Jeffery1. bios_table: Remove deprecated APIs sanitized by assert(): 976409c8a0SAndrew Jeffery 986409c8a0SAndrew Jeffery - pldm_bios_table_string_entry_encode() 996409c8a0SAndrew Jeffery - pldm_bios_table_string_entry_decode_string() 1006409c8a0SAndrew Jeffery - pldm_bios_table_attr_entry_enum_encode() 1016409c8a0SAndrew Jeffery - pldm_bios_table_attr_entry_enum_decode_pv_num() 1026409c8a0SAndrew Jeffery - pldm_bios_table_attr_entry_enum_decode_def_num() 1036409c8a0SAndrew Jeffery - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 1046409c8a0SAndrew Jeffery - pldm_bios_table_attr_entry_string_encode() 1056409c8a0SAndrew Jeffery - pldm_bios_table_attr_entry_string_decode_def_string_length() 1066409c8a0SAndrew Jeffery 10709778a82SAndrew Jeffery### Fixed 108ffd5342cSPavithra Barithaya 109ffd5342cSPavithra Barithaya1. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API 1108cf70456SPavithra Barithaya2. pdr: Rework pldm_pdr_find_container_id_range_exclude() API 111a4da6858SAndrew Jeffery3. transport: mctp-demux: Don't test socket for non-zero value 1124e1ba8a7SAndrew Jeffery4. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error 113af7a4d82SAndrew Jeffery5. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return 114ffd5342cSPavithra Barithaya 115291da195SAndrew Jeffery## [0.3.0] - 2023-06-23 116291da195SAndrew Jeffery 1177c250340SDung Cao### Added 1187c250340SDung Cao 1197c250340SDung Cao1. Add encode/decode pldmMessagePollEvent data 12083841fb5SAndrew Jeffery2. README: Add a section on working with libpldm 12139bd2ea5SArchanaKakani3. pdr: Introduce remote_container_id and associated APIs 1229947f9d6SPavithra Barithaya4. pdr: Add APIs for creating and locating remote PDRs 1234d694346SPavithra Barithaya5. pdr: Add pldm_pdr_find_last_in_range() 12425ddbccfSPavithra Barithaya6. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle() 1255dc02571SPavithra Barithaya7. pdr: Add pldm_pdr_find_container_id_range_exclude() 1267c250340SDung Cao 127b443b487SRashmica Gupta### Changed 128b443b487SRashmica Gupta 129b443b487SRashmica Gupta1. include: Move installed transport.h under libpldm/ 13083841fb5SAndrew Jeffery2. libpldm: Explicit deprecated, stable and testing ABI classes 1318de8e1ecSAndrew Jeffery3. meson: Reduce strength of oem-ibm requirements from enabled to allowed 1328de8e1ecSAndrew Jeffery 1338de8e1ecSAndrew Jeffery The `oem-ibm` feature is now enabled by the default meson configuration, for 1348de8e1ecSAndrew Jeffery CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake 1358de8e1ecSAndrew Jeffery recipe: 1368de8e1ecSAndrew Jeffery 1378de8e1ecSAndrew Jeffery https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10 1388de8e1ecSAndrew Jeffery 1398de8e1ecSAndrew Jeffery To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled` 1408de8e1ecSAndrew Jeffery when invoking `meson setup` 141b443b487SRashmica Gupta 14298c1e69dSAndrew Jeffery4. bios_table: Relax pldm_bios_table_string_entry_decode_string_check() 1430c9f5a8aSAndrew Jeffery5. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() 14498c1e69dSAndrew Jeffery 145d47e8ab8SAndrew Jeffery### Deprecated 146d47e8ab8SAndrew Jeffery 147d47e8ab8SAndrew Jeffery1. bios_table: Deprecate APIs with arguments sanitized using assert() 148d47e8ab8SAndrew Jeffery 149d47e8ab8SAndrew Jeffery C provides enough foot-guns without us encoding them into library APIs. 150d47e8ab8SAndrew Jeffery Specifically, deprecate the following in favour of their `*_check()` variants 151d47e8ab8SAndrew Jeffery which ensure assertions won't fail or otherwise invoke UB: 152d47e8ab8SAndrew Jeffery 153d47e8ab8SAndrew Jeffery - pldm_bios_table_string_entry_encode() 154d47e8ab8SAndrew Jeffery - pldm_bios_table_string_entry_decode_string() 155d47e8ab8SAndrew Jeffery - pldm_bios_table_attr_entry_enum_encode() 156d47e8ab8SAndrew Jeffery - pldm_bios_table_attr_entry_enum_decode_pv_num() 157d47e8ab8SAndrew Jeffery - pldm_bios_table_attr_entry_enum_decode_def_num() 158d47e8ab8SAndrew Jeffery - pldm_bios_table_attr_entry_enum_decode_pv_hdls() 159d47e8ab8SAndrew Jeffery - pldm_bios_table_attr_entry_string_encode() 160d47e8ab8SAndrew Jeffery - pldm_bios_table_attr_entry_string_decode_def_string_length() 161d47e8ab8SAndrew Jeffery 1624b4603b3SAndrew Jeffery### Removed 1634b4603b3SAndrew Jeffery 1644b4603b3SAndrew Jeffery1. libpldm: Remove the requester-api option 1654b4603b3SAndrew Jeffery 16639f88325SRashmica Gupta### Fixed 16739f88325SRashmica Gupta 16839f88325SRashmica Gupta1. requester: Make pldm_open() return existing fd 169abaf61f4SDung Cao2. transport: Prevent sticking in waiting for response 170b01fb1ccSThu Nguyen3. transport: Match on response in pldm_transport_send_recv_msg() 171a3035938SRashmica Gupta4. requester: Add check before accessing hdr in pldm_recv() 172df02e360SAndrew Jeffery5. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref 173