xref: /openbmc/libpldm/CHANGELOG.md (revision 5befd128)
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### Deprecated
31
321. fru: Deprecate `get_fru_record_by_option_check()`
33
34   Users should switch to `get_fru_record_by_option()`. Migration can be
35   performed using the [Coccinelle semantic patch][coccinelle]
36   `get_fru_record_by_option_check.cocci`:
37
38   ```
39   $ spatch \
40      --sp-file=${LIBPLDM_DIR}/evolutions/current/get_fru_record_by_option_check.cocci \
41      --in-place \
42      $(git ls-files | grep -E '\.[ch](pp)?')
43   ```
44
45[coccinelle]: https://coccinelle.gitlabpages.inria.fr/website/
46
47### Removed
48
491. IBM OEM header compatibility symlinks.
50
51   Anyone left using the deprecated paths can migrate using the coccinelle patch
52   at `evolutions/current/oem-ibm-header-compat.cocci`.
53
54### Fixed
55
561. requester: instance-id: Release read lock on conflict
57
58## [0.8.0] - 2024-05-23
59
60### Added
61
621. base: Provide pldm_msg_hdr_correlate_response()
632. transport: af-mctp: Add pldm_transport_af_mctp_bind()
643. oem: ibm: Add chapdata file type support
654. base: Added PLDM_SMBIOS & PLDM_RDE message types
665. oem: meta: Add decode_oem_meta_file_io_req()
676. state-set: Add all state set values to system power state enum as per DSP0249
687. platform: Add alias members to the enum
69   pldm_pdr_repository_chg_event_change_record_event_data_operation.
70
71   enum constants with inconsistent names are deprecated with this change.
72   remove old inconsistent enum members after backward compatibility cleanup is
73   done
74
758. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
769. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
7710. platform: Add 3 PDR type enum for Redfish Device Enablement per
78    DSP0248_1.2.0
7911. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
8012. entity: Add enum for Network Interface Connectors and Network Ports
81    Connection Types
8213. pdr: Add decode_numeric_effecter_pdr_data()
8314. oem: ibm: Support for the Real SAI entity id
8415. fw_update: Add encode req & decode resp for query_downstream_devices
8516. fw_update: Add encode req & decode resp for query_downstream_identifiers
8617. platform: Add support for GetStateEffecterStates command
87
88### Changed
89
901. base: Stabilise pldm_msg_hdr_correlate_response()
912. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
923. libpldm: Fix header use
934. libpldm: More fixes for header use
945. pdr: Stabilise pldm_pdr_find_last_in_range() API
956. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
967. oem: meta: stabilise decode_oem_meta_file_io_req()
978. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
98
99### Deprecated
100
1011. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
102   with `PLDM_OEM_IBM_`
103
104### Fixed
105
1061. libpldm: Rationalise the local and installed path of pldm.h
1072. pdr: Assign record_handle in entity_association_pdr_add_children()
1083. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
1094. pdr: Remove redundant constant for minimum numeric sensor PDR length
1105. tests: oem: meta: Fix fileio use of msgbuf
111
112## [0.7.0] - 2023-08-29
113
114### Added
115
1161. state-set: Add new enum for Operational Fault Status enum
117
118### Changed
119
1201. transport: Match specified metadata in pldm_transport_send_recv_msg()
1212. transport: mctp-demux: Drop ABI annotation for internal symbols
1223. transport: Stabilise core transport and implementation APIs
123
124   This stabilisation covers the following headers and functions:
125
126   - libpldm/transport.h
127
128     - pldm_transport_poll()
129     - pldm_transport_send_msg()
130     - pldm_transport_recv_msg()
131     - pldm_transport_send_recv_msg()
132
133   - libpldm/transport/af-mctp.h
134
135     - pldm_transport_af_mctp_init()
136     - pldm_transport_af_mctp_destroy()
137     - pldm_transport_af_mctp_core()
138     - pldm_transport_af_mctp_init_pollfd()
139     - pldm_transport_af_mctp_map_tid()
140     - pldm_transport_af_mctp_unmap_tid()
141
142   - libpldm/transport/mctp-demux.h
143     - pldm_transport_mctp_demux_init()
144     - pldm_transport_mctp_demux_destroy()
145     - pldm_transport_mctp_demux_core()
146     - pldm_transport_mctp_demux_init_pollfd()
147     - pldm_transport_mctp_demux_map_tid()
148     - pldm_transport_mctp_demux_unmap_tid()
149
150### Deprecated
151
1521. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
153   `libpldm/requester/pldm.h`):
154
155   - pldm_open()
156   - pldm_send_recv()
157   - pldm_send()
158   - pldm_recv()
159   - pldm_recv_any()
160   - pldm_close()
161
162   Users should migrate to the newer "transport" APIs instead.
163
164## Fixed
165
1661. tests: Exclude transport tests when build excludes testing ABIs
1672. abi: Capture deprecation of pldm_close()
168
169## [0.6.0] - 2023-08-22
170
171### Changed
172
1731. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
1742. meson: Apply `b_ndebug=if-release` by default
1753. pdr : Stabilize pldm_entity_association_tree_add_entity()
1764. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
1775. pdr: Stabilize pldm_entity_node_get_remote_container_id()
1786. transport: af-mctp: Assign out-params on success in \*\_recv()
1797. transport: Generalise the pldm_transport_recv_msg() API
180
181### Removed
182
1831. pdr: Remove pldm_entity_association_pdr_add()
1842. state-set: Remove enum pldm_state_set_operational_fault_status_values
185
186### Fixed
187
1881. transport: register init_pollfd callback for af-mctp
1892. transport: fix init_pollfd function parameter
1903. transport: Fix doxygen and variables for send and recv functions
1914. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
192
193## [0.5.0] - 2023-08-09
194
195### Added
196
1971. pdr: Introduce pldm_entity_association_pdr_add_check()
198
199### Changed
200
2011. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
2022. transport: pldm_transport_poll(): Adjust return value semantics
2033. transport: free un-wanted responses in pldm_transport_send_recv_msg()
204
205### Deprecated
206
2071. state-set: Enum pldm_state_set_operational_fault_status_values
208
209   The enum operational_fault_status is defined with wrong members and will
210   eventually be replaced with the correct members. Any uses of
211   pldm_state_set_operational_fault_status_values members should move to
212   equivalent pldm_state_set_operational_stress_status_values members if needed.
213
2142. platform: Struct field name in fru_record_set PDR
215
216   References to entity_instance_num should be changed to entity_instance
217
2183. platform: Struct field name in numeric sensor value PDR
219
220   References to entity_instance_num should be changed to entity_instance
221
222### Removed
223
2241. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
2252. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
2263. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
2274. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
2285. bios_table: Remove pldm_bios_table_append_pad_checksum()
2296. fru: Remove get_fru_record_by_option()
2307. pdr: Make is_present() static
2318. pdr: Remove pldm_pdr_add()
2329. pdr: Remove pldm_pdr_add_fru_record_set()
23310. pdr: Remove pldm_entity_association_pdr_add_from_node()
23411. pdr: Make find_entity_ref_in_tree() static
23512. pdr: Make entity_association_tree_find() static
236
237### Fixed
238
2391. requester: Fix response buffer cast in pldm_send_recv()
2402. pdr: Hoist record handle overflow test to avoid memory leak
2413. transport: Correct comparison in while loop condition
242
243## [0.4.0] - 2023-07-14
244
245### Added
246
2471. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
2482. fru: Introduce get_fru_record_by_option_check()
2493. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
2504. pdr: Introduce pldm_pdr_add_check()
2515. pdr: Introduce pldm_pdr_add_fru_record_set_check()
252
253### Changed
254
2551. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
2562. requester: Expose pldm_close() in header
2573. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
2584. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
2595. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
2606. pdr: pldm_pdr_init(): Return NULL on allocation failure
2617. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
2628. pdr: Document preconditions for trivial accessor functions
263
264   A trivial accessor function is one that exposes properties of an object in a
265   way can't result in an error, beyond passing an invalid argument to the
266   function. For APIs meeting this definition we define a precondition that
267   struct pointers must point to valid objects to avoid polluting the function
268   prototypes. The following APIs now have this precondition explicitly defined:
269
270   - pldm_entity_extract()
271   - pldm_entity_get_parent()
272   - pldm_entity_is_exist_parent()
273   - pldm_entity_is_node_parent()
274   - pldm_is_current_parent_child
275   - pldm_is_empty_entity_assoc_tree()
276   - pldm_pdr_get_record_count()
277   - pldm_pdr_get_record_handle()
278   - pldm_pdr_get_repo_size()
279   - pldm_pdr_record_is_remote()
280
2819. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
28210. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
28311. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
28412. pdr: pldm_entity_association_tree_visit(): Document preconditions
28513. pdr: pldm_entity_association_tree_visit(): Exit early on failure
28614. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
28715. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
28816. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
28917. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
29018. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
29119. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
29220. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
29321. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
29422. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
29523. pdr: pldm_entity_get_num_children(): Don't return invalid values
29624. libpldm: Lift or remove asserts where a subsequent check exists
297
298### Deprecated
299
3001. pldm_bios_table_attr_entry_integer_encode()
301
302   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
303
3042. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
305
306   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
307
3083. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
309
310   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
311
3124. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
313
314   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
315
3165. pdr: Deprecate is_present()
317
318   There should be no users of this symbol. If you are a user, you should figure
319   out how to stop, or get in touch. This symbol will be marked static the
320   release after deprecation.
321
3226. pdr: Deprecate find_entity_ref_in_tree()
323
324   There should be no users of this symbol. If you are a user, you should figure
325   out how to stop, or get in touch. This symbol will be marked static the
326   release after deprecation.
327
3287. pdr: Deprecate entity_association_tree_find()
329
330   There should be no users of this symbol. If you are a user, you should figure
331   out how to stop, or get in touch. This symbol will be marked static the
332   release after deprecation.
333
3348. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
335
336   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
337   pldm_bios_table_append_pad_checksum() should migrate to
338   pldm_bios_table_append_pad_checksum_check()
339
3409. fru: Stabilise get_fru_record_by_option_check()
341
342   get_fru_record_by_option() is deprecated by this change. Users of
343   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
344
34510. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
346
347    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
348    Users of pldm_entity_association_pdr_add_from_node() should migrate to
349    pldm_entity_association_pdr_add_from_node_check()
350
35111. pdr: Stabilise pldm_pdr_add_check()
352
353    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
354    migrate to pldm_pdr_add_check()
355
35612. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
357
358    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
359    pldm_pdr_add_fru_record_set() should migrate to
360    pldm_pdr_add_fru_record_set_check()
361
362### Removed
363
3641. bios_table: Remove deprecated APIs sanitized by assert():
365
366   - pldm_bios_table_string_entry_encode()
367   - pldm_bios_table_string_entry_decode_string()
368   - pldm_bios_table_attr_entry_enum_encode()
369   - pldm_bios_table_attr_entry_enum_decode_pv_num()
370   - pldm_bios_table_attr_entry_enum_decode_def_num()
371   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
372   - pldm_bios_table_attr_entry_string_encode()
373   - pldm_bios_table_attr_entry_string_decode_def_string_length()
374
375### Fixed
376
3771. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
3782. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
3793. transport: mctp-demux: Don't test socket for non-zero value
3804. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
3815. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
3826. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
3837. abi: Update to remove pldm_close() from reference dumps
3848. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
385
386## [0.3.0] - 2023-06-23
387
388### Added
389
3901. Add encode/decode pldmMessagePollEvent data
3912. README: Add a section on working with libpldm
3923. pdr: Introduce remote_container_id and associated APIs
3934. pdr: Add APIs for creating and locating remote PDRs
3945. pdr: Add pldm_pdr_find_last_in_range()
3956. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
3967. pdr: Add pldm_pdr_find_container_id_range_exclude()
397
398### Changed
399
4001. include: Move installed transport.h under libpldm/
4012. libpldm: Explicit deprecated, stable and testing ABI classes
4023. meson: Reduce strength of oem-ibm requirements from enabled to allowed
403
404   The `oem-ibm` feature is now enabled by the default meson configuration, for
405   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
406   recipe:
407
408   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
409
410   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
411   when invoking `meson setup`
412
4134. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
4145. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
415
416### Deprecated
417
4181. bios_table: Deprecate APIs with arguments sanitized using assert()
419
420   C provides enough foot-guns without us encoding them into library APIs.
421   Specifically, deprecate the following in favour of their `*_check()` variants
422   which ensure assertions won't fail or otherwise invoke UB:
423
424   - pldm_bios_table_string_entry_encode()
425   - pldm_bios_table_string_entry_decode_string()
426   - pldm_bios_table_attr_entry_enum_encode()
427   - pldm_bios_table_attr_entry_enum_decode_pv_num()
428   - pldm_bios_table_attr_entry_enum_decode_def_num()
429   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
430   - pldm_bios_table_attr_entry_string_encode()
431   - pldm_bios_table_attr_entry_string_decode_def_string_length()
432
433### Removed
434
4351. libpldm: Remove the requester-api option
436
437### Fixed
438
4391. requester: Make pldm_open() return existing fd
4402. transport: Prevent sticking in waiting for response
4413. transport: Match on response in pldm_transport_send_recv_msg()
4424. requester: Add check before accessing hdr in pldm_recv()
4435. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
444