xref: /openbmc/libpldm/CHANGELOG.md (revision e4240679)
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
23
24### Deprecated
25
261. fru: Deprecate `get_fru_record_by_option_check()`
27
28   Users should switch to `get_fru_record_by_option()`. Migration can be
29   performed using the [Coccinelle semantic patch][coccinelle]
30   `get_fru_record_by_option_check.cocci`:
31
32   ```
33   $ spatch \
34      --sp-file=${LIBPLDM_DIR}/evolutions/current/get_fru_record_by_option_check.cocci \
35      --in-place \
36      $(git ls-files | grep -E '\.[ch](pp)?')
37   ```
38
39[coccinelle]: https://coccinelle.gitlabpages.inria.fr/website/
40
41### Removed
42
431. IBM OEM header compatibility symlinks.
44
45   Anyone left using the deprecated paths can migrate using the coccinelle patch
46   at `evolutions/current/oem-ibm-header-compat.cocci`.
47
48### Fixed
49
501. requester: instance-id: Release read lock on conflict
51
52## [0.8.0] - 2024-05-23
53
54### Added
55
561. base: Provide pldm_msg_hdr_correlate_response()
572. transport: af-mctp: Add pldm_transport_af_mctp_bind()
583. oem: ibm: Add chapdata file type support
594. base: Added PLDM_SMBIOS & PLDM_RDE message types
605. oem: meta: Add decode_oem_meta_file_io_req()
616. state-set: Add all state set values to system power state enum as per DSP0249
627. platform: Add alias members to the enum
63   pldm_pdr_repository_chg_event_change_record_event_data_operation.
64
65   enum constants with inconsistent names are deprecated with this change.
66   remove old inconsistent enum members after backward compatibility cleanup is
67   done
68
698. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
709. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
7110. platform: Add 3 PDR type enum for Redfish Device Enablement per
72    DSP0248_1.2.0
7311. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
7412. entity: Add enum for Network Interface Connectors and Network Ports
75    Connection Types
7613. pdr: Add decode_numeric_effecter_pdr_data()
7714. oem: ibm: Support for the Real SAI entity id
7815. fw_update: Add encode req & decode resp for query_downstream_devices
7916. fw_update: Add encode req & decode resp for query_downstream_identifiers
8017. platform: Add support for GetStateEffecterStates command
81
82### Changed
83
841. base: Stabilise pldm_msg_hdr_correlate_response()
852. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
863. libpldm: Fix header use
874. libpldm: More fixes for header use
885. pdr: Stabilise pldm_pdr_find_last_in_range() API
896. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
907. oem: meta: stabilise decode_oem_meta_file_io_req()
918. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
92
93### Deprecated
94
951. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
96   with `PLDM_OEM_IBM_`
97
98### Fixed
99
1001. libpldm: Rationalise the local and installed path of pldm.h
1012. pdr: Assign record_handle in entity_association_pdr_add_children()
1023. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
1034. pdr: Remove redundant constant for minimum numeric sensor PDR length
1045. tests: oem: meta: Fix fileio use of msgbuf
105
106## [0.7.0] - 2023-08-29
107
108### Added
109
1101. state-set: Add new enum for Operational Fault Status enum
111
112### Changed
113
1141. transport: Match specified metadata in pldm_transport_send_recv_msg()
1152. transport: mctp-demux: Drop ABI annotation for internal symbols
1163. transport: Stabilise core transport and implementation APIs
117
118   This stabilisation covers the following headers and functions:
119
120   - libpldm/transport.h
121
122     - pldm_transport_poll()
123     - pldm_transport_send_msg()
124     - pldm_transport_recv_msg()
125     - pldm_transport_send_recv_msg()
126
127   - libpldm/transport/af-mctp.h
128
129     - pldm_transport_af_mctp_init()
130     - pldm_transport_af_mctp_destroy()
131     - pldm_transport_af_mctp_core()
132     - pldm_transport_af_mctp_init_pollfd()
133     - pldm_transport_af_mctp_map_tid()
134     - pldm_transport_af_mctp_unmap_tid()
135
136   - libpldm/transport/mctp-demux.h
137     - pldm_transport_mctp_demux_init()
138     - pldm_transport_mctp_demux_destroy()
139     - pldm_transport_mctp_demux_core()
140     - pldm_transport_mctp_demux_init_pollfd()
141     - pldm_transport_mctp_demux_map_tid()
142     - pldm_transport_mctp_demux_unmap_tid()
143
144### Deprecated
145
1461. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
147   `libpldm/requester/pldm.h`):
148
149   - pldm_open()
150   - pldm_send_recv()
151   - pldm_send()
152   - pldm_recv()
153   - pldm_recv_any()
154   - pldm_close()
155
156   Users should migrate to the newer "transport" APIs instead.
157
158## Fixed
159
1601. tests: Exclude transport tests when build excludes testing ABIs
1612. abi: Capture deprecation of pldm_close()
162
163## [0.6.0] - 2023-08-22
164
165### Changed
166
1671. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
1682. meson: Apply `b_ndebug=if-release` by default
1693. pdr : Stabilize pldm_entity_association_tree_add_entity()
1704. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
1715. pdr: Stabilize pldm_entity_node_get_remote_container_id()
1726. transport: af-mctp: Assign out-params on success in \*\_recv()
1737. transport: Generalise the pldm_transport_recv_msg() API
174
175### Removed
176
1771. pdr: Remove pldm_entity_association_pdr_add()
1782. state-set: Remove enum pldm_state_set_operational_fault_status_values
179
180### Fixed
181
1821. transport: register init_pollfd callback for af-mctp
1832. transport: fix init_pollfd function parameter
1843. transport: Fix doxygen and variables for send and recv functions
1854. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
186
187## [0.5.0] - 2023-08-09
188
189### Added
190
1911. pdr: Introduce pldm_entity_association_pdr_add_check()
192
193### Changed
194
1951. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
1962. transport: pldm_transport_poll(): Adjust return value semantics
1973. transport: free un-wanted responses in pldm_transport_send_recv_msg()
198
199### Deprecated
200
2011. state-set: Enum pldm_state_set_operational_fault_status_values
202
203   The enum operational_fault_status is defined with wrong members and will
204   eventually be replaced with the correct members. Any uses of
205   pldm_state_set_operational_fault_status_values members should move to
206   equivalent pldm_state_set_operational_stress_status_values members if needed.
207
2082. platform: Struct field name in fru_record_set PDR
209
210   References to entity_instance_num should be changed to entity_instance
211
2123. platform: Struct field name in numeric sensor value PDR
213
214   References to entity_instance_num should be changed to entity_instance
215
216### Removed
217
2181. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
2192. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
2203. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
2214. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
2225. bios_table: Remove pldm_bios_table_append_pad_checksum()
2236. fru: Remove get_fru_record_by_option()
2247. pdr: Make is_present() static
2258. pdr: Remove pldm_pdr_add()
2269. pdr: Remove pldm_pdr_add_fru_record_set()
22710. pdr: Remove pldm_entity_association_pdr_add_from_node()
22811. pdr: Make find_entity_ref_in_tree() static
22912. pdr: Make entity_association_tree_find() static
230
231### Fixed
232
2331. requester: Fix response buffer cast in pldm_send_recv()
2342. pdr: Hoist record handle overflow test to avoid memory leak
2353. transport: Correct comparison in while loop condition
236
237## [0.4.0] - 2023-07-14
238
239### Added
240
2411. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
2422. fru: Introduce get_fru_record_by_option_check()
2433. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
2444. pdr: Introduce pldm_pdr_add_check()
2455. pdr: Introduce pldm_pdr_add_fru_record_set_check()
246
247### Changed
248
2491. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
2502. requester: Expose pldm_close() in header
2513. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
2524. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
2535. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
2546. pdr: pldm_pdr_init(): Return NULL on allocation failure
2557. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
2568. pdr: Document preconditions for trivial accessor functions
257
258   A trivial accessor function is one that exposes properties of an object in a
259   way can't result in an error, beyond passing an invalid argument to the
260   function. For APIs meeting this definition we define a precondition that
261   struct pointers must point to valid objects to avoid polluting the function
262   prototypes. The following APIs now have this precondition explicitly defined:
263
264   - pldm_entity_extract()
265   - pldm_entity_get_parent()
266   - pldm_entity_is_exist_parent()
267   - pldm_entity_is_node_parent()
268   - pldm_is_current_parent_child
269   - pldm_is_empty_entity_assoc_tree()
270   - pldm_pdr_get_record_count()
271   - pldm_pdr_get_record_handle()
272   - pldm_pdr_get_repo_size()
273   - pldm_pdr_record_is_remote()
274
2759. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
27610. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
27711. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
27812. pdr: pldm_entity_association_tree_visit(): Document preconditions
27913. pdr: pldm_entity_association_tree_visit(): Exit early on failure
28014. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
28115. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
28216. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
28317. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
28418. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
28519. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
28620. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
28721. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
28822. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
28923. pdr: pldm_entity_get_num_children(): Don't return invalid values
29024. libpldm: Lift or remove asserts where a subsequent check exists
291
292### Deprecated
293
2941. pldm_bios_table_attr_entry_integer_encode()
295
296   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
297
2982. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
299
300   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
301
3023. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
303
304   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
305
3064. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
307
308   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
309
3105. pdr: Deprecate is_present()
311
312   There should be no users of this symbol. If you are a user, you should figure
313   out how to stop, or get in touch. This symbol will be marked static the
314   release after deprecation.
315
3166. pdr: Deprecate find_entity_ref_in_tree()
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
3227. pdr: Deprecate entity_association_tree_find()
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
3288. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
329
330   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
331   pldm_bios_table_append_pad_checksum() should migrate to
332   pldm_bios_table_append_pad_checksum_check()
333
3349. fru: Stabilise get_fru_record_by_option_check()
335
336   get_fru_record_by_option() is deprecated by this change. Users of
337   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
338
33910. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
340
341    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
342    Users of pldm_entity_association_pdr_add_from_node() should migrate to
343    pldm_entity_association_pdr_add_from_node_check()
344
34511. pdr: Stabilise pldm_pdr_add_check()
346
347    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
348    migrate to pldm_pdr_add_check()
349
35012. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
351
352    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
353    pldm_pdr_add_fru_record_set() should migrate to
354    pldm_pdr_add_fru_record_set_check()
355
356### Removed
357
3581. bios_table: Remove deprecated APIs sanitized by assert():
359
360   - pldm_bios_table_string_entry_encode()
361   - pldm_bios_table_string_entry_decode_string()
362   - pldm_bios_table_attr_entry_enum_encode()
363   - pldm_bios_table_attr_entry_enum_decode_pv_num()
364   - pldm_bios_table_attr_entry_enum_decode_def_num()
365   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
366   - pldm_bios_table_attr_entry_string_encode()
367   - pldm_bios_table_attr_entry_string_decode_def_string_length()
368
369### Fixed
370
3711. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
3722. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
3733. transport: mctp-demux: Don't test socket for non-zero value
3744. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
3755. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
3766. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
3777. abi: Update to remove pldm_close() from reference dumps
3788. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
379
380## [0.3.0] - 2023-06-23
381
382### Added
383
3841. Add encode/decode pldmMessagePollEvent data
3852. README: Add a section on working with libpldm
3863. pdr: Introduce remote_container_id and associated APIs
3874. pdr: Add APIs for creating and locating remote PDRs
3885. pdr: Add pldm_pdr_find_last_in_range()
3896. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
3907. pdr: Add pldm_pdr_find_container_id_range_exclude()
391
392### Changed
393
3941. include: Move installed transport.h under libpldm/
3952. libpldm: Explicit deprecated, stable and testing ABI classes
3963. meson: Reduce strength of oem-ibm requirements from enabled to allowed
397
398   The `oem-ibm` feature is now enabled by the default meson configuration, for
399   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
400   recipe:
401
402   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
403
404   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
405   when invoking `meson setup`
406
4074. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
4085. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
409
410### Deprecated
411
4121. bios_table: Deprecate APIs with arguments sanitized using assert()
413
414   C provides enough foot-guns without us encoding them into library APIs.
415   Specifically, deprecate the following in favour of their `*_check()` variants
416   which ensure assertions won't fail or otherwise invoke UB:
417
418   - pldm_bios_table_string_entry_encode()
419   - pldm_bios_table_string_entry_decode_string()
420   - pldm_bios_table_attr_entry_enum_encode()
421   - pldm_bios_table_attr_entry_enum_decode_pv_num()
422   - pldm_bios_table_attr_entry_enum_decode_def_num()
423   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
424   - pldm_bios_table_attr_entry_string_encode()
425   - pldm_bios_table_attr_entry_string_decode_def_string_length()
426
427### Removed
428
4291. libpldm: Remove the requester-api option
430
431### Fixed
432
4331. requester: Make pldm_open() return existing fd
4342. transport: Prevent sticking in waiting for response
4353. transport: Match on response in pldm_transport_send_recv_msg()
4364. requester: Add check before accessing hdr in pldm_recv()
4375. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
438