xref: /openbmc/libpldm/CHANGELOG.md (revision acb0681d)
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
232. pdr: Add pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
243. pdr: Add pldm_entity_association_pdr_create_new()
254. platform: Define macros for the responded transferflags
265. pdr: Add pldm_pdr_get_terminus_handle() API
276. pdr: Add related decode_entity_auxiliary_names_pdr() APIs
287. fw_update: Add encode req & decode resp for get_downstream_fw_params
29
30### Changed
31
321. pdr: Stabilise related decode_entity_auxiliary_names_pdr() APIs
332. platform: Rework decode/encode_pldm_message_poll_event_data() APIs
343. platform: Stabilise decode_pldm_message_poll_event_data() APIs
35
36### Deprecated
37
381. fru: Deprecate `get_fru_record_by_option_check()`
39
40   Users should switch to `get_fru_record_by_option()`. Migration can be
41   performed using the `apply-renames` script and the [clang-rename][]
42   configuration under `evolutions/`:
43
44   ```
45   $ ./scripts/apply-renames evolutions/current/get_fru_record_by_option_check.yaml
46   ```
47
48[clang-rename]: https://clang.llvm.org/extra/clang-rename.html
49
50### Removed
51
521. IBM OEM header compatibility symlinks.
53
54   Anyone left using the deprecated paths can migrate using the coccinelle patch
55   at `evolutions/current/oem-ibm-header-compat.cocci`.
56
57### Fixed
58
591. requester: instance-id: Release read lock on conflict
60
61## [0.8.0] - 2024-05-23
62
63### Added
64
651. base: Provide pldm_msg_hdr_correlate_response()
662. transport: af-mctp: Add pldm_transport_af_mctp_bind()
673. oem: ibm: Add chapdata file type support
684. base: Added PLDM_SMBIOS & PLDM_RDE message types
695. oem: meta: Add decode_oem_meta_file_io_req()
706. state-set: Add all state set values to system power state enum as per DSP0249
717. platform: Add alias members to the enum
72   pldm_pdr_repository_chg_event_change_record_event_data_operation.
73
74   enum constants with inconsistent names are deprecated with this change.
75   remove old inconsistent enum members after backward compatibility cleanup is
76   done
77
788. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
799. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
8010. platform: Add 3 PDR type enum for Redfish Device Enablement per
81    DSP0248_1.2.0
8211. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
8312. entity: Add enum for Network Interface Connectors and Network Ports
84    Connection Types
8513. pdr: Add decode_numeric_effecter_pdr_data()
8614. oem: ibm: Support for the Real SAI entity id
8715. fw_update: Add encode req & decode resp for query_downstream_devices
8816. fw_update: Add encode req & decode resp for query_downstream_identifiers
8917. platform: Add support for GetStateEffecterStates command
90
91### Changed
92
931. base: Stabilise pldm_msg_hdr_correlate_response()
942. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
953. libpldm: Fix header use
964. libpldm: More fixes for header use
975. pdr: Stabilise pldm_pdr_find_last_in_range() API
986. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
997. oem: meta: stabilise decode_oem_meta_file_io_req()
1008. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
101
102### Deprecated
103
1041. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
105   with `PLDM_OEM_IBM_`
106
107### Fixed
108
1091. libpldm: Rationalise the local and installed path of pldm.h
1102. pdr: Assign record_handle in entity_association_pdr_add_children()
1113. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
1124. pdr: Remove redundant constant for minimum numeric sensor PDR length
1135. tests: oem: meta: Fix fileio use of msgbuf
114
115## [0.7.0] - 2023-08-29
116
117### Added
118
1191. state-set: Add new enum for Operational Fault Status enum
120
121### Changed
122
1231. transport: Match specified metadata in pldm_transport_send_recv_msg()
1242. transport: mctp-demux: Drop ABI annotation for internal symbols
1253. transport: Stabilise core transport and implementation APIs
126
127   This stabilisation covers the following headers and functions:
128
129   - libpldm/transport.h
130
131     - pldm_transport_poll()
132     - pldm_transport_send_msg()
133     - pldm_transport_recv_msg()
134     - pldm_transport_send_recv_msg()
135
136   - libpldm/transport/af-mctp.h
137
138     - pldm_transport_af_mctp_init()
139     - pldm_transport_af_mctp_destroy()
140     - pldm_transport_af_mctp_core()
141     - pldm_transport_af_mctp_init_pollfd()
142     - pldm_transport_af_mctp_map_tid()
143     - pldm_transport_af_mctp_unmap_tid()
144
145   - libpldm/transport/mctp-demux.h
146     - pldm_transport_mctp_demux_init()
147     - pldm_transport_mctp_demux_destroy()
148     - pldm_transport_mctp_demux_core()
149     - pldm_transport_mctp_demux_init_pollfd()
150     - pldm_transport_mctp_demux_map_tid()
151     - pldm_transport_mctp_demux_unmap_tid()
152
153### Deprecated
154
1551. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
156   `libpldm/requester/pldm.h`):
157
158   - pldm_open()
159   - pldm_send_recv()
160   - pldm_send()
161   - pldm_recv()
162   - pldm_recv_any()
163   - pldm_close()
164
165   Users should migrate to the newer "transport" APIs instead.
166
167## Fixed
168
1691. tests: Exclude transport tests when build excludes testing ABIs
1702. abi: Capture deprecation of pldm_close()
171
172## [0.6.0] - 2023-08-22
173
174### Changed
175
1761. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
1772. meson: Apply `b_ndebug=if-release` by default
1783. pdr : Stabilize pldm_entity_association_tree_add_entity()
1794. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
1805. pdr: Stabilize pldm_entity_node_get_remote_container_id()
1816. transport: af-mctp: Assign out-params on success in \*\_recv()
1827. transport: Generalise the pldm_transport_recv_msg() API
183
184### Removed
185
1861. pdr: Remove pldm_entity_association_pdr_add()
1872. state-set: Remove enum pldm_state_set_operational_fault_status_values
188
189### Fixed
190
1911. transport: register init_pollfd callback for af-mctp
1922. transport: fix init_pollfd function parameter
1933. transport: Fix doxygen and variables for send and recv functions
1944. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
195
196## [0.5.0] - 2023-08-09
197
198### Added
199
2001. pdr: Introduce pldm_entity_association_pdr_add_check()
201
202### Changed
203
2041. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
2052. transport: pldm_transport_poll(): Adjust return value semantics
2063. transport: free un-wanted responses in pldm_transport_send_recv_msg()
207
208### Deprecated
209
2101. state-set: Enum pldm_state_set_operational_fault_status_values
211
212   The enum operational_fault_status is defined with wrong members and will
213   eventually be replaced with the correct members. Any uses of
214   pldm_state_set_operational_fault_status_values members should move to
215   equivalent pldm_state_set_operational_stress_status_values members if needed.
216
2172. platform: Struct field name in fru_record_set PDR
218
219   References to entity_instance_num should be changed to entity_instance
220
2213. platform: Struct field name in numeric sensor value PDR
222
223   References to entity_instance_num should be changed to entity_instance
224
225### Removed
226
2271. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
2282. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
2293. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
2304. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
2315. bios_table: Remove pldm_bios_table_append_pad_checksum()
2326. fru: Remove get_fru_record_by_option()
2337. pdr: Make is_present() static
2348. pdr: Remove pldm_pdr_add()
2359. pdr: Remove pldm_pdr_add_fru_record_set()
23610. pdr: Remove pldm_entity_association_pdr_add_from_node()
23711. pdr: Make find_entity_ref_in_tree() static
23812. pdr: Make entity_association_tree_find() static
239
240### Fixed
241
2421. requester: Fix response buffer cast in pldm_send_recv()
2432. pdr: Hoist record handle overflow test to avoid memory leak
2443. transport: Correct comparison in while loop condition
245
246## [0.4.0] - 2023-07-14
247
248### Added
249
2501. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
2512. fru: Introduce get_fru_record_by_option_check()
2523. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
2534. pdr: Introduce pldm_pdr_add_check()
2545. pdr: Introduce pldm_pdr_add_fru_record_set_check()
255
256### Changed
257
2581. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
2592. requester: Expose pldm_close() in header
2603. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
2614. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
2625. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
2636. pdr: pldm_pdr_init(): Return NULL on allocation failure
2647. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
2658. pdr: Document preconditions for trivial accessor functions
266
267   A trivial accessor function is one that exposes properties of an object in a
268   way can't result in an error, beyond passing an invalid argument to the
269   function. For APIs meeting this definition we define a precondition that
270   struct pointers must point to valid objects to avoid polluting the function
271   prototypes. The following APIs now have this precondition explicitly defined:
272
273   - pldm_entity_extract()
274   - pldm_entity_get_parent()
275   - pldm_entity_is_exist_parent()
276   - pldm_entity_is_node_parent()
277   - pldm_is_current_parent_child
278   - pldm_is_empty_entity_assoc_tree()
279   - pldm_pdr_get_record_count()
280   - pldm_pdr_get_record_handle()
281   - pldm_pdr_get_repo_size()
282   - pldm_pdr_record_is_remote()
283
2849. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
28510. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
28611. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
28712. pdr: pldm_entity_association_tree_visit(): Document preconditions
28813. pdr: pldm_entity_association_tree_visit(): Exit early on failure
28914. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
29015. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
29116. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
29217. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
29318. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
29419. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
29520. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
29621. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
29722. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
29823. pdr: pldm_entity_get_num_children(): Don't return invalid values
29924. libpldm: Lift or remove asserts where a subsequent check exists
300
301### Deprecated
302
3031. pldm_bios_table_attr_entry_integer_encode()
304
305   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
306
3072. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
308
309   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
310
3113. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
312
313   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
314
3154. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
316
317   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
318
3195. pdr: Deprecate is_present()
320
321   There should be no users of this symbol. If you are a user, you should figure
322   out how to stop, or get in touch. This symbol will be marked static the
323   release after deprecation.
324
3256. pdr: Deprecate find_entity_ref_in_tree()
326
327   There should be no users of this symbol. If you are a user, you should figure
328   out how to stop, or get in touch. This symbol will be marked static the
329   release after deprecation.
330
3317. pdr: Deprecate entity_association_tree_find()
332
333   There should be no users of this symbol. If you are a user, you should figure
334   out how to stop, or get in touch. This symbol will be marked static the
335   release after deprecation.
336
3378. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
338
339   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
340   pldm_bios_table_append_pad_checksum() should migrate to
341   pldm_bios_table_append_pad_checksum_check()
342
3439. fru: Stabilise get_fru_record_by_option_check()
344
345   get_fru_record_by_option() is deprecated by this change. Users of
346   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
347
34810. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
349
350    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
351    Users of pldm_entity_association_pdr_add_from_node() should migrate to
352    pldm_entity_association_pdr_add_from_node_check()
353
35411. pdr: Stabilise pldm_pdr_add_check()
355
356    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
357    migrate to pldm_pdr_add_check()
358
35912. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
360
361    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
362    pldm_pdr_add_fru_record_set() should migrate to
363    pldm_pdr_add_fru_record_set_check()
364
365### Removed
366
3671. bios_table: Remove deprecated APIs sanitized by assert():
368
369   - pldm_bios_table_string_entry_encode()
370   - pldm_bios_table_string_entry_decode_string()
371   - pldm_bios_table_attr_entry_enum_encode()
372   - pldm_bios_table_attr_entry_enum_decode_pv_num()
373   - pldm_bios_table_attr_entry_enum_decode_def_num()
374   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
375   - pldm_bios_table_attr_entry_string_encode()
376   - pldm_bios_table_attr_entry_string_decode_def_string_length()
377
378### Fixed
379
3801. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
3812. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
3823. transport: mctp-demux: Don't test socket for non-zero value
3834. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
3845. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
3856. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
3867. abi: Update to remove pldm_close() from reference dumps
3878. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
388
389## [0.3.0] - 2023-06-23
390
391### Added
392
3931. Add encode/decode pldmMessagePollEvent data
3942. README: Add a section on working with libpldm
3953. pdr: Introduce remote_container_id and associated APIs
3964. pdr: Add APIs for creating and locating remote PDRs
3975. pdr: Add pldm_pdr_find_last_in_range()
3986. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
3997. pdr: Add pldm_pdr_find_container_id_range_exclude()
400
401### Changed
402
4031. include: Move installed transport.h under libpldm/
4042. libpldm: Explicit deprecated, stable and testing ABI classes
4053. meson: Reduce strength of oem-ibm requirements from enabled to allowed
406
407   The `oem-ibm` feature is now enabled by the default meson configuration, for
408   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
409   recipe:
410
411   <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10>
412
413   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
414   when invoking `meson setup`
415
4164. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
4175. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
418
419### Deprecated
420
4211. bios_table: Deprecate APIs with arguments sanitized using assert()
422
423   C provides enough foot-guns without us encoding them into library APIs.
424   Specifically, deprecate the following in favour of their `*_check()` variants
425   which ensure assertions won't fail or otherwise invoke UB:
426
427   - pldm_bios_table_string_entry_encode()
428   - pldm_bios_table_string_entry_decode_string()
429   - pldm_bios_table_attr_entry_enum_encode()
430   - pldm_bios_table_attr_entry_enum_decode_pv_num()
431   - pldm_bios_table_attr_entry_enum_decode_def_num()
432   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
433   - pldm_bios_table_attr_entry_string_encode()
434   - pldm_bios_table_attr_entry_string_decode_def_string_length()
435
436### Removed
437
4381. libpldm: Remove the requester-api option
439
440### Fixed
441
4421. requester: Make pldm_open() return existing fd
4432. transport: Prevent sticking in waiting for response
4443. transport: Match on response in pldm_transport_send_recv_msg()
4454. requester: Add check before accessing hdr in pldm_recv()
4465. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
447