xref: /openbmc/libpldm/CHANGELOG.md (revision 0a6d6821)
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. state-set: Add new enum for Operational Fault Status enum
23
24### Changed
25
261. transport: Match specified metadata in pldm_transport_send_recv_msg()
272. transport: mctp-demux: Drop ABI annotation for internal symbols
283. transport: Stabilise core transport and implementation APIs
29
30   This stabilisation covers the following headers and functions:
31
32   - libpldm/transport.h
33
34     - pldm_transport_poll()
35     - pldm_transport_send_msg()
36     - pldm_transport_recv_msg()
37     - pldm_transport_send_recv_msg()
38
39   - libpldm/transport/af-mctp.h
40
41     - pldm_transport_af_mctp_init()
42     - pldm_transport_af_mctp_destroy()
43     - pldm_transport_af_mctp_core()
44     - pldm_transport_af_mctp_init_pollfd()
45     - pldm_transport_af_mctp_map_tid()
46     - pldm_transport_af_mctp_unmap_tid()
47
48   - libpldm/transport/mctp-demux.h
49     - pldm_transport_mctp_demux_init()
50     - pldm_transport_mctp_demux_destroy()
51     - pldm_transport_mctp_demux_core()
52     - pldm_transport_mctp_demux_init_pollfd()
53     - pldm_transport_mctp_demux_map_tid()
54     - pldm_transport_mctp_demux_unmap_tid()
55
56### Deprecated
57
581. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
59   `libpldm/requester/pldm.h`):
60
61   - pldm_open()
62   - pldm_send_recv()
63   - pldm_send()
64   - pldm_recv()
65   - pldm_recv_any()
66   - pldm_close()
67
68   Users should migrate to the newer "transport" APIs instead.
69
70## [0.6.0] - 2023-08-22
71
72### Changed
73
741. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
752. meson: Apply `b_ndebug=if-release` by default
763. pdr : Stabilize pldm_entity_association_tree_add_entity()
774. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
785. pdr: Stabilize pldm_entity_node_get_remote_container_id()
796. transport: af-mctp: Assign out-params on success in \*\_recv()
807. transport: Generalise the pldm_transport_recv_msg() API
81
82### Removed
83
841. pdr: Remove pldm_entity_association_pdr_add()
852. state-set: Remove enum pldm_state_set_operational_fault_status_values
86
87### Fixed
88
891. transport: register init_pollfd callback for af-mctp
902. transport: fix init_pollfd function parameter
913. transport: Fix doxygen and variables for send and recv functions
924. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
93
94## [0.5.0] - 2023-08-09
95
96### Added
97
981. pdr: Introduce pldm_entity_association_pdr_add_check()
99
100### Changed
101
1021. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
1032. transport: pldm_transport_poll(): Adjust return value semantics
1043. transport: free un-wanted responses in pldm_transport_send_recv_msg()
105
106### Deprecated
107
1081. state-set: Enum pldm_state_set_operational_fault_status_values
109
110   The enum operational_fault_status is defined with wrong members and will
111   eventually be replaced with the correct members. Any uses of
112   pldm_state_set_operational_fault_status_values members should move to
113   equivalent pldm_state_set_operational_stress_status_values members if needed.
114
1152. platform: Struct field name in fru_record_set PDR
116
117   References to entity_instance_num should be changed to entity_instance
118
1193. platform: Struct field name in numeric sensor value PDR
120
121   References to entity_instance_num should be changed to entity_instance
122
123### Removed
124
1251. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
1262. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
1273. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
1284. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
1295. bios_table: Remove pldm_bios_table_append_pad_checksum()
1306. fru: Remove get_fru_record_by_option()
1317. pdr: Make is_present() static
1328. pdr: Remove pldm_pdr_add()
1339. pdr: Remove pldm_pdr_add_fru_record_set()
13410. pdr: Remove pldm_entity_association_pdr_add_from_node()
13511. pdr: Make find_entity_ref_in_tree() static
13612. pdr: Make entity_association_tree_find() static
137
138### Fixed
139
1401. requester: Fix response buffer cast in pldm_send_recv()
1412. pdr: Hoist record handle overflow test to avoid memory leak
1423. transport: Correct comparison in while loop condition
143
144## [0.4.0] - 2023-07-14
145
146### Added
147
1481. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
1492. fru: Introduce get_fru_record_by_option_check()
1503. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
1514. pdr: Introduce pldm_pdr_add_check()
1525. pdr: Introduce pldm_pdr_add_fru_record_set_check()
153
154### Changed
155
1561. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
1572. requester: Expose pldm_close() in header
1583. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
1594. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
1605. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
1616. pdr: pldm_pdr_init(): Return NULL on allocation failure
1627. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
1638. pdr: Document preconditions for trivial accessor functions
164
165   A trivial accessor function is one that exposes properties of an object in a
166   way can't result in an error, beyond passing an invalid argument to the
167   function. For APIs meeting this definition we define a precondition that
168   struct pointers must point to valid objects to avoid polluting the function
169   prototypes. The following APIs now have this precondition explicitly defined:
170
171   - pldm_entity_extract()
172   - pldm_entity_get_parent()
173   - pldm_entity_is_exist_parent()
174   - pldm_entity_is_node_parent()
175   - pldm_is_current_parent_child
176   - pldm_is_empty_entity_assoc_tree()
177   - pldm_pdr_get_record_count()
178   - pldm_pdr_get_record_handle()
179   - pldm_pdr_get_repo_size()
180   - pldm_pdr_record_is_remote()
181
1829. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
18310. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
18411. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
18512. pdr: pldm_entity_association_tree_visit(): Document preconditions
18613. pdr: pldm_entity_association_tree_visit(): Exit early on failure
18714. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
18815. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
18916. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
19017. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
19118. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
19219. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
19320. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
19421. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
19522. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
19623. pdr: pldm_entity_get_num_children(): Don't return invalid values
19724. libpldm: Lift or remove asserts where a subsequent check exists
198
199### Deprecated
200
2011. pldm_bios_table_attr_entry_integer_encode()
202
203   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
204
2052. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
206
207   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
208
2093. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
210
211   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
212
2134. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
214
215   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
216
2175. pdr: Deprecate is_present()
218
219   There should be no users of this symbol. If you are a user, you should figure
220   out how to stop, or get in touch. This symbol will be marked static the
221   release after deprecation.
222
2236. pdr: Deprecate find_entity_ref_in_tree()
224
225   There should be no users of this symbol. If you are a user, you should figure
226   out how to stop, or get in touch. This symbol will be marked static the
227   release after deprecation.
228
2297. pdr: Deprecate entity_association_tree_find()
230
231   There should be no users of this symbol. If you are a user, you should figure
232   out how to stop, or get in touch. This symbol will be marked static the
233   release after deprecation.
234
2358. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
236
237   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
238   pldm_bios_table_append_pad_checksum() should migrate to
239   pldm_bios_table_append_pad_checksum_check()
240
2419. fru: Stabilise get_fru_record_by_option_check()
242
243   get_fru_record_by_option() is deprecated by this change. Users of
244   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
245
24610. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
247
248    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
249    Users of pldm_entity_association_pdr_add_from_node() should migrate to
250    pldm_entity_association_pdr_add_from_node_check()
251
25211. pdr: Stabilise pldm_pdr_add_check()
253
254    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
255    migrate to pldm_pdr_add_check()
256
25712. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
258
259    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
260    pldm_pdr_add_fru_record_set() should migrate to
261    pldm_pdr_add_fru_record_set_check()
262
263### Removed
264
2651. bios_table: Remove deprecated APIs sanitized by assert():
266
267   - pldm_bios_table_string_entry_encode()
268   - pldm_bios_table_string_entry_decode_string()
269   - pldm_bios_table_attr_entry_enum_encode()
270   - pldm_bios_table_attr_entry_enum_decode_pv_num()
271   - pldm_bios_table_attr_entry_enum_decode_def_num()
272   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
273   - pldm_bios_table_attr_entry_string_encode()
274   - pldm_bios_table_attr_entry_string_decode_def_string_length()
275
276### Fixed
277
2781. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
2792. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
2803. transport: mctp-demux: Don't test socket for non-zero value
2814. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
2825. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
2836. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
2847. abi: Update to remove pldm_close() from reference dumps
2858. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
286
287## [0.3.0] - 2023-06-23
288
289### Added
290
2911. Add encode/decode pldmMessagePollEvent data
2922. README: Add a section on working with libpldm
2933. pdr: Introduce remote_container_id and associated APIs
2944. pdr: Add APIs for creating and locating remote PDRs
2955. pdr: Add pldm_pdr_find_last_in_range()
2966. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
2977. pdr: Add pldm_pdr_find_container_id_range_exclude()
298
299### Changed
300
3011. include: Move installed transport.h under libpldm/
3022. libpldm: Explicit deprecated, stable and testing ABI classes
3033. meson: Reduce strength of oem-ibm requirements from enabled to allowed
304
305   The `oem-ibm` feature is now enabled by the default meson configuration, for
306   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
307   recipe:
308
309   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
310
311   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
312   when invoking `meson setup`
313
3144. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
3155. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
316
317### Deprecated
318
3191. bios_table: Deprecate APIs with arguments sanitized using assert()
320
321   C provides enough foot-guns without us encoding them into library APIs.
322   Specifically, deprecate the following in favour of their `*_check()` variants
323   which ensure assertions won't fail or otherwise invoke UB:
324
325   - pldm_bios_table_string_entry_encode()
326   - pldm_bios_table_string_entry_decode_string()
327   - pldm_bios_table_attr_entry_enum_encode()
328   - pldm_bios_table_attr_entry_enum_decode_pv_num()
329   - pldm_bios_table_attr_entry_enum_decode_def_num()
330   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
331   - pldm_bios_table_attr_entry_string_encode()
332   - pldm_bios_table_attr_entry_string_decode_def_string_length()
333
334### Removed
335
3361. libpldm: Remove the requester-api option
337
338### Fixed
339
3401. requester: Make pldm_open() return existing fd
3412. transport: Prevent sticking in waiting for response
3423. transport: Match on response in pldm_transport_send_recv_msg()
3434. requester: Add check before accessing hdr in pldm_recv()
3445. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
345