xref: /openbmc/libpldm/CHANGELOG.md (revision 2170655a)
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### Removed
21
221. Deprecated functions with the `_check` suffix
23
24   - `pldm_bios_table_append_pad_checksum_check()`
25   - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
26   - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
27   - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
28   - `pldm_bios_table_attr_entry_enum_encode_check()`
29   - `pldm_bios_table_attr_entry_integer_encode_check()`
30   - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
31   - `pldm_bios_table_attr_entry_string_encode_check()`
32   - `pldm_bios_table_attr_value_entry_encode_enum_check()`
33
34## [0.9.1] - 2024-09-07
35
36### Changed
37
381. Moved evolutions intended for v0.9.0 into place
39
40   Evolutions for the release have been moved from `evolutions/current` to
41   `evolutions/v0.9.1`. Library users can apply them to migrate off of
42   deprecated APIs.
43
44## [0.9.0] - 2024-09-07
45
46### Added
47
481. base: Define macros for reserved TIDs
492. pdr: Add pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
503. pdr: Add pldm_entity_association_pdr_create_new()
514. platform: Define macros for the responded transferflags
525. pdr: Add pldm_pdr_get_terminus_handle() API
536. pdr: Add related decode_entity_auxiliary_names_pdr() APIs
547. fw_update: Add encode req & decode resp for get_downstream_fw_params
558. platform: Add decode_pldm_platform_cper_event() API
569. decode_get_pdr_repository_info_resp_safe()
57
58   Replaces decode_get_pdr_repository_info_resp() as discussed in the
59   `Deprecated` section below
60
6110. decode_get_pdr_resp_safe()
62
63    Replaces decode_get_pdr_resp() as discussed in the `Deprecated` section
64    below
65
66### Changed
67
681. pdr: Stabilise related decode_entity_auxiliary_names_pdr() APIs
692. platform: Rework decode/encode_pldm_message_poll_event_data() APIs
703. platform: Stabilise decode_pldm_message_poll_event_data() APIs
714. ABI break for decode_sensor_op_data()
72
73   Applying LIBPLDM_CC_NONNULL to the internal msgbuf APIs caused
74   abi-compliance-checker to flag a change in the register containing the
75   parameter `previous_op_state`.
76
775. platform: Stabilise decode_pldm_platform_cper_event() API
78
79### Deprecated
80
811. Rename and deprecate functions with the `_check` suffix
82
83   All library function return values always need to be checked. The `_check`
84   suffix is redundant, so remove it. Migration to the non-deprecated
85   equivalents without the `_check` suffix can be performed using
86   `scripts/ apply-renames` and the [clang-rename][] configurations under
87   `evolutions/`
88
89   The deprecated functions:
90
91   - `get_fru_record_by_option_check()`
92   - `pldm_bios_table_append_pad_checksum_check()`
93   - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
94   - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
95   - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
96   - `pldm_bios_table_attr_entry_enum_encode_check()`
97   - `pldm_bios_table_attr_entry_integer_encode_check()`
98   - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
99   - `pldm_bios_table_attr_entry_string_encode_check()`
100   - `pldm_bios_table_attr_value_entry_encode_enum_check()`
101   - `pldm_bios_table_attr_value_entry_encode_integer_check()`
102   - `pldm_bios_table_attr_value_entry_encode_string_check()`
103   - `pldm_bios_table_string_entry_decode_string_check()`
104   - `pldm_bios_table_string_entry_encode_check()`
105   - `pldm_entity_association_pdr_add_check()`
106   - `pldm_entity_association_pdr_add_from_node_check()`
107   - `pldm_pdr_add_check()`
108   - `pldm_pdr_add_fru_record_set_check()`
109
110[clang-rename]: https://clang.llvm.org/extra/clang-rename.html
111
1122. `decode_get_pdr_repository_info_resp()`
113
114   Users should move to `decode_get_pdr_repository_info_resp_safe()` which
115   eliminates the opportunity for buffer overruns when extracting objects from
116   the message.
117
1183. `decode_get_pdr_resp()`
119
120   Users should move to `decode_get_pdr_resp_safe()` which reduces the
121   invocation tedium and improves memory safety over `decode_get_pdr_resp()`.
122
123### Removed
124
1251. IBM OEM header compatibility symlinks.
126
127   Anyone left using the deprecated paths can migrate using the coccinelle patch
128   at `evolutions/current/oem-ibm-header-compat.cocci`.
129
130### Fixed
131
1321. requester: instance-id: Release read lock on conflict
133
134## [0.8.0] - 2024-05-23
135
136### Added
137
1381. base: Provide pldm_msg_hdr_correlate_response()
1392. transport: af-mctp: Add pldm_transport_af_mctp_bind()
1403. oem: ibm: Add chapdata file type support
1414. base: Added PLDM_SMBIOS & PLDM_RDE message types
1425. oem: meta: Add decode_oem_meta_file_io_req()
1436. state-set: Add all state set values to system power state enum as per DSP0249
1447. platform: Add alias members to the enum
145   pldm_pdr_repository_chg_event_change_record_event_data_operation.
146
147   enum constants with inconsistent names are deprecated with this change.
148   remove old inconsistent enum members after backward compatibility cleanup is
149   done
150
1518. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
1529. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
15310. platform: Add 3 PDR type enum for Redfish Device Enablement per
154    DSP0248_1.2.0
15511. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
15612. entity: Add enum for Network Interface Connectors and Network Ports
157    Connection Types
15813. pdr: Add decode_numeric_effecter_pdr_data()
15914. oem: ibm: Support for the Real SAI entity id
16015. fw_update: Add encode req & decode resp for query_downstream_devices
16116. fw_update: Add encode req & decode resp for query_downstream_identifiers
16217. platform: Add support for GetStateEffecterStates command
163
164### Changed
165
1661. base: Stabilise pldm_msg_hdr_correlate_response()
1672. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
1683. libpldm: Fix header use
1694. libpldm: More fixes for header use
1705. pdr: Stabilise pldm_pdr_find_last_in_range() API
1716. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
1727. oem: meta: stabilise decode_oem_meta_file_io_req()
1738. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
174
175### Deprecated
176
1771. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
178   with `PLDM_OEM_IBM_`
179
180### Fixed
181
1821. libpldm: Rationalise the local and installed path of pldm.h
1832. pdr: Assign record_handle in entity_association_pdr_add_children()
1843. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
1854. pdr: Remove redundant constant for minimum numeric sensor PDR length
1865. tests: oem: meta: Fix fileio use of msgbuf
187
188## [0.7.0] - 2023-08-29
189
190### Added
191
1921. state-set: Add new enum for Operational Fault Status enum
193
194### Changed
195
1961. transport: Match specified metadata in pldm_transport_send_recv_msg()
1972. transport: mctp-demux: Drop ABI annotation for internal symbols
1983. transport: Stabilise core transport and implementation APIs
199
200   This stabilisation covers the following headers and functions:
201
202   - libpldm/transport.h
203
204     - pldm_transport_poll()
205     - pldm_transport_send_msg()
206     - pldm_transport_recv_msg()
207     - pldm_transport_send_recv_msg()
208
209   - libpldm/transport/af-mctp.h
210
211     - pldm_transport_af_mctp_init()
212     - pldm_transport_af_mctp_destroy()
213     - pldm_transport_af_mctp_core()
214     - pldm_transport_af_mctp_init_pollfd()
215     - pldm_transport_af_mctp_map_tid()
216     - pldm_transport_af_mctp_unmap_tid()
217
218   - libpldm/transport/mctp-demux.h
219     - pldm_transport_mctp_demux_init()
220     - pldm_transport_mctp_demux_destroy()
221     - pldm_transport_mctp_demux_core()
222     - pldm_transport_mctp_demux_init_pollfd()
223     - pldm_transport_mctp_demux_map_tid()
224     - pldm_transport_mctp_demux_unmap_tid()
225
226### Deprecated
227
2281. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
229   `libpldm/requester/pldm.h`):
230
231   - pldm_open()
232   - pldm_send_recv()
233   - pldm_send()
234   - pldm_recv()
235   - pldm_recv_any()
236   - pldm_close()
237
238   Users should migrate to the newer "transport" APIs instead.
239
240## Fixed
241
2421. tests: Exclude transport tests when build excludes testing ABIs
2432. abi: Capture deprecation of pldm_close()
244
245## [0.6.0] - 2023-08-22
246
247### Changed
248
2491. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
2502. meson: Apply `b_ndebug=if-release` by default
2513. pdr : Stabilize pldm_entity_association_tree_add_entity()
2524. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
2535. pdr: Stabilize pldm_entity_node_get_remote_container_id()
2546. transport: af-mctp: Assign out-params on success in \*\_recv()
2557. transport: Generalise the pldm_transport_recv_msg() API
256
257### Removed
258
2591. pdr: Remove pldm_entity_association_pdr_add()
2602. state-set: Remove enum pldm_state_set_operational_fault_status_values
261
262### Fixed
263
2641. transport: register init_pollfd callback for af-mctp
2652. transport: fix init_pollfd function parameter
2663. transport: Fix doxygen and variables for send and recv functions
2674. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
268
269## [0.5.0] - 2023-08-09
270
271### Added
272
2731. pdr: Introduce pldm_entity_association_pdr_add_check()
274
275### Changed
276
2771. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
2782. transport: pldm_transport_poll(): Adjust return value semantics
2793. transport: free un-wanted responses in pldm_transport_send_recv_msg()
280
281### Deprecated
282
2831. state-set: Enum pldm_state_set_operational_fault_status_values
284
285   The enum operational_fault_status is defined with wrong members and will
286   eventually be replaced with the correct members. Any uses of
287   pldm_state_set_operational_fault_status_values members should move to
288   equivalent pldm_state_set_operational_stress_status_values members if needed.
289
2902. platform: Struct field name in fru_record_set PDR
291
292   References to entity_instance_num should be changed to entity_instance
293
2943. platform: Struct field name in numeric sensor value PDR
295
296   References to entity_instance_num should be changed to entity_instance
297
298### Removed
299
3001. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
3012. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
3023. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
3034. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
3045. bios_table: Remove pldm_bios_table_append_pad_checksum()
3056. fru: Remove get_fru_record_by_option()
3067. pdr: Make is_present() static
3078. pdr: Remove pldm_pdr_add()
3089. pdr: Remove pldm_pdr_add_fru_record_set()
30910. pdr: Remove pldm_entity_association_pdr_add_from_node()
31011. pdr: Make find_entity_ref_in_tree() static
31112. pdr: Make entity_association_tree_find() static
312
313### Fixed
314
3151. requester: Fix response buffer cast in pldm_send_recv()
3162. pdr: Hoist record handle overflow test to avoid memory leak
3173. transport: Correct comparison in while loop condition
318
319## [0.4.0] - 2023-07-14
320
321### Added
322
3231. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
3242. fru: Introduce get_fru_record_by_option_check()
3253. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
3264. pdr: Introduce pldm_pdr_add_check()
3275. pdr: Introduce pldm_pdr_add_fru_record_set_check()
328
329### Changed
330
3311. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
3322. requester: Expose pldm_close() in header
3333. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
3344. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
3355. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
3366. pdr: pldm_pdr_init(): Return NULL on allocation failure
3377. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
3388. pdr: Document preconditions for trivial accessor functions
339
340   A trivial accessor function is one that exposes properties of an object in a
341   way can't result in an error, beyond passing an invalid argument to the
342   function. For APIs meeting this definition we define a precondition that
343   struct pointers must point to valid objects to avoid polluting the function
344   prototypes. The following APIs now have this precondition explicitly defined:
345
346   - pldm_entity_extract()
347   - pldm_entity_get_parent()
348   - pldm_entity_is_exist_parent()
349   - pldm_entity_is_node_parent()
350   - pldm_is_current_parent_child
351   - pldm_is_empty_entity_assoc_tree()
352   - pldm_pdr_get_record_count()
353   - pldm_pdr_get_record_handle()
354   - pldm_pdr_get_repo_size()
355   - pldm_pdr_record_is_remote()
356
3579. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
35810. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
35911. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
36012. pdr: pldm_entity_association_tree_visit(): Document preconditions
36113. pdr: pldm_entity_association_tree_visit(): Exit early on failure
36214. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
36315. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
36416. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
36517. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
36618. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
36719. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
36820. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
36921. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
37022. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
37123. pdr: pldm_entity_get_num_children(): Don't return invalid values
37224. libpldm: Lift or remove asserts where a subsequent check exists
373
374### Deprecated
375
3761. pldm_bios_table_attr_entry_integer_encode()
377
378   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
379
3802. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
381
382   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
383
3843. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
385
386   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
387
3884. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
389
390   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
391
3925. pdr: Deprecate is_present()
393
394   There should be no users of this symbol. If you are a user, you should figure
395   out how to stop, or get in touch. This symbol will be marked static the
396   release after deprecation.
397
3986. pdr: Deprecate find_entity_ref_in_tree()
399
400   There should be no users of this symbol. If you are a user, you should figure
401   out how to stop, or get in touch. This symbol will be marked static the
402   release after deprecation.
403
4047. pdr: Deprecate entity_association_tree_find()
405
406   There should be no users of this symbol. If you are a user, you should figure
407   out how to stop, or get in touch. This symbol will be marked static the
408   release after deprecation.
409
4108. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
411
412   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
413   pldm_bios_table_append_pad_checksum() should migrate to
414   pldm_bios_table_append_pad_checksum_check()
415
4169. fru: Stabilise get_fru_record_by_option_check()
417
418   get_fru_record_by_option() is deprecated by this change. Users of
419   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
420
42110. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
422
423    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
424    Users of pldm_entity_association_pdr_add_from_node() should migrate to
425    pldm_entity_association_pdr_add_from_node_check()
426
42711. pdr: Stabilise pldm_pdr_add_check()
428
429    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
430    migrate to pldm_pdr_add_check()
431
43212. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
433
434    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
435    pldm_pdr_add_fru_record_set() should migrate to
436    pldm_pdr_add_fru_record_set_check()
437
438### Removed
439
4401. bios_table: Remove deprecated APIs sanitized by assert():
441
442   - pldm_bios_table_string_entry_encode()
443   - pldm_bios_table_string_entry_decode_string()
444   - pldm_bios_table_attr_entry_enum_encode()
445   - pldm_bios_table_attr_entry_enum_decode_pv_num()
446   - pldm_bios_table_attr_entry_enum_decode_def_num()
447   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
448   - pldm_bios_table_attr_entry_string_encode()
449   - pldm_bios_table_attr_entry_string_decode_def_string_length()
450
451### Fixed
452
4531. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
4542. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
4553. transport: mctp-demux: Don't test socket for non-zero value
4564. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
4575. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
4586. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
4597. abi: Update to remove pldm_close() from reference dumps
4608. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
461
462## [0.3.0] - 2023-06-23
463
464### Added
465
4661. Add encode/decode pldmMessagePollEvent data
4672. README: Add a section on working with libpldm
4683. pdr: Introduce remote_container_id and associated APIs
4694. pdr: Add APIs for creating and locating remote PDRs
4705. pdr: Add pldm_pdr_find_last_in_range()
4716. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
4727. pdr: Add pldm_pdr_find_container_id_range_exclude()
473
474### Changed
475
4761. include: Move installed transport.h under libpldm/
4772. libpldm: Explicit deprecated, stable and testing ABI classes
4783. meson: Reduce strength of oem-ibm requirements from enabled to allowed
479
480   The `oem-ibm` feature is now enabled by the default meson configuration, for
481   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
482   recipe:
483
484   <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10>
485
486   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
487   when invoking `meson setup`
488
4894. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
4905. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
491
492### Deprecated
493
4941. bios_table: Deprecate APIs with arguments sanitized using assert()
495
496   C provides enough foot-guns without us encoding them into library APIs.
497   Specifically, deprecate the following in favour of their `*_check()` variants
498   which ensure assertions won't fail or otherwise invoke UB:
499
500   - pldm_bios_table_string_entry_encode()
501   - pldm_bios_table_string_entry_decode_string()
502   - pldm_bios_table_attr_entry_enum_encode()
503   - pldm_bios_table_attr_entry_enum_decode_pv_num()
504   - pldm_bios_table_attr_entry_enum_decode_def_num()
505   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
506   - pldm_bios_table_attr_entry_string_encode()
507   - pldm_bios_table_attr_entry_string_decode_def_string_length()
508
509### Removed
510
5111. libpldm: Remove the requester-api option
512
513### Fixed
514
5151. requester: Make pldm_open() return existing fd
5162. transport: Prevent sticking in waiting for response
5173. transport: Match on response in pldm_transport_send_recv_msg()
5184. requester: Add check before accessing hdr in pldm_recv()
5195. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
520