xref: /openbmc/libpldm/CHANGELOG.md (revision 20cc060cb71ea9eaf2992ce18882359fb887ac46)
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
20*20cc060cSAndrew Jeffery## [0.5.0] - 2023-08-09
21*20cc060cSAndrew Jeffery
2265945992SAndrew Jeffery### Added
2365945992SAndrew Jeffery
2465945992SAndrew Jeffery1. pdr: Introduce pldm_entity_association_pdr_add_check()
2565945992SAndrew Jeffery
263b93d09cSAndrew Jeffery### Changed
273b93d09cSAndrew Jeffery
283b93d09cSAndrew Jeffery1. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
293380a6c6SAndrew Jeffery2. transport: pldm_transport_poll(): Adjust return value semantics
30f56e4dcdSThu Nguyen3. transport: free un-wanted responses in pldm_transport_send_recv_msg()
313b93d09cSAndrew Jeffery
328bcbe251SAndrew Jeffery### Deprecated
338bcbe251SAndrew Jeffery
348bcbe251SAndrew Jeffery1. state-set: Enum pldm_state_set_operational_fault_status_values
358bcbe251SAndrew Jeffery
368bcbe251SAndrew Jeffery   The enum operational_fault_status is defined with wrong members and will
378bcbe251SAndrew Jeffery   eventually be replaced with the correct members. Any uses of
388bcbe251SAndrew Jeffery   pldm_state_set_operational_fault_status_values members should move to
398bcbe251SAndrew Jeffery   equivalent pldm_state_set_operational_stress_status_values members if needed.
408bcbe251SAndrew Jeffery
418bcbe251SAndrew Jeffery2. platform: Struct field name in fru_record_set PDR
428bcbe251SAndrew Jeffery
438bcbe251SAndrew Jeffery   References to entity_instance_num should be changed to entity_instance
448bcbe251SAndrew Jeffery
458bcbe251SAndrew Jeffery3. platform: Struct field name in numeric sensor value PDR
468bcbe251SAndrew Jeffery
478bcbe251SAndrew Jeffery   References to entity_instance_num should be changed to entity_instance
488bcbe251SAndrew Jeffery
490ecf6bcfSAndrew Jeffery### Removed
500ecf6bcfSAndrew Jeffery
510ecf6bcfSAndrew Jeffery1. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
528b1c0340SAndrew Jeffery2. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
5346d07685SAndrew Jeffery3. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
544e1f131cSAndrew Jeffery4. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
5550dd159eSAndrew Jeffery5. bios_table: Remove pldm_bios_table_append_pad_checksum()
568810feceSAndrew Jeffery6. fru: Remove get_fru_record_by_option()
57d09b1af0SAndrew Jeffery7. pdr: Make is_present() static
58c79a5df5SAndrew Jeffery8. pdr: Remove pldm_pdr_add()
5914d2984bSAndrew Jeffery9. pdr: Remove pldm_pdr_add_fru_record_set()
608985dfd1SAndrew Jeffery10. pdr: Remove pldm_entity_association_pdr_add_from_node()
61643c443bSAndrew Jeffery11. pdr: Make find_entity_ref_in_tree() static
6254d91e81SAndrew Jeffery12. pdr: Make entity_association_tree_find() static
630ecf6bcfSAndrew Jeffery
6443a7985dSThu Nguyen### Fixed
6543a7985dSThu Nguyen
6643a7985dSThu Nguyen1. requester: Fix response buffer cast in pldm_send_recv()
67c6cc028fSAndrew Jeffery2. pdr: Hoist record handle overflow test to avoid memory leak
68ef485068SThu Nguyen3. transport: Correct comparison in while loop condition
6943a7985dSThu Nguyen
708a4b5336SAndrew Jeffery## [0.4.0] - 2023-07-14
718a4b5336SAndrew Jeffery
72044ee19aSAndrew Jeffery### Added
73044ee19aSAndrew Jeffery
74044ee19aSAndrew Jeffery1. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
757cd16ff8SAndrew Jeffery2. fru: Introduce get_fru_record_by_option_check()
76cc394529SAndrew Jeffery3. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
77572a3950SAndrew Jeffery4. pdr: Introduce pldm_pdr_add_check()
78c821a700SAndrew Jeffery5. pdr: Introduce pldm_pdr_add_fru_record_set_check()
79044ee19aSAndrew Jeffery
80986df2a1SAndrew Jeffery### Changed
81986df2a1SAndrew Jeffery
82986df2a1SAndrew Jeffery1. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
835fb9680bSAndrew Jeffery2. requester: Expose pldm_close() in header
84a873eca0SAndrew Jeffery3. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
85757e81a1SAndrew Jeffery4. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
8673d9176aSAndrew Jeffery5. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
87a8bb22edSAndrew Jeffery6. pdr: pldm_pdr_init(): Return NULL on allocation failure
88fca1b60fSAndrew Jeffery7. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
895565fcdeSAndrew Jeffery8. pdr: Document preconditions for trivial accessor functions
905565fcdeSAndrew Jeffery
915565fcdeSAndrew Jeffery   A trivial accessor function is one that exposes properties of an object in a
925565fcdeSAndrew Jeffery   way can't result in an error, beyond passing an invalid argument to the
935565fcdeSAndrew Jeffery   function. For APIs meeting this definition we define a precondition that
945565fcdeSAndrew Jeffery   struct pointers must point to valid objects to avoid polluting the function
955565fcdeSAndrew Jeffery   prototypes. The following APIs now have this precondition explicitly defined:
965565fcdeSAndrew Jeffery
975565fcdeSAndrew Jeffery   - pldm_entity_extract()
985565fcdeSAndrew Jeffery   - pldm_entity_get_parent()
995565fcdeSAndrew Jeffery   - pldm_entity_is_exist_parent()
1005565fcdeSAndrew Jeffery   - pldm_entity_is_node_parent()
1015565fcdeSAndrew Jeffery   - pldm_is_current_parent_child
1025565fcdeSAndrew Jeffery   - pldm_is_empty_entity_assoc_tree()
1035565fcdeSAndrew Jeffery   - pldm_pdr_get_record_count()
1045565fcdeSAndrew Jeffery   - pldm_pdr_get_record_handle()
1055565fcdeSAndrew Jeffery   - pldm_pdr_get_repo_size()
1065565fcdeSAndrew Jeffery   - pldm_pdr_record_is_remote()
107986df2a1SAndrew Jeffery
10815b8818cSAndrew Jeffery9. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
10901425e96SAndrew Jeffery10. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
110c40037d5SAndrew Jeffery11. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
1118e9b0de8SAndrew Jeffery12. pdr: pldm_entity_association_tree_visit(): Document preconditions
112cd17e5ccSAndrew Jeffery13. pdr: pldm_entity_association_tree_visit(): Exit early on failure
113a89e015cSAndrew Jeffery14. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
1146e8a2617SAndrew Jeffery15. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
115375d9fc1SAndrew Jeffery16. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
116c788348eSAndrew Jeffery17. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
117ba47e83eSAndrew Jeffery18. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
11894e364dbSAndrew Jeffery19. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
11985d7a056SAndrew Jeffery20. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
1203a5c46b4SAndrew Jeffery21. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
1210dbaa70fSAndrew Jeffery22. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
122c83ef86dSAndrew Jeffery23. pdr: pldm_entity_get_num_children(): Don't return invalid values
1238526892fSAndrew Jeffery24. libpldm: Lift or remove asserts where a subsequent check exists
12415b8818cSAndrew Jeffery
125fe0f01d8SAndrew Jeffery### Deprecated
126fe0f01d8SAndrew Jeffery
127fe0f01d8SAndrew Jeffery1. pldm_bios_table_attr_entry_integer_encode()
128fe0f01d8SAndrew Jeffery
129fe0f01d8SAndrew Jeffery   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
130fe0f01d8SAndrew Jeffery
1317aeb7edbSAndrew Jeffery2. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
1327aeb7edbSAndrew Jeffery
1337aeb7edbSAndrew Jeffery   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
1347aeb7edbSAndrew Jeffery
1352d66393fSAndrew Jeffery3. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
1362d66393fSAndrew Jeffery
1372d66393fSAndrew Jeffery   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
1382d66393fSAndrew Jeffery
1390088a6aeSAndrew Jeffery4. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
1400088a6aeSAndrew Jeffery
1410088a6aeSAndrew Jeffery   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
1420088a6aeSAndrew Jeffery
143d11bf9f7SAndrew Jeffery5. pdr: Deprecate is_present()
144d11bf9f7SAndrew Jeffery
145d11bf9f7SAndrew Jeffery   There should be no users of this symbol. If you are a user, you should figure
146d11bf9f7SAndrew Jeffery   out how to stop, or get in touch. This symbol will be marked static the
147d11bf9f7SAndrew Jeffery   release after deprecation.
148d11bf9f7SAndrew Jeffery
149bfeb65ebSAndrew Jeffery6. pdr: Deprecate find_entity_ref_in_tree()
150bfeb65ebSAndrew Jeffery
151bfeb65ebSAndrew Jeffery   There should be no users of this symbol. If you are a user, you should figure
152bfeb65ebSAndrew Jeffery   out how to stop, or get in touch. This symbol will be marked static the
153bfeb65ebSAndrew Jeffery   release after deprecation.
154bfeb65ebSAndrew Jeffery
1557f589313SAndrew Jeffery7. pdr: Deprecate entity_association_tree_find()
1567f589313SAndrew Jeffery
1577f589313SAndrew Jeffery   There should be no users of this symbol. If you are a user, you should figure
1587f589313SAndrew Jeffery   out how to stop, or get in touch. This symbol will be marked static the
1597f589313SAndrew Jeffery   release after deprecation.
1607f589313SAndrew Jeffery
1611264fbd9SAndrew Jeffery8. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
1621264fbd9SAndrew Jeffery
1631264fbd9SAndrew Jeffery   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
1641264fbd9SAndrew Jeffery   pldm_bios_table_append_pad_checksum() should migrate to
1651264fbd9SAndrew Jeffery   pldm_bios_table_append_pad_checksum_check()
1661264fbd9SAndrew Jeffery
167962fcec7SAndrew Jeffery9. fru: Stabilise get_fru_record_by_option_check()
168962fcec7SAndrew Jeffery
169962fcec7SAndrew Jeffery   get_fru_record_by_option() is deprecated by this change. Users of
170962fcec7SAndrew Jeffery   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
171962fcec7SAndrew Jeffery
1721354a6eeSAndrew Jeffery10. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
1731354a6eeSAndrew Jeffery
1741354a6eeSAndrew Jeffery    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
1751354a6eeSAndrew Jeffery    Users of pldm_entity_association_pdr_add_from_node() should migrate to
1761354a6eeSAndrew Jeffery    pldm_entity_association_pdr_add_from_node_check()
1771354a6eeSAndrew Jeffery
178ca248ce3SAndrew Jeffery11. pdr: Stabilise pldm_pdr_add_check()
179ca248ce3SAndrew Jeffery
180ca248ce3SAndrew Jeffery    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
181ca248ce3SAndrew Jeffery    migrate to pldm_pdr_add_check()
182ca248ce3SAndrew Jeffery
183a2c69117SAndrew Jeffery12. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
184a2c69117SAndrew Jeffery
185a2c69117SAndrew Jeffery    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
186a2c69117SAndrew Jeffery    pldm_pdr_add_fru_record_set() should migrate to
187a2c69117SAndrew Jeffery    pldm_pdr_add_fru_record_set_check()
188a2c69117SAndrew Jeffery
1896409c8a0SAndrew Jeffery### Removed
1906409c8a0SAndrew Jeffery
1916409c8a0SAndrew Jeffery1. bios_table: Remove deprecated APIs sanitized by assert():
1926409c8a0SAndrew Jeffery
1936409c8a0SAndrew Jeffery   - pldm_bios_table_string_entry_encode()
1946409c8a0SAndrew Jeffery   - pldm_bios_table_string_entry_decode_string()
1956409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_encode()
1966409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_pv_num()
1976409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_def_num()
1986409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
1996409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_string_encode()
2006409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_string_decode_def_string_length()
2016409c8a0SAndrew Jeffery
20209778a82SAndrew Jeffery### Fixed
203ffd5342cSPavithra Barithaya
204ffd5342cSPavithra Barithaya1. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
2058cf70456SPavithra Barithaya2. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
206a4da6858SAndrew Jeffery3. transport: mctp-demux: Don't test socket for non-zero value
2074e1ba8a7SAndrew Jeffery4. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
208af7a4d82SAndrew Jeffery5. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
209178531a0SRashmica Gupta6. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
210cd732d14SAndrew Jeffery7. abi: Update to remove pldm_close() from reference dumps
2119e33be96SAndrew Jeffery8. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
212ffd5342cSPavithra Barithaya
213291da195SAndrew Jeffery## [0.3.0] - 2023-06-23
214291da195SAndrew Jeffery
2157c250340SDung Cao### Added
2167c250340SDung Cao
2177c250340SDung Cao1. Add encode/decode pldmMessagePollEvent data
21883841fb5SAndrew Jeffery2. README: Add a section on working with libpldm
21939bd2ea5SArchanaKakani3. pdr: Introduce remote_container_id and associated APIs
2209947f9d6SPavithra Barithaya4. pdr: Add APIs for creating and locating remote PDRs
2214d694346SPavithra Barithaya5. pdr: Add pldm_pdr_find_last_in_range()
22225ddbccfSPavithra Barithaya6. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
2235dc02571SPavithra Barithaya7. pdr: Add pldm_pdr_find_container_id_range_exclude()
2247c250340SDung Cao
225b443b487SRashmica Gupta### Changed
226b443b487SRashmica Gupta
227b443b487SRashmica Gupta1. include: Move installed transport.h under libpldm/
22883841fb5SAndrew Jeffery2. libpldm: Explicit deprecated, stable and testing ABI classes
2298de8e1ecSAndrew Jeffery3. meson: Reduce strength of oem-ibm requirements from enabled to allowed
2308de8e1ecSAndrew Jeffery
2318de8e1ecSAndrew Jeffery   The `oem-ibm` feature is now enabled by the default meson configuration, for
2328de8e1ecSAndrew Jeffery   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
2338de8e1ecSAndrew Jeffery   recipe:
2348de8e1ecSAndrew Jeffery
2358de8e1ecSAndrew Jeffery   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
2368de8e1ecSAndrew Jeffery
2378de8e1ecSAndrew Jeffery   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
2388de8e1ecSAndrew Jeffery   when invoking `meson setup`
239b443b487SRashmica Gupta
24098c1e69dSAndrew Jeffery4. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
2410c9f5a8aSAndrew Jeffery5. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
24298c1e69dSAndrew Jeffery
243d47e8ab8SAndrew Jeffery### Deprecated
244d47e8ab8SAndrew Jeffery
245d47e8ab8SAndrew Jeffery1. bios_table: Deprecate APIs with arguments sanitized using assert()
246d47e8ab8SAndrew Jeffery
247d47e8ab8SAndrew Jeffery   C provides enough foot-guns without us encoding them into library APIs.
248d47e8ab8SAndrew Jeffery   Specifically, deprecate the following in favour of their `*_check()` variants
249d47e8ab8SAndrew Jeffery   which ensure assertions won't fail or otherwise invoke UB:
250d47e8ab8SAndrew Jeffery
251d47e8ab8SAndrew Jeffery   - pldm_bios_table_string_entry_encode()
252d47e8ab8SAndrew Jeffery   - pldm_bios_table_string_entry_decode_string()
253d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_encode()
254d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_pv_num()
255d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_def_num()
256d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
257d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_string_encode()
258d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_string_decode_def_string_length()
259d47e8ab8SAndrew Jeffery
2604b4603b3SAndrew Jeffery### Removed
2614b4603b3SAndrew Jeffery
2624b4603b3SAndrew Jeffery1. libpldm: Remove the requester-api option
2634b4603b3SAndrew Jeffery
26439f88325SRashmica Gupta### Fixed
26539f88325SRashmica Gupta
26639f88325SRashmica Gupta1. requester: Make pldm_open() return existing fd
267abaf61f4SDung Cao2. transport: Prevent sticking in waiting for response
268b01fb1ccSThu Nguyen3. transport: Match on response in pldm_transport_send_recv_msg()
269a3035938SRashmica Gupta4. requester: Add check before accessing hdr in pldm_recv()
270df02e360SAndrew Jeffery5. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
271