xref: /openbmc/libpldm/CHANGELOG.md (revision 0ecf6bcf)
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()
31
32### Fixed
33
341. requester: Fix response buffer cast in pldm_send_recv()
352. pdr: Hoist record handle overflow test to avoid memory leak
36
37## [0.4.0] - 2023-07-14
38
39### Added
40
411. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
422. fru: Introduce get_fru_record_by_option_check()
433. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
444. pdr: Introduce pldm_pdr_add_check()
455. pdr: Introduce pldm_pdr_add_fru_record_set_check()
46
47### Changed
48
491. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
502. requester: Expose pldm_close() in header
513. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
524. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
535. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
546. pdr: pldm_pdr_init(): Return NULL on allocation failure
557. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
568. pdr: Document preconditions for trivial accessor functions
57
58   A trivial accessor function is one that exposes properties of an object in a
59   way can't result in an error, beyond passing an invalid argument to the
60   function. For APIs meeting this definition we define a precondition that
61   struct pointers must point to valid objects to avoid polluting the function
62   prototypes. The following APIs now have this precondition explicitly defined:
63
64   - pldm_entity_extract()
65   - pldm_entity_get_parent()
66   - pldm_entity_is_exist_parent()
67   - pldm_entity_is_node_parent()
68   - pldm_is_current_parent_child
69   - pldm_is_empty_entity_assoc_tree()
70   - pldm_pdr_get_record_count()
71   - pldm_pdr_get_record_handle()
72   - pldm_pdr_get_repo_size()
73   - pldm_pdr_record_is_remote()
74
759. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
7610. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
7711. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
7812. pdr: pldm_entity_association_tree_visit(): Document preconditions
7913. pdr: pldm_entity_association_tree_visit(): Exit early on failure
8014. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
8115. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
8216. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
8317. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
8418. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
8519. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
8620. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
8721. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
8822. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
8923. pdr: pldm_entity_get_num_children(): Don't return invalid values
9024. libpldm: Lift or remove asserts where a subsequent check exists
91
92### Deprecated
93
941. pldm_bios_table_attr_entry_integer_encode()
95
96   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
97
982. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
99
100   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
101
1023. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
103
104   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
105
1064. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
107
108   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
109
1105. pdr: Deprecate is_present()
111
112   There should be no users of this symbol. If you are a user, you should figure
113   out how to stop, or get in touch. This symbol will be marked static the
114   release after deprecation.
115
1166. pdr: Deprecate find_entity_ref_in_tree()
117
118   There should be no users of this symbol. If you are a user, you should figure
119   out how to stop, or get in touch. This symbol will be marked static the
120   release after deprecation.
121
1227. pdr: Deprecate entity_association_tree_find()
123
124   There should be no users of this symbol. If you are a user, you should figure
125   out how to stop, or get in touch. This symbol will be marked static the
126   release after deprecation.
127
1288. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
129
130   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
131   pldm_bios_table_append_pad_checksum() should migrate to
132   pldm_bios_table_append_pad_checksum_check()
133
1349. fru: Stabilise get_fru_record_by_option_check()
135
136   get_fru_record_by_option() is deprecated by this change. Users of
137   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
138
13910. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
140
141    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
142    Users of pldm_entity_association_pdr_add_from_node() should migrate to
143    pldm_entity_association_pdr_add_from_node_check()
144
14511. pdr: Stabilise pldm_pdr_add_check()
146
147    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
148    migrate to pldm_pdr_add_check()
149
15012. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
151
152    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
153    pldm_pdr_add_fru_record_set() should migrate to
154    pldm_pdr_add_fru_record_set_check()
155
156### Removed
157
1581. bios_table: Remove deprecated APIs sanitized by assert():
159
160   - pldm_bios_table_string_entry_encode()
161   - pldm_bios_table_string_entry_decode_string()
162   - pldm_bios_table_attr_entry_enum_encode()
163   - pldm_bios_table_attr_entry_enum_decode_pv_num()
164   - pldm_bios_table_attr_entry_enum_decode_def_num()
165   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
166   - pldm_bios_table_attr_entry_string_encode()
167   - pldm_bios_table_attr_entry_string_decode_def_string_length()
168
169### Fixed
170
1711. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
1722. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
1733. transport: mctp-demux: Don't test socket for non-zero value
1744. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
1755. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
1766. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
1777. abi: Update to remove pldm_close() from reference dumps
1788. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
179
180## [0.3.0] - 2023-06-23
181
182### Added
183
1841. Add encode/decode pldmMessagePollEvent data
1852. README: Add a section on working with libpldm
1863. pdr: Introduce remote_container_id and associated APIs
1874. pdr: Add APIs for creating and locating remote PDRs
1885. pdr: Add pldm_pdr_find_last_in_range()
1896. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
1907. pdr: Add pldm_pdr_find_container_id_range_exclude()
191
192### Changed
193
1941. include: Move installed transport.h under libpldm/
1952. libpldm: Explicit deprecated, stable and testing ABI classes
1963. meson: Reduce strength of oem-ibm requirements from enabled to allowed
197
198   The `oem-ibm` feature is now enabled by the default meson configuration, for
199   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
200   recipe:
201
202   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
203
204   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
205   when invoking `meson setup`
206
2074. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
2085. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
209
210### Deprecated
211
2121. bios_table: Deprecate APIs with arguments sanitized using assert()
213
214   C provides enough foot-guns without us encoding them into library APIs.
215   Specifically, deprecate the following in favour of their `*_check()` variants
216   which ensure assertions won't fail or otherwise invoke UB:
217
218   - pldm_bios_table_string_entry_encode()
219   - pldm_bios_table_string_entry_decode_string()
220   - pldm_bios_table_attr_entry_enum_encode()
221   - pldm_bios_table_attr_entry_enum_decode_pv_num()
222   - pldm_bios_table_attr_entry_enum_decode_def_num()
223   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
224   - pldm_bios_table_attr_entry_string_encode()
225   - pldm_bios_table_attr_entry_string_decode_def_string_length()
226
227### Removed
228
2291. libpldm: Remove the requester-api option
230
231### Fixed
232
2331. requester: Make pldm_open() return existing fd
2342. transport: Prevent sticking in waiting for response
2353. transport: Match on response in pldm_transport_send_recv_msg()
2364. requester: Add check before accessing hdr in pldm_recv()
2375. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
238