xref: /openbmc/libpldm/CHANGELOG.md (revision d9b70ba7)
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## [0.8.0] - 2024-05-23
42
43### Added
44
451. base: Provide pldm_msg_hdr_correlate_response()
462. transport: af-mctp: Add pldm_transport_af_mctp_bind()
473. oem: ibm: Add chapdata file type support
484. base: Added PLDM_SMBIOS & PLDM_RDE message types
495. oem: meta: Add decode_oem_meta_file_io_req()
506. state-set: Add all state set values to system power state enum as per DSP0249
517. platform: Add alias members to the enum
52   pldm_pdr_repository_chg_event_change_record_event_data_operation.
53
54   enum constants with inconsistent names are deprecated with this change.
55   remove old inconsistent enum members after backward compatibility cleanup is
56   done
57
588. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
599. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
6010. platform: Add 3 PDR type enum for Redfish Device Enablement per
61    DSP0248_1.2.0
6211. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
6312. entity: Add enum for Network Interface Connectors and Network Ports
64    Connection Types
6513. pdr: Add decode_numeric_effecter_pdr_data()
6614. oem: ibm: Support for the Real SAI entity id
6715. fw_update: Add encode req & decode resp for query_downstream_devices
6816. fw_update: Add encode req & decode resp for query_downstream_identifiers
6917. platform: Add support for GetStateEffecterStates command
70
71### Changed
72
731. base: Stabilise pldm_msg_hdr_correlate_response()
742. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
753. libpldm: Fix header use
764. libpldm: More fixes for header use
775. pdr: Stabilise pldm_pdr_find_last_in_range() API
786. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
797. oem: meta: stabilise decode_oem_meta_file_io_req()
808. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
81
82### Deprecated
83
841. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
85   with `PLDM_OEM_IBM_`
86
87### Fixed
88
891. libpldm: Rationalise the local and installed path of pldm.h
902. pdr: Assign record_handle in entity_association_pdr_add_children()
913. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
924. pdr: Remove redundant constant for minimum numeric sensor PDR length
935. tests: oem: meta: Fix fileio use of msgbuf
94
95## [0.7.0] - 2023-08-29
96
97### Added
98
991. state-set: Add new enum for Operational Fault Status enum
100
101### Changed
102
1031. transport: Match specified metadata in pldm_transport_send_recv_msg()
1042. transport: mctp-demux: Drop ABI annotation for internal symbols
1053. transport: Stabilise core transport and implementation APIs
106
107   This stabilisation covers the following headers and functions:
108
109   - libpldm/transport.h
110
111     - pldm_transport_poll()
112     - pldm_transport_send_msg()
113     - pldm_transport_recv_msg()
114     - pldm_transport_send_recv_msg()
115
116   - libpldm/transport/af-mctp.h
117
118     - pldm_transport_af_mctp_init()
119     - pldm_transport_af_mctp_destroy()
120     - pldm_transport_af_mctp_core()
121     - pldm_transport_af_mctp_init_pollfd()
122     - pldm_transport_af_mctp_map_tid()
123     - pldm_transport_af_mctp_unmap_tid()
124
125   - libpldm/transport/mctp-demux.h
126     - pldm_transport_mctp_demux_init()
127     - pldm_transport_mctp_demux_destroy()
128     - pldm_transport_mctp_demux_core()
129     - pldm_transport_mctp_demux_init_pollfd()
130     - pldm_transport_mctp_demux_map_tid()
131     - pldm_transport_mctp_demux_unmap_tid()
132
133### Deprecated
134
1351. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
136   `libpldm/requester/pldm.h`):
137
138   - pldm_open()
139   - pldm_send_recv()
140   - pldm_send()
141   - pldm_recv()
142   - pldm_recv_any()
143   - pldm_close()
144
145   Users should migrate to the newer "transport" APIs instead.
146
147## Fixed
148
1491. tests: Exclude transport tests when build excludes testing ABIs
1502. abi: Capture deprecation of pldm_close()
151
152## [0.6.0] - 2023-08-22
153
154### Changed
155
1561. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
1572. meson: Apply `b_ndebug=if-release` by default
1583. pdr : Stabilize pldm_entity_association_tree_add_entity()
1594. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
1605. pdr: Stabilize pldm_entity_node_get_remote_container_id()
1616. transport: af-mctp: Assign out-params on success in \*\_recv()
1627. transport: Generalise the pldm_transport_recv_msg() API
163
164### Removed
165
1661. pdr: Remove pldm_entity_association_pdr_add()
1672. state-set: Remove enum pldm_state_set_operational_fault_status_values
168
169### Fixed
170
1711. transport: register init_pollfd callback for af-mctp
1722. transport: fix init_pollfd function parameter
1733. transport: Fix doxygen and variables for send and recv functions
1744. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
175
176## [0.5.0] - 2023-08-09
177
178### Added
179
1801. pdr: Introduce pldm_entity_association_pdr_add_check()
181
182### Changed
183
1841. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
1852. transport: pldm_transport_poll(): Adjust return value semantics
1863. transport: free un-wanted responses in pldm_transport_send_recv_msg()
187
188### Deprecated
189
1901. state-set: Enum pldm_state_set_operational_fault_status_values
191
192   The enum operational_fault_status is defined with wrong members and will
193   eventually be replaced with the correct members. Any uses of
194   pldm_state_set_operational_fault_status_values members should move to
195   equivalent pldm_state_set_operational_stress_status_values members if needed.
196
1972. platform: Struct field name in fru_record_set PDR
198
199   References to entity_instance_num should be changed to entity_instance
200
2013. platform: Struct field name in numeric sensor value PDR
202
203   References to entity_instance_num should be changed to entity_instance
204
205### Removed
206
2071. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
2082. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
2093. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
2104. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
2115. bios_table: Remove pldm_bios_table_append_pad_checksum()
2126. fru: Remove get_fru_record_by_option()
2137. pdr: Make is_present() static
2148. pdr: Remove pldm_pdr_add()
2159. pdr: Remove pldm_pdr_add_fru_record_set()
21610. pdr: Remove pldm_entity_association_pdr_add_from_node()
21711. pdr: Make find_entity_ref_in_tree() static
21812. pdr: Make entity_association_tree_find() static
219
220### Fixed
221
2221. requester: Fix response buffer cast in pldm_send_recv()
2232. pdr: Hoist record handle overflow test to avoid memory leak
2243. transport: Correct comparison in while loop condition
225
226## [0.4.0] - 2023-07-14
227
228### Added
229
2301. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
2312. fru: Introduce get_fru_record_by_option_check()
2323. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
2334. pdr: Introduce pldm_pdr_add_check()
2345. pdr: Introduce pldm_pdr_add_fru_record_set_check()
235
236### Changed
237
2381. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
2392. requester: Expose pldm_close() in header
2403. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
2414. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
2425. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
2436. pdr: pldm_pdr_init(): Return NULL on allocation failure
2447. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
2458. pdr: Document preconditions for trivial accessor functions
246
247   A trivial accessor function is one that exposes properties of an object in a
248   way can't result in an error, beyond passing an invalid argument to the
249   function. For APIs meeting this definition we define a precondition that
250   struct pointers must point to valid objects to avoid polluting the function
251   prototypes. The following APIs now have this precondition explicitly defined:
252
253   - pldm_entity_extract()
254   - pldm_entity_get_parent()
255   - pldm_entity_is_exist_parent()
256   - pldm_entity_is_node_parent()
257   - pldm_is_current_parent_child
258   - pldm_is_empty_entity_assoc_tree()
259   - pldm_pdr_get_record_count()
260   - pldm_pdr_get_record_handle()
261   - pldm_pdr_get_repo_size()
262   - pldm_pdr_record_is_remote()
263
2649. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
26510. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
26611. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
26712. pdr: pldm_entity_association_tree_visit(): Document preconditions
26813. pdr: pldm_entity_association_tree_visit(): Exit early on failure
26914. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
27015. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
27116. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
27217. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
27318. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
27419. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
27520. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
27621. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
27722. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
27823. pdr: pldm_entity_get_num_children(): Don't return invalid values
27924. libpldm: Lift or remove asserts where a subsequent check exists
280
281### Deprecated
282
2831. pldm_bios_table_attr_entry_integer_encode()
284
285   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
286
2872. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
288
289   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
290
2913. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
292
293   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
294
2954. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
296
297   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
298
2995. pdr: Deprecate is_present()
300
301   There should be no users of this symbol. If you are a user, you should figure
302   out how to stop, or get in touch. This symbol will be marked static the
303   release after deprecation.
304
3056. pdr: Deprecate find_entity_ref_in_tree()
306
307   There should be no users of this symbol. If you are a user, you should figure
308   out how to stop, or get in touch. This symbol will be marked static the
309   release after deprecation.
310
3117. pdr: Deprecate entity_association_tree_find()
312
313   There should be no users of this symbol. If you are a user, you should figure
314   out how to stop, or get in touch. This symbol will be marked static the
315   release after deprecation.
316
3178. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
318
319   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
320   pldm_bios_table_append_pad_checksum() should migrate to
321   pldm_bios_table_append_pad_checksum_check()
322
3239. fru: Stabilise get_fru_record_by_option_check()
324
325   get_fru_record_by_option() is deprecated by this change. Users of
326   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
327
32810. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
329
330    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
331    Users of pldm_entity_association_pdr_add_from_node() should migrate to
332    pldm_entity_association_pdr_add_from_node_check()
333
33411. pdr: Stabilise pldm_pdr_add_check()
335
336    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
337    migrate to pldm_pdr_add_check()
338
33912. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
340
341    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
342    pldm_pdr_add_fru_record_set() should migrate to
343    pldm_pdr_add_fru_record_set_check()
344
345### Removed
346
3471. bios_table: Remove deprecated APIs sanitized by assert():
348
349   - pldm_bios_table_string_entry_encode()
350   - pldm_bios_table_string_entry_decode_string()
351   - pldm_bios_table_attr_entry_enum_encode()
352   - pldm_bios_table_attr_entry_enum_decode_pv_num()
353   - pldm_bios_table_attr_entry_enum_decode_def_num()
354   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
355   - pldm_bios_table_attr_entry_string_encode()
356   - pldm_bios_table_attr_entry_string_decode_def_string_length()
357
358### Fixed
359
3601. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
3612. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
3623. transport: mctp-demux: Don't test socket for non-zero value
3634. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
3645. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
3656. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
3667. abi: Update to remove pldm_close() from reference dumps
3678. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
368
369## [0.3.0] - 2023-06-23
370
371### Added
372
3731. Add encode/decode pldmMessagePollEvent data
3742. README: Add a section on working with libpldm
3753. pdr: Introduce remote_container_id and associated APIs
3764. pdr: Add APIs for creating and locating remote PDRs
3775. pdr: Add pldm_pdr_find_last_in_range()
3786. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
3797. pdr: Add pldm_pdr_find_container_id_range_exclude()
380
381### Changed
382
3831. include: Move installed transport.h under libpldm/
3842. libpldm: Explicit deprecated, stable and testing ABI classes
3853. meson: Reduce strength of oem-ibm requirements from enabled to allowed
386
387   The `oem-ibm` feature is now enabled by the default meson configuration, for
388   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
389   recipe:
390
391   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
392
393   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
394   when invoking `meson setup`
395
3964. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
3975. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
398
399### Deprecated
400
4011. bios_table: Deprecate APIs with arguments sanitized using assert()
402
403   C provides enough foot-guns without us encoding them into library APIs.
404   Specifically, deprecate the following in favour of their `*_check()` variants
405   which ensure assertions won't fail or otherwise invoke UB:
406
407   - pldm_bios_table_string_entry_encode()
408   - pldm_bios_table_string_entry_decode_string()
409   - pldm_bios_table_attr_entry_enum_encode()
410   - pldm_bios_table_attr_entry_enum_decode_pv_num()
411   - pldm_bios_table_attr_entry_enum_decode_def_num()
412   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
413   - pldm_bios_table_attr_entry_string_encode()
414   - pldm_bios_table_attr_entry_string_decode_def_string_length()
415
416### Removed
417
4181. libpldm: Remove the requester-api option
419
420### Fixed
421
4221. requester: Make pldm_open() return existing fd
4232. transport: Prevent sticking in waiting for response
4243. transport: Match on response in pldm_transport_send_recv_msg()
4254. requester: Add check before accessing hdr in pldm_recv()
4265. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
427