xref: /openbmc/libpldm/CHANGELOG.md (revision 8bcbe2513d3b1d11b4c1fc76aa8546a58bd9a123)
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### Deprecated
29
301. state-set: Enum pldm_state_set_operational_fault_status_values
31
32   The enum operational_fault_status is defined with wrong members and will
33   eventually be replaced with the correct members. Any uses of
34   pldm_state_set_operational_fault_status_values members should move to
35   equivalent pldm_state_set_operational_stress_status_values members if needed.
36
372. platform: Struct field name in fru_record_set PDR
38
39   References to entity_instance_num should be changed to entity_instance
40
413. platform: Struct field name in numeric sensor value PDR
42
43   References to entity_instance_num should be changed to entity_instance
44
45### Removed
46
471. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
482. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
493. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
504. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
515. bios_table: Remove pldm_bios_table_append_pad_checksum()
526. fru: Remove get_fru_record_by_option()
537. pdr: Make is_present() static
548. pdr: Remove pldm_pdr_add()
559. pdr: Remove pldm_pdr_add_fru_record_set()
5610. pdr: Remove pldm_entity_association_pdr_add_from_node()
5711. pdr: Make find_entity_ref_in_tree() static
5812. pdr: Make entity_association_tree_find() static
59
60### Fixed
61
621. requester: Fix response buffer cast in pldm_send_recv()
632. pdr: Hoist record handle overflow test to avoid memory leak
64
65## [0.4.0] - 2023-07-14
66
67### Added
68
691. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
702. fru: Introduce get_fru_record_by_option_check()
713. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
724. pdr: Introduce pldm_pdr_add_check()
735. pdr: Introduce pldm_pdr_add_fru_record_set_check()
74
75### Changed
76
771. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
782. requester: Expose pldm_close() in header
793. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
804. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
815. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
826. pdr: pldm_pdr_init(): Return NULL on allocation failure
837. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
848. pdr: Document preconditions for trivial accessor functions
85
86   A trivial accessor function is one that exposes properties of an object in a
87   way can't result in an error, beyond passing an invalid argument to the
88   function. For APIs meeting this definition we define a precondition that
89   struct pointers must point to valid objects to avoid polluting the function
90   prototypes. The following APIs now have this precondition explicitly defined:
91
92   - pldm_entity_extract()
93   - pldm_entity_get_parent()
94   - pldm_entity_is_exist_parent()
95   - pldm_entity_is_node_parent()
96   - pldm_is_current_parent_child
97   - pldm_is_empty_entity_assoc_tree()
98   - pldm_pdr_get_record_count()
99   - pldm_pdr_get_record_handle()
100   - pldm_pdr_get_repo_size()
101   - pldm_pdr_record_is_remote()
102
1039. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
10410. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
10511. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
10612. pdr: pldm_entity_association_tree_visit(): Document preconditions
10713. pdr: pldm_entity_association_tree_visit(): Exit early on failure
10814. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
10915. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
11016. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
11117. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
11218. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
11319. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
11420. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
11521. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
11622. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
11723. pdr: pldm_entity_get_num_children(): Don't return invalid values
11824. libpldm: Lift or remove asserts where a subsequent check exists
119
120### Deprecated
121
1221. pldm_bios_table_attr_entry_integer_encode()
123
124   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
125
1262. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
127
128   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
129
1303. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
131
132   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
133
1344. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
135
136   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
137
1385. pdr: Deprecate is_present()
139
140   There should be no users of this symbol. If you are a user, you should figure
141   out how to stop, or get in touch. This symbol will be marked static the
142   release after deprecation.
143
1446. pdr: Deprecate find_entity_ref_in_tree()
145
146   There should be no users of this symbol. If you are a user, you should figure
147   out how to stop, or get in touch. This symbol will be marked static the
148   release after deprecation.
149
1507. pdr: Deprecate entity_association_tree_find()
151
152   There should be no users of this symbol. If you are a user, you should figure
153   out how to stop, or get in touch. This symbol will be marked static the
154   release after deprecation.
155
1568. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
157
158   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
159   pldm_bios_table_append_pad_checksum() should migrate to
160   pldm_bios_table_append_pad_checksum_check()
161
1629. fru: Stabilise get_fru_record_by_option_check()
163
164   get_fru_record_by_option() is deprecated by this change. Users of
165   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
166
16710. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
168
169    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
170    Users of pldm_entity_association_pdr_add_from_node() should migrate to
171    pldm_entity_association_pdr_add_from_node_check()
172
17311. pdr: Stabilise pldm_pdr_add_check()
174
175    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
176    migrate to pldm_pdr_add_check()
177
17812. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
179
180    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
181    pldm_pdr_add_fru_record_set() should migrate to
182    pldm_pdr_add_fru_record_set_check()
183
184### Removed
185
1861. bios_table: Remove deprecated APIs sanitized by assert():
187
188   - pldm_bios_table_string_entry_encode()
189   - pldm_bios_table_string_entry_decode_string()
190   - pldm_bios_table_attr_entry_enum_encode()
191   - pldm_bios_table_attr_entry_enum_decode_pv_num()
192   - pldm_bios_table_attr_entry_enum_decode_def_num()
193   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
194   - pldm_bios_table_attr_entry_string_encode()
195   - pldm_bios_table_attr_entry_string_decode_def_string_length()
196
197### Fixed
198
1991. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
2002. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
2013. transport: mctp-demux: Don't test socket for non-zero value
2024. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
2035. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
2046. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
2057. abi: Update to remove pldm_close() from reference dumps
2068. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
207
208## [0.3.0] - 2023-06-23
209
210### Added
211
2121. Add encode/decode pldmMessagePollEvent data
2132. README: Add a section on working with libpldm
2143. pdr: Introduce remote_container_id and associated APIs
2154. pdr: Add APIs for creating and locating remote PDRs
2165. pdr: Add pldm_pdr_find_last_in_range()
2176. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
2187. pdr: Add pldm_pdr_find_container_id_range_exclude()
219
220### Changed
221
2221. include: Move installed transport.h under libpldm/
2232. libpldm: Explicit deprecated, stable and testing ABI classes
2243. meson: Reduce strength of oem-ibm requirements from enabled to allowed
225
226   The `oem-ibm` feature is now enabled by the default meson configuration, for
227   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
228   recipe:
229
230   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
231
232   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
233   when invoking `meson setup`
234
2354. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
2365. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
237
238### Deprecated
239
2401. bios_table: Deprecate APIs with arguments sanitized using assert()
241
242   C provides enough foot-guns without us encoding them into library APIs.
243   Specifically, deprecate the following in favour of their `*_check()` variants
244   which ensure assertions won't fail or otherwise invoke UB:
245
246   - pldm_bios_table_string_entry_encode()
247   - pldm_bios_table_string_entry_decode_string()
248   - pldm_bios_table_attr_entry_enum_encode()
249   - pldm_bios_table_attr_entry_enum_decode_pv_num()
250   - pldm_bios_table_attr_entry_enum_decode_def_num()
251   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
252   - pldm_bios_table_attr_entry_string_encode()
253   - pldm_bios_table_attr_entry_string_decode_def_string_length()
254
255### Removed
256
2571. libpldm: Remove the requester-api option
258
259### Fixed
260
2611. requester: Make pldm_open() return existing fd
2622. transport: Prevent sticking in waiting for response
2633. transport: Match on response in pldm_transport_send_recv_msg()
2644. requester: Add check before accessing hdr in pldm_recv()
2655. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
266