xref: /openbmc/libpldm/CHANGELOG.md (revision b06882f1)
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. Rename and deprecate functions with the `_check` suffix
39
40   All library function return values always need to be checked. The `_check`
41   suffix is redundant, so remove it. Migration to the non-deprecated
42   equivalents without the `_check` suffix can be performed using
43   `scripts/ apply-renames` and the [clang-rename][] configurations under
44   `evolutions/`
45
46   The deprecated functions:
47
48   - `get_fru_record_by_option_check()`
49   - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
50   - `pldm_bios_table_attr_entry_enum_encode_check()`
51   - `pldm_bios_table_string_entry_decode_string_check()`
52   - `pldm_bios_table_string_entry_encode_check()`
53   - `pldm_entity_association_pdr_add_check()`
54   - `pldm_entity_association_pdr_add_from_node_check()`
55   - `pldm_pdr_add_check()`
56   - `pldm_pdr_add_fru_record_set_check()`
57
58[clang-rename]: https://clang.llvm.org/extra/clang-rename.html
59
60### Removed
61
621. IBM OEM header compatibility symlinks.
63
64   Anyone left using the deprecated paths can migrate using the coccinelle patch
65   at `evolutions/current/oem-ibm-header-compat.cocci`.
66
67### Fixed
68
691. requester: instance-id: Release read lock on conflict
70
71## [0.8.0] - 2024-05-23
72
73### Added
74
751. base: Provide pldm_msg_hdr_correlate_response()
762. transport: af-mctp: Add pldm_transport_af_mctp_bind()
773. oem: ibm: Add chapdata file type support
784. base: Added PLDM_SMBIOS & PLDM_RDE message types
795. oem: meta: Add decode_oem_meta_file_io_req()
806. state-set: Add all state set values to system power state enum as per DSP0249
817. platform: Add alias members to the enum
82   pldm_pdr_repository_chg_event_change_record_event_data_operation.
83
84   enum constants with inconsistent names are deprecated with this change.
85   remove old inconsistent enum members after backward compatibility cleanup is
86   done
87
888. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
899. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
9010. platform: Add 3 PDR type enum for Redfish Device Enablement per
91    DSP0248_1.2.0
9211. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
9312. entity: Add enum for Network Interface Connectors and Network Ports
94    Connection Types
9513. pdr: Add decode_numeric_effecter_pdr_data()
9614. oem: ibm: Support for the Real SAI entity id
9715. fw_update: Add encode req & decode resp for query_downstream_devices
9816. fw_update: Add encode req & decode resp for query_downstream_identifiers
9917. platform: Add support for GetStateEffecterStates command
100
101### Changed
102
1031. base: Stabilise pldm_msg_hdr_correlate_response()
1042. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
1053. libpldm: Fix header use
1064. libpldm: More fixes for header use
1075. pdr: Stabilise pldm_pdr_find_last_in_range() API
1086. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
1097. oem: meta: stabilise decode_oem_meta_file_io_req()
1108. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
111
112### Deprecated
113
1141. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
115   with `PLDM_OEM_IBM_`
116
117### Fixed
118
1191. libpldm: Rationalise the local and installed path of pldm.h
1202. pdr: Assign record_handle in entity_association_pdr_add_children()
1213. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
1224. pdr: Remove redundant constant for minimum numeric sensor PDR length
1235. tests: oem: meta: Fix fileio use of msgbuf
124
125## [0.7.0] - 2023-08-29
126
127### Added
128
1291. state-set: Add new enum for Operational Fault Status enum
130
131### Changed
132
1331. transport: Match specified metadata in pldm_transport_send_recv_msg()
1342. transport: mctp-demux: Drop ABI annotation for internal symbols
1353. transport: Stabilise core transport and implementation APIs
136
137   This stabilisation covers the following headers and functions:
138
139   - libpldm/transport.h
140
141     - pldm_transport_poll()
142     - pldm_transport_send_msg()
143     - pldm_transport_recv_msg()
144     - pldm_transport_send_recv_msg()
145
146   - libpldm/transport/af-mctp.h
147
148     - pldm_transport_af_mctp_init()
149     - pldm_transport_af_mctp_destroy()
150     - pldm_transport_af_mctp_core()
151     - pldm_transport_af_mctp_init_pollfd()
152     - pldm_transport_af_mctp_map_tid()
153     - pldm_transport_af_mctp_unmap_tid()
154
155   - libpldm/transport/mctp-demux.h
156     - pldm_transport_mctp_demux_init()
157     - pldm_transport_mctp_demux_destroy()
158     - pldm_transport_mctp_demux_core()
159     - pldm_transport_mctp_demux_init_pollfd()
160     - pldm_transport_mctp_demux_map_tid()
161     - pldm_transport_mctp_demux_unmap_tid()
162
163### Deprecated
164
1651. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
166   `libpldm/requester/pldm.h`):
167
168   - pldm_open()
169   - pldm_send_recv()
170   - pldm_send()
171   - pldm_recv()
172   - pldm_recv_any()
173   - pldm_close()
174
175   Users should migrate to the newer "transport" APIs instead.
176
177## Fixed
178
1791. tests: Exclude transport tests when build excludes testing ABIs
1802. abi: Capture deprecation of pldm_close()
181
182## [0.6.0] - 2023-08-22
183
184### Changed
185
1861. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
1872. meson: Apply `b_ndebug=if-release` by default
1883. pdr : Stabilize pldm_entity_association_tree_add_entity()
1894. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
1905. pdr: Stabilize pldm_entity_node_get_remote_container_id()
1916. transport: af-mctp: Assign out-params on success in \*\_recv()
1927. transport: Generalise the pldm_transport_recv_msg() API
193
194### Removed
195
1961. pdr: Remove pldm_entity_association_pdr_add()
1972. state-set: Remove enum pldm_state_set_operational_fault_status_values
198
199### Fixed
200
2011. transport: register init_pollfd callback for af-mctp
2022. transport: fix init_pollfd function parameter
2033. transport: Fix doxygen and variables for send and recv functions
2044. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
205
206## [0.5.0] - 2023-08-09
207
208### Added
209
2101. pdr: Introduce pldm_entity_association_pdr_add_check()
211
212### Changed
213
2141. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
2152. transport: pldm_transport_poll(): Adjust return value semantics
2163. transport: free un-wanted responses in pldm_transport_send_recv_msg()
217
218### Deprecated
219
2201. state-set: Enum pldm_state_set_operational_fault_status_values
221
222   The enum operational_fault_status is defined with wrong members and will
223   eventually be replaced with the correct members. Any uses of
224   pldm_state_set_operational_fault_status_values members should move to
225   equivalent pldm_state_set_operational_stress_status_values members if needed.
226
2272. platform: Struct field name in fru_record_set PDR
228
229   References to entity_instance_num should be changed to entity_instance
230
2313. platform: Struct field name in numeric sensor value PDR
232
233   References to entity_instance_num should be changed to entity_instance
234
235### Removed
236
2371. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
2382. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
2393. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
2404. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
2415. bios_table: Remove pldm_bios_table_append_pad_checksum()
2426. fru: Remove get_fru_record_by_option()
2437. pdr: Make is_present() static
2448. pdr: Remove pldm_pdr_add()
2459. pdr: Remove pldm_pdr_add_fru_record_set()
24610. pdr: Remove pldm_entity_association_pdr_add_from_node()
24711. pdr: Make find_entity_ref_in_tree() static
24812. pdr: Make entity_association_tree_find() static
249
250### Fixed
251
2521. requester: Fix response buffer cast in pldm_send_recv()
2532. pdr: Hoist record handle overflow test to avoid memory leak
2543. transport: Correct comparison in while loop condition
255
256## [0.4.0] - 2023-07-14
257
258### Added
259
2601. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
2612. fru: Introduce get_fru_record_by_option_check()
2623. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
2634. pdr: Introduce pldm_pdr_add_check()
2645. pdr: Introduce pldm_pdr_add_fru_record_set_check()
265
266### Changed
267
2681. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
2692. requester: Expose pldm_close() in header
2703. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
2714. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
2725. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
2736. pdr: pldm_pdr_init(): Return NULL on allocation failure
2747. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
2758. pdr: Document preconditions for trivial accessor functions
276
277   A trivial accessor function is one that exposes properties of an object in a
278   way can't result in an error, beyond passing an invalid argument to the
279   function. For APIs meeting this definition we define a precondition that
280   struct pointers must point to valid objects to avoid polluting the function
281   prototypes. The following APIs now have this precondition explicitly defined:
282
283   - pldm_entity_extract()
284   - pldm_entity_get_parent()
285   - pldm_entity_is_exist_parent()
286   - pldm_entity_is_node_parent()
287   - pldm_is_current_parent_child
288   - pldm_is_empty_entity_assoc_tree()
289   - pldm_pdr_get_record_count()
290   - pldm_pdr_get_record_handle()
291   - pldm_pdr_get_repo_size()
292   - pldm_pdr_record_is_remote()
293
2949. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
29510. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
29611. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
29712. pdr: pldm_entity_association_tree_visit(): Document preconditions
29813. pdr: pldm_entity_association_tree_visit(): Exit early on failure
29914. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
30015. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
30116. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
30217. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
30318. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
30419. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
30520. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
30621. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
30722. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
30823. pdr: pldm_entity_get_num_children(): Don't return invalid values
30924. libpldm: Lift or remove asserts where a subsequent check exists
310
311### Deprecated
312
3131. pldm_bios_table_attr_entry_integer_encode()
314
315   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
316
3172. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
318
319   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
320
3213. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
322
323   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
324
3254. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
326
327   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
328
3295. pdr: Deprecate is_present()
330
331   There should be no users of this symbol. If you are a user, you should figure
332   out how to stop, or get in touch. This symbol will be marked static the
333   release after deprecation.
334
3356. pdr: Deprecate find_entity_ref_in_tree()
336
337   There should be no users of this symbol. If you are a user, you should figure
338   out how to stop, or get in touch. This symbol will be marked static the
339   release after deprecation.
340
3417. pdr: Deprecate entity_association_tree_find()
342
343   There should be no users of this symbol. If you are a user, you should figure
344   out how to stop, or get in touch. This symbol will be marked static the
345   release after deprecation.
346
3478. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
348
349   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
350   pldm_bios_table_append_pad_checksum() should migrate to
351   pldm_bios_table_append_pad_checksum_check()
352
3539. fru: Stabilise get_fru_record_by_option_check()
354
355   get_fru_record_by_option() is deprecated by this change. Users of
356   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
357
35810. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
359
360    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
361    Users of pldm_entity_association_pdr_add_from_node() should migrate to
362    pldm_entity_association_pdr_add_from_node_check()
363
36411. pdr: Stabilise pldm_pdr_add_check()
365
366    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
367    migrate to pldm_pdr_add_check()
368
36912. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
370
371    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
372    pldm_pdr_add_fru_record_set() should migrate to
373    pldm_pdr_add_fru_record_set_check()
374
375### Removed
376
3771. bios_table: Remove deprecated APIs sanitized by assert():
378
379   - pldm_bios_table_string_entry_encode()
380   - pldm_bios_table_string_entry_decode_string()
381   - pldm_bios_table_attr_entry_enum_encode()
382   - pldm_bios_table_attr_entry_enum_decode_pv_num()
383   - pldm_bios_table_attr_entry_enum_decode_def_num()
384   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
385   - pldm_bios_table_attr_entry_string_encode()
386   - pldm_bios_table_attr_entry_string_decode_def_string_length()
387
388### Fixed
389
3901. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
3912. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
3923. transport: mctp-demux: Don't test socket for non-zero value
3934. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
3945. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
3956. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
3967. abi: Update to remove pldm_close() from reference dumps
3978. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
398
399## [0.3.0] - 2023-06-23
400
401### Added
402
4031. Add encode/decode pldmMessagePollEvent data
4042. README: Add a section on working with libpldm
4053. pdr: Introduce remote_container_id and associated APIs
4064. pdr: Add APIs for creating and locating remote PDRs
4075. pdr: Add pldm_pdr_find_last_in_range()
4086. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
4097. pdr: Add pldm_pdr_find_container_id_range_exclude()
410
411### Changed
412
4131. include: Move installed transport.h under libpldm/
4142. libpldm: Explicit deprecated, stable and testing ABI classes
4153. meson: Reduce strength of oem-ibm requirements from enabled to allowed
416
417   The `oem-ibm` feature is now enabled by the default meson configuration, for
418   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
419   recipe:
420
421   <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10>
422
423   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
424   when invoking `meson setup`
425
4264. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
4275. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
428
429### Deprecated
430
4311. bios_table: Deprecate APIs with arguments sanitized using assert()
432
433   C provides enough foot-guns without us encoding them into library APIs.
434   Specifically, deprecate the following in favour of their `*_check()` variants
435   which ensure assertions won't fail or otherwise invoke UB:
436
437   - pldm_bios_table_string_entry_encode()
438   - pldm_bios_table_string_entry_decode_string()
439   - pldm_bios_table_attr_entry_enum_encode()
440   - pldm_bios_table_attr_entry_enum_decode_pv_num()
441   - pldm_bios_table_attr_entry_enum_decode_def_num()
442   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
443   - pldm_bios_table_attr_entry_string_encode()
444   - pldm_bios_table_attr_entry_string_decode_def_string_length()
445
446### Removed
447
4481. libpldm: Remove the requester-api option
449
450### Fixed
451
4521. requester: Make pldm_open() return existing fd
4532. transport: Prevent sticking in waiting for response
4543. transport: Match on response in pldm_transport_send_recv_msg()
4554. requester: Add check before accessing hdr in pldm_recv()
4565. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
457