xref: /openbmc/libpldm/CHANGELOG.md (revision 4e672656)
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   - `get_fru_record_by_option_check()`
25   - `pldm_bios_table_append_pad_checksum_check()`
26   - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
27   - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
28   - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
29   - `pldm_bios_table_attr_entry_enum_encode_check()`
30   - `pldm_bios_table_attr_entry_integer_encode_check()`
31   - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
32   - `pldm_bios_table_attr_entry_string_encode_check()`
33   - `pldm_bios_table_attr_value_entry_encode_enum_check()`
34   - `pldm_bios_table_attr_value_entry_encode_integer_check()`
35   - `pldm_bios_table_attr_value_entry_encode_string_check()`
36   - `pldm_bios_table_string_entry_decode_string_check()`
37   - `pldm_bios_table_string_entry_encode_check()`
38   - `pldm_entity_association_pdr_add_check()`
39   - `pldm_entity_association_pdr_add_from_node_check()`
40   - `pldm_pdr_add_check()`
41   - `pldm_pdr_add_fru_record_set_check()`
42
43## [0.9.1] - 2024-09-07
44
45### Changed
46
471. Moved evolutions intended for v0.9.0 into place
48
49   Evolutions for the release have been moved from `evolutions/current` to
50   `evolutions/v0.9.1`. Library users can apply them to migrate off of
51   deprecated APIs.
52
53## [0.9.0] - 2024-09-07
54
55### Added
56
571. base: Define macros for reserved TIDs
582. pdr: Add pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
593. pdr: Add pldm_entity_association_pdr_create_new()
604. platform: Define macros for the responded transferflags
615. pdr: Add pldm_pdr_get_terminus_handle() API
626. pdr: Add related decode_entity_auxiliary_names_pdr() APIs
637. fw_update: Add encode req & decode resp for get_downstream_fw_params
648. platform: Add decode_pldm_platform_cper_event() API
659. decode_get_pdr_repository_info_resp_safe()
66
67   Replaces decode_get_pdr_repository_info_resp() as discussed in the
68   `Deprecated` section below
69
7010. decode_get_pdr_resp_safe()
71
72    Replaces decode_get_pdr_resp() as discussed in the `Deprecated` section
73    below
74
75### Changed
76
771. pdr: Stabilise related decode_entity_auxiliary_names_pdr() APIs
782. platform: Rework decode/encode_pldm_message_poll_event_data() APIs
793. platform: Stabilise decode_pldm_message_poll_event_data() APIs
804. ABI break for decode_sensor_op_data()
81
82   Applying LIBPLDM_CC_NONNULL to the internal msgbuf APIs caused
83   abi-compliance-checker to flag a change in the register containing the
84   parameter `previous_op_state`.
85
865. platform: Stabilise decode_pldm_platform_cper_event() API
87
88### Deprecated
89
901. Rename and deprecate functions with the `_check` suffix
91
92   All library function return values always need to be checked. The `_check`
93   suffix is redundant, so remove it. Migration to the non-deprecated
94   equivalents without the `_check` suffix can be performed using
95   `scripts/ apply-renames` and the [clang-rename][] configurations under
96   `evolutions/`
97
98   The deprecated functions:
99
100   - `get_fru_record_by_option_check()`
101   - `pldm_bios_table_append_pad_checksum_check()`
102   - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
103   - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
104   - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
105   - `pldm_bios_table_attr_entry_enum_encode_check()`
106   - `pldm_bios_table_attr_entry_integer_encode_check()`
107   - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
108   - `pldm_bios_table_attr_entry_string_encode_check()`
109   - `pldm_bios_table_attr_value_entry_encode_enum_check()`
110   - `pldm_bios_table_attr_value_entry_encode_integer_check()`
111   - `pldm_bios_table_attr_value_entry_encode_string_check()`
112   - `pldm_bios_table_string_entry_decode_string_check()`
113   - `pldm_bios_table_string_entry_encode_check()`
114   - `pldm_entity_association_pdr_add_check()`
115   - `pldm_entity_association_pdr_add_from_node_check()`
116   - `pldm_pdr_add_check()`
117   - `pldm_pdr_add_fru_record_set_check()`
118
119[clang-rename]: https://clang.llvm.org/extra/clang-rename.html
120
1212. `decode_get_pdr_repository_info_resp()`
122
123   Users should move to `decode_get_pdr_repository_info_resp_safe()` which
124   eliminates the opportunity for buffer overruns when extracting objects from
125   the message.
126
1273. `decode_get_pdr_resp()`
128
129   Users should move to `decode_get_pdr_resp_safe()` which reduces the
130   invocation tedium and improves memory safety over `decode_get_pdr_resp()`.
131
132### Removed
133
1341. IBM OEM header compatibility symlinks.
135
136   Anyone left using the deprecated paths can migrate using the coccinelle patch
137   at `evolutions/current/oem-ibm-header-compat.cocci`.
138
139### Fixed
140
1411. requester: instance-id: Release read lock on conflict
142
143## [0.8.0] - 2024-05-23
144
145### Added
146
1471. base: Provide pldm_msg_hdr_correlate_response()
1482. transport: af-mctp: Add pldm_transport_af_mctp_bind()
1493. oem: ibm: Add chapdata file type support
1504. base: Added PLDM_SMBIOS & PLDM_RDE message types
1515. oem: meta: Add decode_oem_meta_file_io_req()
1526. state-set: Add all state set values to system power state enum as per DSP0249
1537. platform: Add alias members to the enum
154   pldm_pdr_repository_chg_event_change_record_event_data_operation.
155
156   enum constants with inconsistent names are deprecated with this change.
157   remove old inconsistent enum members after backward compatibility cleanup is
158   done
159
1608. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
1619. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
16210. platform: Add 3 PDR type enum for Redfish Device Enablement per
163    DSP0248_1.2.0
16411. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
16512. entity: Add enum for Network Interface Connectors and Network Ports
166    Connection Types
16713. pdr: Add decode_numeric_effecter_pdr_data()
16814. oem: ibm: Support for the Real SAI entity id
16915. fw_update: Add encode req & decode resp for query_downstream_devices
17016. fw_update: Add encode req & decode resp for query_downstream_identifiers
17117. platform: Add support for GetStateEffecterStates command
172
173### Changed
174
1751. base: Stabilise pldm_msg_hdr_correlate_response()
1762. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
1773. libpldm: Fix header use
1784. libpldm: More fixes for header use
1795. pdr: Stabilise pldm_pdr_find_last_in_range() API
1806. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
1817. oem: meta: stabilise decode_oem_meta_file_io_req()
1828. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
183
184### Deprecated
185
1861. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
187   with `PLDM_OEM_IBM_`
188
189### Fixed
190
1911. libpldm: Rationalise the local and installed path of pldm.h
1922. pdr: Assign record_handle in entity_association_pdr_add_children()
1933. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
1944. pdr: Remove redundant constant for minimum numeric sensor PDR length
1955. tests: oem: meta: Fix fileio use of msgbuf
196
197## [0.7.0] - 2023-08-29
198
199### Added
200
2011. state-set: Add new enum for Operational Fault Status enum
202
203### Changed
204
2051. transport: Match specified metadata in pldm_transport_send_recv_msg()
2062. transport: mctp-demux: Drop ABI annotation for internal symbols
2073. transport: Stabilise core transport and implementation APIs
208
209   This stabilisation covers the following headers and functions:
210
211   - libpldm/transport.h
212
213     - pldm_transport_poll()
214     - pldm_transport_send_msg()
215     - pldm_transport_recv_msg()
216     - pldm_transport_send_recv_msg()
217
218   - libpldm/transport/af-mctp.h
219
220     - pldm_transport_af_mctp_init()
221     - pldm_transport_af_mctp_destroy()
222     - pldm_transport_af_mctp_core()
223     - pldm_transport_af_mctp_init_pollfd()
224     - pldm_transport_af_mctp_map_tid()
225     - pldm_transport_af_mctp_unmap_tid()
226
227   - libpldm/transport/mctp-demux.h
228     - pldm_transport_mctp_demux_init()
229     - pldm_transport_mctp_demux_destroy()
230     - pldm_transport_mctp_demux_core()
231     - pldm_transport_mctp_demux_init_pollfd()
232     - pldm_transport_mctp_demux_map_tid()
233     - pldm_transport_mctp_demux_unmap_tid()
234
235### Deprecated
236
2371. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
238   `libpldm/requester/pldm.h`):
239
240   - pldm_open()
241   - pldm_send_recv()
242   - pldm_send()
243   - pldm_recv()
244   - pldm_recv_any()
245   - pldm_close()
246
247   Users should migrate to the newer "transport" APIs instead.
248
249## Fixed
250
2511. tests: Exclude transport tests when build excludes testing ABIs
2522. abi: Capture deprecation of pldm_close()
253
254## [0.6.0] - 2023-08-22
255
256### Changed
257
2581. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
2592. meson: Apply `b_ndebug=if-release` by default
2603. pdr : Stabilize pldm_entity_association_tree_add_entity()
2614. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
2625. pdr: Stabilize pldm_entity_node_get_remote_container_id()
2636. transport: af-mctp: Assign out-params on success in \*\_recv()
2647. transport: Generalise the pldm_transport_recv_msg() API
265
266### Removed
267
2681. pdr: Remove pldm_entity_association_pdr_add()
2692. state-set: Remove enum pldm_state_set_operational_fault_status_values
270
271### Fixed
272
2731. transport: register init_pollfd callback for af-mctp
2742. transport: fix init_pollfd function parameter
2753. transport: Fix doxygen and variables for send and recv functions
2764. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
277
278## [0.5.0] - 2023-08-09
279
280### Added
281
2821. pdr: Introduce pldm_entity_association_pdr_add_check()
283
284### Changed
285
2861. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
2872. transport: pldm_transport_poll(): Adjust return value semantics
2883. transport: free un-wanted responses in pldm_transport_send_recv_msg()
289
290### Deprecated
291
2921. state-set: Enum pldm_state_set_operational_fault_status_values
293
294   The enum operational_fault_status is defined with wrong members and will
295   eventually be replaced with the correct members. Any uses of
296   pldm_state_set_operational_fault_status_values members should move to
297   equivalent pldm_state_set_operational_stress_status_values members if needed.
298
2992. platform: Struct field name in fru_record_set PDR
300
301   References to entity_instance_num should be changed to entity_instance
302
3033. platform: Struct field name in numeric sensor value PDR
304
305   References to entity_instance_num should be changed to entity_instance
306
307### Removed
308
3091. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
3102. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
3113. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
3124. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
3135. bios_table: Remove pldm_bios_table_append_pad_checksum()
3146. fru: Remove get_fru_record_by_option()
3157. pdr: Make is_present() static
3168. pdr: Remove pldm_pdr_add()
3179. pdr: Remove pldm_pdr_add_fru_record_set()
31810. pdr: Remove pldm_entity_association_pdr_add_from_node()
31911. pdr: Make find_entity_ref_in_tree() static
32012. pdr: Make entity_association_tree_find() static
321
322### Fixed
323
3241. requester: Fix response buffer cast in pldm_send_recv()
3252. pdr: Hoist record handle overflow test to avoid memory leak
3263. transport: Correct comparison in while loop condition
327
328## [0.4.0] - 2023-07-14
329
330### Added
331
3321. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
3332. fru: Introduce get_fru_record_by_option_check()
3343. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
3354. pdr: Introduce pldm_pdr_add_check()
3365. pdr: Introduce pldm_pdr_add_fru_record_set_check()
337
338### Changed
339
3401. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
3412. requester: Expose pldm_close() in header
3423. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
3434. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
3445. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
3456. pdr: pldm_pdr_init(): Return NULL on allocation failure
3467. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
3478. pdr: Document preconditions for trivial accessor functions
348
349   A trivial accessor function is one that exposes properties of an object in a
350   way can't result in an error, beyond passing an invalid argument to the
351   function. For APIs meeting this definition we define a precondition that
352   struct pointers must point to valid objects to avoid polluting the function
353   prototypes. The following APIs now have this precondition explicitly defined:
354
355   - pldm_entity_extract()
356   - pldm_entity_get_parent()
357   - pldm_entity_is_exist_parent()
358   - pldm_entity_is_node_parent()
359   - pldm_is_current_parent_child
360   - pldm_is_empty_entity_assoc_tree()
361   - pldm_pdr_get_record_count()
362   - pldm_pdr_get_record_handle()
363   - pldm_pdr_get_repo_size()
364   - pldm_pdr_record_is_remote()
365
3669. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
36710. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
36811. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
36912. pdr: pldm_entity_association_tree_visit(): Document preconditions
37013. pdr: pldm_entity_association_tree_visit(): Exit early on failure
37114. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
37215. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
37316. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
37417. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
37518. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
37619. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
37720. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
37821. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
37922. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
38023. pdr: pldm_entity_get_num_children(): Don't return invalid values
38124. libpldm: Lift or remove asserts where a subsequent check exists
382
383### Deprecated
384
3851. pldm_bios_table_attr_entry_integer_encode()
386
387   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
388
3892. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
390
391   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
392
3933. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
394
395   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
396
3974. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
398
399   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
400
4015. pdr: Deprecate is_present()
402
403   There should be no users of this symbol. If you are a user, you should figure
404   out how to stop, or get in touch. This symbol will be marked static the
405   release after deprecation.
406
4076. pdr: Deprecate find_entity_ref_in_tree()
408
409   There should be no users of this symbol. If you are a user, you should figure
410   out how to stop, or get in touch. This symbol will be marked static the
411   release after deprecation.
412
4137. pdr: Deprecate entity_association_tree_find()
414
415   There should be no users of this symbol. If you are a user, you should figure
416   out how to stop, or get in touch. This symbol will be marked static the
417   release after deprecation.
418
4198. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
420
421   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
422   pldm_bios_table_append_pad_checksum() should migrate to
423   pldm_bios_table_append_pad_checksum_check()
424
4259. fru: Stabilise get_fru_record_by_option_check()
426
427   get_fru_record_by_option() is deprecated by this change. Users of
428   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
429
43010. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
431
432    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
433    Users of pldm_entity_association_pdr_add_from_node() should migrate to
434    pldm_entity_association_pdr_add_from_node_check()
435
43611. pdr: Stabilise pldm_pdr_add_check()
437
438    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
439    migrate to pldm_pdr_add_check()
440
44112. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
442
443    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
444    pldm_pdr_add_fru_record_set() should migrate to
445    pldm_pdr_add_fru_record_set_check()
446
447### Removed
448
4491. bios_table: Remove deprecated APIs sanitized by assert():
450
451   - pldm_bios_table_string_entry_encode()
452   - pldm_bios_table_string_entry_decode_string()
453   - pldm_bios_table_attr_entry_enum_encode()
454   - pldm_bios_table_attr_entry_enum_decode_pv_num()
455   - pldm_bios_table_attr_entry_enum_decode_def_num()
456   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
457   - pldm_bios_table_attr_entry_string_encode()
458   - pldm_bios_table_attr_entry_string_decode_def_string_length()
459
460### Fixed
461
4621. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
4632. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
4643. transport: mctp-demux: Don't test socket for non-zero value
4654. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
4665. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
4676. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
4687. abi: Update to remove pldm_close() from reference dumps
4698. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
470
471## [0.3.0] - 2023-06-23
472
473### Added
474
4751. Add encode/decode pldmMessagePollEvent data
4762. README: Add a section on working with libpldm
4773. pdr: Introduce remote_container_id and associated APIs
4784. pdr: Add APIs for creating and locating remote PDRs
4795. pdr: Add pldm_pdr_find_last_in_range()
4806. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
4817. pdr: Add pldm_pdr_find_container_id_range_exclude()
482
483### Changed
484
4851. include: Move installed transport.h under libpldm/
4862. libpldm: Explicit deprecated, stable and testing ABI classes
4873. meson: Reduce strength of oem-ibm requirements from enabled to allowed
488
489   The `oem-ibm` feature is now enabled by the default meson configuration, for
490   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
491   recipe:
492
493   <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10>
494
495   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
496   when invoking `meson setup`
497
4984. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
4995. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
500
501### Deprecated
502
5031. bios_table: Deprecate APIs with arguments sanitized using assert()
504
505   C provides enough foot-guns without us encoding them into library APIs.
506   Specifically, deprecate the following in favour of their `*_check()` variants
507   which ensure assertions won't fail or otherwise invoke UB:
508
509   - pldm_bios_table_string_entry_encode()
510   - pldm_bios_table_string_entry_decode_string()
511   - pldm_bios_table_attr_entry_enum_encode()
512   - pldm_bios_table_attr_entry_enum_decode_pv_num()
513   - pldm_bios_table_attr_entry_enum_decode_def_num()
514   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
515   - pldm_bios_table_attr_entry_string_encode()
516   - pldm_bios_table_attr_entry_string_decode_def_string_length()
517
518### Removed
519
5201. libpldm: Remove the requester-api option
521
522### Fixed
523
5241. requester: Make pldm_open() return existing fd
5252. transport: Prevent sticking in waiting for response
5263. transport: Match on response in pldm_transport_send_recv_msg()
5274. requester: Add check before accessing hdr in pldm_recv()
5285. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
529