xref: /openbmc/libpldm/CHANGELOG.md (revision a1efaa2e)
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: Define macros for reserved TIDs
23
24### Deprecated
25
261. fru: Deprecate `get_fru_record_by_option_check()`
27
28   Users should switch to `get_fru_record_by_option()`. Migration can be
29   performed using the [Coccinelle semantic patch][coccinelle]
30   `get_fru_record_by_option_check.cocci`:
31
32   ```
33   $ spatch \
34      --sp-file=${LIBPLDM_DIR}/evolutions/current/get_fru_record_by_option_check.cocci \
35      --in-place \
36      $(git ls-files | grep -E '\.[ch](pp)?')
37   ```
38
39[coccinelle]: https://coccinelle.gitlabpages.inria.fr/website/
40
41### Removed
42
431. IBM OEM header compatibility symlinks.
44
45   Anyone left using the deprecated paths can migrate using the coccinelle patch
46   at `evolutions/current/oem-ibm-header-compat.cocci`.
47
48## [0.8.0] - 2024-05-23
49
50### Added
51
521. base: Provide pldm_msg_hdr_correlate_response()
532. transport: af-mctp: Add pldm_transport_af_mctp_bind()
543. oem: ibm: Add chapdata file type support
554. base: Added PLDM_SMBIOS & PLDM_RDE message types
565. oem: meta: Add decode_oem_meta_file_io_req()
576. state-set: Add all state set values to system power state enum as per DSP0249
587. platform: Add alias members to the enum
59   pldm_pdr_repository_chg_event_change_record_event_data_operation.
60
61   enum constants with inconsistent names are deprecated with this change.
62   remove old inconsistent enum members after backward compatibility cleanup is
63   done
64
658. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
669. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
6710. platform: Add 3 PDR type enum for Redfish Device Enablement per
68    DSP0248_1.2.0
6911. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
7012. entity: Add enum for Network Interface Connectors and Network Ports
71    Connection Types
7213. pdr: Add decode_numeric_effecter_pdr_data()
7314. oem: ibm: Support for the Real SAI entity id
7415. fw_update: Add encode req & decode resp for query_downstream_devices
7516. fw_update: Add encode req & decode resp for query_downstream_identifiers
7617. platform: Add support for GetStateEffecterStates command
77
78### Changed
79
801. base: Stabilise pldm_msg_hdr_correlate_response()
812. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
823. libpldm: Fix header use
834. libpldm: More fixes for header use
845. pdr: Stabilise pldm_pdr_find_last_in_range() API
856. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
867. oem: meta: stabilise decode_oem_meta_file_io_req()
878. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
88
89### Deprecated
90
911. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
92   with `PLDM_OEM_IBM_`
93
94### Fixed
95
961. libpldm: Rationalise the local and installed path of pldm.h
972. pdr: Assign record_handle in entity_association_pdr_add_children()
983. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
994. pdr: Remove redundant constant for minimum numeric sensor PDR length
1005. tests: oem: meta: Fix fileio use of msgbuf
101
102## [0.7.0] - 2023-08-29
103
104### Added
105
1061. state-set: Add new enum for Operational Fault Status enum
107
108### Changed
109
1101. transport: Match specified metadata in pldm_transport_send_recv_msg()
1112. transport: mctp-demux: Drop ABI annotation for internal symbols
1123. transport: Stabilise core transport and implementation APIs
113
114   This stabilisation covers the following headers and functions:
115
116   - libpldm/transport.h
117
118     - pldm_transport_poll()
119     - pldm_transport_send_msg()
120     - pldm_transport_recv_msg()
121     - pldm_transport_send_recv_msg()
122
123   - libpldm/transport/af-mctp.h
124
125     - pldm_transport_af_mctp_init()
126     - pldm_transport_af_mctp_destroy()
127     - pldm_transport_af_mctp_core()
128     - pldm_transport_af_mctp_init_pollfd()
129     - pldm_transport_af_mctp_map_tid()
130     - pldm_transport_af_mctp_unmap_tid()
131
132   - libpldm/transport/mctp-demux.h
133     - pldm_transport_mctp_demux_init()
134     - pldm_transport_mctp_demux_destroy()
135     - pldm_transport_mctp_demux_core()
136     - pldm_transport_mctp_demux_init_pollfd()
137     - pldm_transport_mctp_demux_map_tid()
138     - pldm_transport_mctp_demux_unmap_tid()
139
140### Deprecated
141
1421. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
143   `libpldm/requester/pldm.h`):
144
145   - pldm_open()
146   - pldm_send_recv()
147   - pldm_send()
148   - pldm_recv()
149   - pldm_recv_any()
150   - pldm_close()
151
152   Users should migrate to the newer "transport" APIs instead.
153
154## Fixed
155
1561. tests: Exclude transport tests when build excludes testing ABIs
1572. abi: Capture deprecation of pldm_close()
158
159## [0.6.0] - 2023-08-22
160
161### Changed
162
1631. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
1642. meson: Apply `b_ndebug=if-release` by default
1653. pdr : Stabilize pldm_entity_association_tree_add_entity()
1664. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
1675. pdr: Stabilize pldm_entity_node_get_remote_container_id()
1686. transport: af-mctp: Assign out-params on success in \*\_recv()
1697. transport: Generalise the pldm_transport_recv_msg() API
170
171### Removed
172
1731. pdr: Remove pldm_entity_association_pdr_add()
1742. state-set: Remove enum pldm_state_set_operational_fault_status_values
175
176### Fixed
177
1781. transport: register init_pollfd callback for af-mctp
1792. transport: fix init_pollfd function parameter
1803. transport: Fix doxygen and variables for send and recv functions
1814. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
182
183## [0.5.0] - 2023-08-09
184
185### Added
186
1871. pdr: Introduce pldm_entity_association_pdr_add_check()
188
189### Changed
190
1911. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
1922. transport: pldm_transport_poll(): Adjust return value semantics
1933. transport: free un-wanted responses in pldm_transport_send_recv_msg()
194
195### Deprecated
196
1971. state-set: Enum pldm_state_set_operational_fault_status_values
198
199   The enum operational_fault_status is defined with wrong members and will
200   eventually be replaced with the correct members. Any uses of
201   pldm_state_set_operational_fault_status_values members should move to
202   equivalent pldm_state_set_operational_stress_status_values members if needed.
203
2042. platform: Struct field name in fru_record_set PDR
205
206   References to entity_instance_num should be changed to entity_instance
207
2083. platform: Struct field name in numeric sensor value PDR
209
210   References to entity_instance_num should be changed to entity_instance
211
212### Removed
213
2141. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
2152. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
2163. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
2174. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
2185. bios_table: Remove pldm_bios_table_append_pad_checksum()
2196. fru: Remove get_fru_record_by_option()
2207. pdr: Make is_present() static
2218. pdr: Remove pldm_pdr_add()
2229. pdr: Remove pldm_pdr_add_fru_record_set()
22310. pdr: Remove pldm_entity_association_pdr_add_from_node()
22411. pdr: Make find_entity_ref_in_tree() static
22512. pdr: Make entity_association_tree_find() static
226
227### Fixed
228
2291. requester: Fix response buffer cast in pldm_send_recv()
2302. pdr: Hoist record handle overflow test to avoid memory leak
2313. transport: Correct comparison in while loop condition
232
233## [0.4.0] - 2023-07-14
234
235### Added
236
2371. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
2382. fru: Introduce get_fru_record_by_option_check()
2393. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
2404. pdr: Introduce pldm_pdr_add_check()
2415. pdr: Introduce pldm_pdr_add_fru_record_set_check()
242
243### Changed
244
2451. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
2462. requester: Expose pldm_close() in header
2473. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
2484. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
2495. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
2506. pdr: pldm_pdr_init(): Return NULL on allocation failure
2517. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
2528. pdr: Document preconditions for trivial accessor functions
253
254   A trivial accessor function is one that exposes properties of an object in a
255   way can't result in an error, beyond passing an invalid argument to the
256   function. For APIs meeting this definition we define a precondition that
257   struct pointers must point to valid objects to avoid polluting the function
258   prototypes. The following APIs now have this precondition explicitly defined:
259
260   - pldm_entity_extract()
261   - pldm_entity_get_parent()
262   - pldm_entity_is_exist_parent()
263   - pldm_entity_is_node_parent()
264   - pldm_is_current_parent_child
265   - pldm_is_empty_entity_assoc_tree()
266   - pldm_pdr_get_record_count()
267   - pldm_pdr_get_record_handle()
268   - pldm_pdr_get_repo_size()
269   - pldm_pdr_record_is_remote()
270
2719. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
27210. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
27311. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
27412. pdr: pldm_entity_association_tree_visit(): Document preconditions
27513. pdr: pldm_entity_association_tree_visit(): Exit early on failure
27614. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
27715. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
27816. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
27917. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
28018. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
28119. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
28220. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
28321. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
28422. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
28523. pdr: pldm_entity_get_num_children(): Don't return invalid values
28624. libpldm: Lift or remove asserts where a subsequent check exists
287
288### Deprecated
289
2901. pldm_bios_table_attr_entry_integer_encode()
291
292   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
293
2942. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
295
296   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
297
2983. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
299
300   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
301
3024. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
303
304   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
305
3065. pdr: Deprecate is_present()
307
308   There should be no users of this symbol. If you are a user, you should figure
309   out how to stop, or get in touch. This symbol will be marked static the
310   release after deprecation.
311
3126. pdr: Deprecate find_entity_ref_in_tree()
313
314   There should be no users of this symbol. If you are a user, you should figure
315   out how to stop, or get in touch. This symbol will be marked static the
316   release after deprecation.
317
3187. pdr: Deprecate entity_association_tree_find()
319
320   There should be no users of this symbol. If you are a user, you should figure
321   out how to stop, or get in touch. This symbol will be marked static the
322   release after deprecation.
323
3248. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
325
326   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
327   pldm_bios_table_append_pad_checksum() should migrate to
328   pldm_bios_table_append_pad_checksum_check()
329
3309. fru: Stabilise get_fru_record_by_option_check()
331
332   get_fru_record_by_option() is deprecated by this change. Users of
333   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
334
33510. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
336
337    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
338    Users of pldm_entity_association_pdr_add_from_node() should migrate to
339    pldm_entity_association_pdr_add_from_node_check()
340
34111. pdr: Stabilise pldm_pdr_add_check()
342
343    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
344    migrate to pldm_pdr_add_check()
345
34612. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
347
348    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
349    pldm_pdr_add_fru_record_set() should migrate to
350    pldm_pdr_add_fru_record_set_check()
351
352### Removed
353
3541. bios_table: Remove deprecated APIs sanitized by assert():
355
356   - pldm_bios_table_string_entry_encode()
357   - pldm_bios_table_string_entry_decode_string()
358   - pldm_bios_table_attr_entry_enum_encode()
359   - pldm_bios_table_attr_entry_enum_decode_pv_num()
360   - pldm_bios_table_attr_entry_enum_decode_def_num()
361   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
362   - pldm_bios_table_attr_entry_string_encode()
363   - pldm_bios_table_attr_entry_string_decode_def_string_length()
364
365### Fixed
366
3671. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
3682. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
3693. transport: mctp-demux: Don't test socket for non-zero value
3704. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
3715. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
3726. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
3737. abi: Update to remove pldm_close() from reference dumps
3748. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
375
376## [0.3.0] - 2023-06-23
377
378### Added
379
3801. Add encode/decode pldmMessagePollEvent data
3812. README: Add a section on working with libpldm
3823. pdr: Introduce remote_container_id and associated APIs
3834. pdr: Add APIs for creating and locating remote PDRs
3845. pdr: Add pldm_pdr_find_last_in_range()
3856. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
3867. pdr: Add pldm_pdr_find_container_id_range_exclude()
387
388### Changed
389
3901. include: Move installed transport.h under libpldm/
3912. libpldm: Explicit deprecated, stable and testing ABI classes
3923. meson: Reduce strength of oem-ibm requirements from enabled to allowed
393
394   The `oem-ibm` feature is now enabled by the default meson configuration, for
395   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
396   recipe:
397
398   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
399
400   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
401   when invoking `meson setup`
402
4034. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
4045. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
405
406### Deprecated
407
4081. bios_table: Deprecate APIs with arguments sanitized using assert()
409
410   C provides enough foot-guns without us encoding them into library APIs.
411   Specifically, deprecate the following in favour of their `*_check()` variants
412   which ensure assertions won't fail or otherwise invoke UB:
413
414   - pldm_bios_table_string_entry_encode()
415   - pldm_bios_table_string_entry_decode_string()
416   - pldm_bios_table_attr_entry_enum_encode()
417   - pldm_bios_table_attr_entry_enum_decode_pv_num()
418   - pldm_bios_table_attr_entry_enum_decode_def_num()
419   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
420   - pldm_bios_table_attr_entry_string_encode()
421   - pldm_bios_table_attr_entry_string_decode_def_string_length()
422
423### Removed
424
4251. libpldm: Remove the requester-api option
426
427### Fixed
428
4291. requester: Make pldm_open() return existing fd
4302. transport: Prevent sticking in waiting for response
4313. transport: Match on response in pldm_transport_send_recv_msg()
4324. requester: Add check before accessing hdr in pldm_recv()
4335. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
434