xref: /openbmc/libpldm/CHANGELOG.md (revision c79a5df5)
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()
38
39### Fixed
40
411. requester: Fix response buffer cast in pldm_send_recv()
422. pdr: Hoist record handle overflow test to avoid memory leak
43
44## [0.4.0] - 2023-07-14
45
46### Added
47
481. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
492. fru: Introduce get_fru_record_by_option_check()
503. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
514. pdr: Introduce pldm_pdr_add_check()
525. pdr: Introduce pldm_pdr_add_fru_record_set_check()
53
54### Changed
55
561. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
572. requester: Expose pldm_close() in header
583. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
594. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
605. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
616. pdr: pldm_pdr_init(): Return NULL on allocation failure
627. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
638. pdr: Document preconditions for trivial accessor functions
64
65   A trivial accessor function is one that exposes properties of an object in a
66   way can't result in an error, beyond passing an invalid argument to the
67   function. For APIs meeting this definition we define a precondition that
68   struct pointers must point to valid objects to avoid polluting the function
69   prototypes. The following APIs now have this precondition explicitly defined:
70
71   - pldm_entity_extract()
72   - pldm_entity_get_parent()
73   - pldm_entity_is_exist_parent()
74   - pldm_entity_is_node_parent()
75   - pldm_is_current_parent_child
76   - pldm_is_empty_entity_assoc_tree()
77   - pldm_pdr_get_record_count()
78   - pldm_pdr_get_record_handle()
79   - pldm_pdr_get_repo_size()
80   - pldm_pdr_record_is_remote()
81
829. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
8310. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
8411. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
8512. pdr: pldm_entity_association_tree_visit(): Document preconditions
8613. pdr: pldm_entity_association_tree_visit(): Exit early on failure
8714. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
8815. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
8916. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
9017. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
9118. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
9219. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
9320. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
9421. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
9522. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
9623. pdr: pldm_entity_get_num_children(): Don't return invalid values
9724. libpldm: Lift or remove asserts where a subsequent check exists
98
99### Deprecated
100
1011. pldm_bios_table_attr_entry_integer_encode()
102
103   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
104
1052. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
106
107   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
108
1093. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
110
111   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
112
1134. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
114
115   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
116
1175. pdr: Deprecate is_present()
118
119   There should be no users of this symbol. If you are a user, you should figure
120   out how to stop, or get in touch. This symbol will be marked static the
121   release after deprecation.
122
1236. pdr: Deprecate find_entity_ref_in_tree()
124
125   There should be no users of this symbol. If you are a user, you should figure
126   out how to stop, or get in touch. This symbol will be marked static the
127   release after deprecation.
128
1297. pdr: Deprecate entity_association_tree_find()
130
131   There should be no users of this symbol. If you are a user, you should figure
132   out how to stop, or get in touch. This symbol will be marked static the
133   release after deprecation.
134
1358. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
136
137   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
138   pldm_bios_table_append_pad_checksum() should migrate to
139   pldm_bios_table_append_pad_checksum_check()
140
1419. fru: Stabilise get_fru_record_by_option_check()
142
143   get_fru_record_by_option() is deprecated by this change. Users of
144   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
145
14610. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
147
148    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
149    Users of pldm_entity_association_pdr_add_from_node() should migrate to
150    pldm_entity_association_pdr_add_from_node_check()
151
15211. pdr: Stabilise pldm_pdr_add_check()
153
154    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
155    migrate to pldm_pdr_add_check()
156
15712. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
158
159    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
160    pldm_pdr_add_fru_record_set() should migrate to
161    pldm_pdr_add_fru_record_set_check()
162
163### Removed
164
1651. bios_table: Remove deprecated APIs sanitized by assert():
166
167   - pldm_bios_table_string_entry_encode()
168   - pldm_bios_table_string_entry_decode_string()
169   - pldm_bios_table_attr_entry_enum_encode()
170   - pldm_bios_table_attr_entry_enum_decode_pv_num()
171   - pldm_bios_table_attr_entry_enum_decode_def_num()
172   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
173   - pldm_bios_table_attr_entry_string_encode()
174   - pldm_bios_table_attr_entry_string_decode_def_string_length()
175
176### Fixed
177
1781. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
1792. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
1803. transport: mctp-demux: Don't test socket for non-zero value
1814. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
1825. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
1836. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
1847. abi: Update to remove pldm_close() from reference dumps
1858. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
186
187## [0.3.0] - 2023-06-23
188
189### Added
190
1911. Add encode/decode pldmMessagePollEvent data
1922. README: Add a section on working with libpldm
1933. pdr: Introduce remote_container_id and associated APIs
1944. pdr: Add APIs for creating and locating remote PDRs
1955. pdr: Add pldm_pdr_find_last_in_range()
1966. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
1977. pdr: Add pldm_pdr_find_container_id_range_exclude()
198
199### Changed
200
2011. include: Move installed transport.h under libpldm/
2022. libpldm: Explicit deprecated, stable and testing ABI classes
2033. meson: Reduce strength of oem-ibm requirements from enabled to allowed
204
205   The `oem-ibm` feature is now enabled by the default meson configuration, for
206   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
207   recipe:
208
209   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
210
211   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
212   when invoking `meson setup`
213
2144. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
2155. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
216
217### Deprecated
218
2191. bios_table: Deprecate APIs with arguments sanitized using assert()
220
221   C provides enough foot-guns without us encoding them into library APIs.
222   Specifically, deprecate the following in favour of their `*_check()` variants
223   which ensure assertions won't fail or otherwise invoke UB:
224
225   - pldm_bios_table_string_entry_encode()
226   - pldm_bios_table_string_entry_decode_string()
227   - pldm_bios_table_attr_entry_enum_encode()
228   - pldm_bios_table_attr_entry_enum_decode_pv_num()
229   - pldm_bios_table_attr_entry_enum_decode_def_num()
230   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
231   - pldm_bios_table_attr_entry_string_encode()
232   - pldm_bios_table_attr_entry_string_decode_def_string_length()
233
234### Removed
235
2361. libpldm: Remove the requester-api option
237
238### Fixed
239
2401. requester: Make pldm_open() return existing fd
2412. transport: Prevent sticking in waiting for response
2423. transport: Match on response in pldm_transport_send_recv_msg()
2434. requester: Add check before accessing hdr in pldm_recv()
2445. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
245