xref: /openbmc/libpldm/CHANGELOG.md (revision efb40069)
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. base: Provide pldm_msg_hdr_correlate_response()
232. transport: af-mctp: Add pldm_transport_af_mctp_bind()
243. oem: ibm: Add chapdata file type support
254. base: Added PLDM_SMBIOS & PLDM_RDE message types
26
27### Changed
28
291. base: Stabilise pldm_msg_hdr_correlate_response()
302. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
313. libpldm: Fix header use
324. libpldm: More fixes for header use
33
34### Fixed
35
361. libpldm: Rationalise the local and installed path of pldm.h
37
38## [0.7.0] - 2023-08-29
39
40### Added
41
421. state-set: Add new enum for Operational Fault Status enum
43
44### Changed
45
461. transport: Match specified metadata in pldm_transport_send_recv_msg()
472. transport: mctp-demux: Drop ABI annotation for internal symbols
483. transport: Stabilise core transport and implementation APIs
49
50   This stabilisation covers the following headers and functions:
51
52   - libpldm/transport.h
53
54     - pldm_transport_poll()
55     - pldm_transport_send_msg()
56     - pldm_transport_recv_msg()
57     - pldm_transport_send_recv_msg()
58
59   - libpldm/transport/af-mctp.h
60
61     - pldm_transport_af_mctp_init()
62     - pldm_transport_af_mctp_destroy()
63     - pldm_transport_af_mctp_core()
64     - pldm_transport_af_mctp_init_pollfd()
65     - pldm_transport_af_mctp_map_tid()
66     - pldm_transport_af_mctp_unmap_tid()
67
68   - libpldm/transport/mctp-demux.h
69     - pldm_transport_mctp_demux_init()
70     - pldm_transport_mctp_demux_destroy()
71     - pldm_transport_mctp_demux_core()
72     - pldm_transport_mctp_demux_init_pollfd()
73     - pldm_transport_mctp_demux_map_tid()
74     - pldm_transport_mctp_demux_unmap_tid()
75
76### Deprecated
77
781. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
79   `libpldm/requester/pldm.h`):
80
81   - pldm_open()
82   - pldm_send_recv()
83   - pldm_send()
84   - pldm_recv()
85   - pldm_recv_any()
86   - pldm_close()
87
88   Users should migrate to the newer "transport" APIs instead.
89
90## Fixed
91
921. tests: Exclude transport tests when build excludes testing ABIs
932. abi: Capture deprecation of pldm_close()
94
95## [0.6.0] - 2023-08-22
96
97### Changed
98
991. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
1002. meson: Apply `b_ndebug=if-release` by default
1013. pdr : Stabilize pldm_entity_association_tree_add_entity()
1024. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
1035. pdr: Stabilize pldm_entity_node_get_remote_container_id()
1046. transport: af-mctp: Assign out-params on success in \*\_recv()
1057. transport: Generalise the pldm_transport_recv_msg() API
106
107### Removed
108
1091. pdr: Remove pldm_entity_association_pdr_add()
1102. state-set: Remove enum pldm_state_set_operational_fault_status_values
111
112### Fixed
113
1141. transport: register init_pollfd callback for af-mctp
1152. transport: fix init_pollfd function parameter
1163. transport: Fix doxygen and variables for send and recv functions
1174. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
118
119## [0.5.0] - 2023-08-09
120
121### Added
122
1231. pdr: Introduce pldm_entity_association_pdr_add_check()
124
125### Changed
126
1271. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
1282. transport: pldm_transport_poll(): Adjust return value semantics
1293. transport: free un-wanted responses in pldm_transport_send_recv_msg()
130
131### Deprecated
132
1331. state-set: Enum pldm_state_set_operational_fault_status_values
134
135   The enum operational_fault_status is defined with wrong members and will
136   eventually be replaced with the correct members. Any uses of
137   pldm_state_set_operational_fault_status_values members should move to
138   equivalent pldm_state_set_operational_stress_status_values members if needed.
139
1402. platform: Struct field name in fru_record_set PDR
141
142   References to entity_instance_num should be changed to entity_instance
143
1443. platform: Struct field name in numeric sensor value PDR
145
146   References to entity_instance_num should be changed to entity_instance
147
148### Removed
149
1501. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
1512. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
1523. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
1534. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
1545. bios_table: Remove pldm_bios_table_append_pad_checksum()
1556. fru: Remove get_fru_record_by_option()
1567. pdr: Make is_present() static
1578. pdr: Remove pldm_pdr_add()
1589. pdr: Remove pldm_pdr_add_fru_record_set()
15910. pdr: Remove pldm_entity_association_pdr_add_from_node()
16011. pdr: Make find_entity_ref_in_tree() static
16112. pdr: Make entity_association_tree_find() static
162
163### Fixed
164
1651. requester: Fix response buffer cast in pldm_send_recv()
1662. pdr: Hoist record handle overflow test to avoid memory leak
1673. transport: Correct comparison in while loop condition
168
169## [0.4.0] - 2023-07-14
170
171### Added
172
1731. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
1742. fru: Introduce get_fru_record_by_option_check()
1753. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
1764. pdr: Introduce pldm_pdr_add_check()
1775. pdr: Introduce pldm_pdr_add_fru_record_set_check()
178
179### Changed
180
1811. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
1822. requester: Expose pldm_close() in header
1833. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
1844. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
1855. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
1866. pdr: pldm_pdr_init(): Return NULL on allocation failure
1877. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
1888. pdr: Document preconditions for trivial accessor functions
189
190   A trivial accessor function is one that exposes properties of an object in a
191   way can't result in an error, beyond passing an invalid argument to the
192   function. For APIs meeting this definition we define a precondition that
193   struct pointers must point to valid objects to avoid polluting the function
194   prototypes. The following APIs now have this precondition explicitly defined:
195
196   - pldm_entity_extract()
197   - pldm_entity_get_parent()
198   - pldm_entity_is_exist_parent()
199   - pldm_entity_is_node_parent()
200   - pldm_is_current_parent_child
201   - pldm_is_empty_entity_assoc_tree()
202   - pldm_pdr_get_record_count()
203   - pldm_pdr_get_record_handle()
204   - pldm_pdr_get_repo_size()
205   - pldm_pdr_record_is_remote()
206
2079. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
20810. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
20911. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
21012. pdr: pldm_entity_association_tree_visit(): Document preconditions
21113. pdr: pldm_entity_association_tree_visit(): Exit early on failure
21214. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
21315. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
21416. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
21517. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
21618. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
21719. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
21820. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
21921. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
22022. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
22123. pdr: pldm_entity_get_num_children(): Don't return invalid values
22224. libpldm: Lift or remove asserts where a subsequent check exists
223
224### Deprecated
225
2261. pldm_bios_table_attr_entry_integer_encode()
227
228   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
229
2302. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
231
232   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
233
2343. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
235
236   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
237
2384. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
239
240   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
241
2425. pdr: Deprecate is_present()
243
244   There should be no users of this symbol. If you are a user, you should figure
245   out how to stop, or get in touch. This symbol will be marked static the
246   release after deprecation.
247
2486. pdr: Deprecate find_entity_ref_in_tree()
249
250   There should be no users of this symbol. If you are a user, you should figure
251   out how to stop, or get in touch. This symbol will be marked static the
252   release after deprecation.
253
2547. pdr: Deprecate entity_association_tree_find()
255
256   There should be no users of this symbol. If you are a user, you should figure
257   out how to stop, or get in touch. This symbol will be marked static the
258   release after deprecation.
259
2608. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
261
262   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
263   pldm_bios_table_append_pad_checksum() should migrate to
264   pldm_bios_table_append_pad_checksum_check()
265
2669. fru: Stabilise get_fru_record_by_option_check()
267
268   get_fru_record_by_option() is deprecated by this change. Users of
269   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
270
27110. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
272
273    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
274    Users of pldm_entity_association_pdr_add_from_node() should migrate to
275    pldm_entity_association_pdr_add_from_node_check()
276
27711. pdr: Stabilise pldm_pdr_add_check()
278
279    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
280    migrate to pldm_pdr_add_check()
281
28212. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
283
284    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
285    pldm_pdr_add_fru_record_set() should migrate to
286    pldm_pdr_add_fru_record_set_check()
287
288### Removed
289
2901. bios_table: Remove deprecated APIs sanitized by assert():
291
292   - pldm_bios_table_string_entry_encode()
293   - pldm_bios_table_string_entry_decode_string()
294   - pldm_bios_table_attr_entry_enum_encode()
295   - pldm_bios_table_attr_entry_enum_decode_pv_num()
296   - pldm_bios_table_attr_entry_enum_decode_def_num()
297   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
298   - pldm_bios_table_attr_entry_string_encode()
299   - pldm_bios_table_attr_entry_string_decode_def_string_length()
300
301### Fixed
302
3031. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
3042. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
3053. transport: mctp-demux: Don't test socket for non-zero value
3064. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
3075. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
3086. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
3097. abi: Update to remove pldm_close() from reference dumps
3108. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
311
312## [0.3.0] - 2023-06-23
313
314### Added
315
3161. Add encode/decode pldmMessagePollEvent data
3172. README: Add a section on working with libpldm
3183. pdr: Introduce remote_container_id and associated APIs
3194. pdr: Add APIs for creating and locating remote PDRs
3205. pdr: Add pldm_pdr_find_last_in_range()
3216. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
3227. pdr: Add pldm_pdr_find_container_id_range_exclude()
323
324### Changed
325
3261. include: Move installed transport.h under libpldm/
3272. libpldm: Explicit deprecated, stable and testing ABI classes
3283. meson: Reduce strength of oem-ibm requirements from enabled to allowed
329
330   The `oem-ibm` feature is now enabled by the default meson configuration, for
331   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
332   recipe:
333
334   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
335
336   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
337   when invoking `meson setup`
338
3394. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
3405. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
341
342### Deprecated
343
3441. bios_table: Deprecate APIs with arguments sanitized using assert()
345
346   C provides enough foot-guns without us encoding them into library APIs.
347   Specifically, deprecate the following in favour of their `*_check()` variants
348   which ensure assertions won't fail or otherwise invoke UB:
349
350   - pldm_bios_table_string_entry_encode()
351   - pldm_bios_table_string_entry_decode_string()
352   - pldm_bios_table_attr_entry_enum_encode()
353   - pldm_bios_table_attr_entry_enum_decode_pv_num()
354   - pldm_bios_table_attr_entry_enum_decode_def_num()
355   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
356   - pldm_bios_table_attr_entry_string_encode()
357   - pldm_bios_table_attr_entry_string_decode_def_string_length()
358
359### Removed
360
3611. libpldm: Remove the requester-api option
362
363### Fixed
364
3651. requester: Make pldm_open() return existing fd
3662. transport: Prevent sticking in waiting for response
3673. transport: Match on response in pldm_transport_send_recv_msg()
3684. requester: Add check before accessing hdr in pldm_recv()
3695. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
370