xref: /openbmc/libpldm/CHANGELOG.md (revision 50dd159e)
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. pdr: Introduce pldm_entity_association_pdr_add_check()
23
24### Changed
25
261. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
27
28### Removed
29
301. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
312. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
323. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
334. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
345. bios_table: Remove pldm_bios_table_append_pad_checksum()
35
36### Fixed
37
381. requester: Fix response buffer cast in pldm_send_recv()
392. pdr: Hoist record handle overflow test to avoid memory leak
40
41## [0.4.0] - 2023-07-14
42
43### Added
44
451. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
462. fru: Introduce get_fru_record_by_option_check()
473. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
484. pdr: Introduce pldm_pdr_add_check()
495. pdr: Introduce pldm_pdr_add_fru_record_set_check()
50
51### Changed
52
531. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
542. requester: Expose pldm_close() in header
553. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
564. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
575. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
586. pdr: pldm_pdr_init(): Return NULL on allocation failure
597. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
608. pdr: Document preconditions for trivial accessor functions
61
62   A trivial accessor function is one that exposes properties of an object in a
63   way can't result in an error, beyond passing an invalid argument to the
64   function. For APIs meeting this definition we define a precondition that
65   struct pointers must point to valid objects to avoid polluting the function
66   prototypes. The following APIs now have this precondition explicitly defined:
67
68   - pldm_entity_extract()
69   - pldm_entity_get_parent()
70   - pldm_entity_is_exist_parent()
71   - pldm_entity_is_node_parent()
72   - pldm_is_current_parent_child
73   - pldm_is_empty_entity_assoc_tree()
74   - pldm_pdr_get_record_count()
75   - pldm_pdr_get_record_handle()
76   - pldm_pdr_get_repo_size()
77   - pldm_pdr_record_is_remote()
78
799. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
8010. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
8111. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
8212. pdr: pldm_entity_association_tree_visit(): Document preconditions
8313. pdr: pldm_entity_association_tree_visit(): Exit early on failure
8414. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
8515. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
8616. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
8717. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
8818. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
8919. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
9020. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
9121. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
9222. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
9323. pdr: pldm_entity_get_num_children(): Don't return invalid values
9424. libpldm: Lift or remove asserts where a subsequent check exists
95
96### Deprecated
97
981. pldm_bios_table_attr_entry_integer_encode()
99
100   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
101
1022. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
103
104   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
105
1063. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
107
108   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
109
1104. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
111
112   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
113
1145. pdr: Deprecate is_present()
115
116   There should be no users of this symbol. If you are a user, you should figure
117   out how to stop, or get in touch. This symbol will be marked static the
118   release after deprecation.
119
1206. pdr: Deprecate find_entity_ref_in_tree()
121
122   There should be no users of this symbol. If you are a user, you should figure
123   out how to stop, or get in touch. This symbol will be marked static the
124   release after deprecation.
125
1267. pdr: Deprecate entity_association_tree_find()
127
128   There should be no users of this symbol. If you are a user, you should figure
129   out how to stop, or get in touch. This symbol will be marked static the
130   release after deprecation.
131
1328. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
133
134   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
135   pldm_bios_table_append_pad_checksum() should migrate to
136   pldm_bios_table_append_pad_checksum_check()
137
1389. fru: Stabilise get_fru_record_by_option_check()
139
140   get_fru_record_by_option() is deprecated by this change. Users of
141   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
142
14310. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
144
145    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
146    Users of pldm_entity_association_pdr_add_from_node() should migrate to
147    pldm_entity_association_pdr_add_from_node_check()
148
14911. pdr: Stabilise pldm_pdr_add_check()
150
151    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
152    migrate to pldm_pdr_add_check()
153
15412. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
155
156    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
157    pldm_pdr_add_fru_record_set() should migrate to
158    pldm_pdr_add_fru_record_set_check()
159
160### Removed
161
1621. bios_table: Remove deprecated APIs sanitized by assert():
163
164   - pldm_bios_table_string_entry_encode()
165   - pldm_bios_table_string_entry_decode_string()
166   - pldm_bios_table_attr_entry_enum_encode()
167   - pldm_bios_table_attr_entry_enum_decode_pv_num()
168   - pldm_bios_table_attr_entry_enum_decode_def_num()
169   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
170   - pldm_bios_table_attr_entry_string_encode()
171   - pldm_bios_table_attr_entry_string_decode_def_string_length()
172
173### Fixed
174
1751. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
1762. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
1773. transport: mctp-demux: Don't test socket for non-zero value
1784. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
1795. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
1806. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
1817. abi: Update to remove pldm_close() from reference dumps
1828. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
183
184## [0.3.0] - 2023-06-23
185
186### Added
187
1881. Add encode/decode pldmMessagePollEvent data
1892. README: Add a section on working with libpldm
1903. pdr: Introduce remote_container_id and associated APIs
1914. pdr: Add APIs for creating and locating remote PDRs
1925. pdr: Add pldm_pdr_find_last_in_range()
1936. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
1947. pdr: Add pldm_pdr_find_container_id_range_exclude()
195
196### Changed
197
1981. include: Move installed transport.h under libpldm/
1992. libpldm: Explicit deprecated, stable and testing ABI classes
2003. meson: Reduce strength of oem-ibm requirements from enabled to allowed
201
202   The `oem-ibm` feature is now enabled by the default meson configuration, for
203   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
204   recipe:
205
206   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
207
208   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
209   when invoking `meson setup`
210
2114. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
2125. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
213
214### Deprecated
215
2161. bios_table: Deprecate APIs with arguments sanitized using assert()
217
218   C provides enough foot-guns without us encoding them into library APIs.
219   Specifically, deprecate the following in favour of their `*_check()` variants
220   which ensure assertions won't fail or otherwise invoke UB:
221
222   - pldm_bios_table_string_entry_encode()
223   - pldm_bios_table_string_entry_decode_string()
224   - pldm_bios_table_attr_entry_enum_encode()
225   - pldm_bios_table_attr_entry_enum_decode_pv_num()
226   - pldm_bios_table_attr_entry_enum_decode_def_num()
227   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
228   - pldm_bios_table_attr_entry_string_encode()
229   - pldm_bios_table_attr_entry_string_decode_def_string_length()
230
231### Removed
232
2331. libpldm: Remove the requester-api option
234
235### Fixed
236
2371. requester: Make pldm_open() return existing fd
2382. transport: Prevent sticking in waiting for response
2393. transport: Match on response in pldm_transport_send_recv_msg()
2404. requester: Add check before accessing hdr in pldm_recv()
2415. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
242