xref: /openbmc/libpldm/CHANGELOG.md (revision bc40dd5a64f5b375ba86a0ab6b2ed3e7863e2f5b)
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
22- Add Firmware Device side firmware_update encode/decode functions
23
24- Add firmware update FD responder
25
26- Add PLDM control responder. PLDM types and support commands/versions can be
27  registered.
28
29- PLDM FD responder accepts a PLDM control handle and will register its version.
30
31- base: Define the minimum request bytes for SetTID command.
32
33### Changed
34
35- dsp: firmware_update: Expand "params" in symbol names
36
37  The change only affects structs and functions relating to ABIs that are marked
38  as testing. There should be no impact on users of the stable APIs/ ABIs.
39
40- Reimplement parsing of the firmware update downstream device parameter table
41  using an iterator macro
42
43  The change removes redundant APIs in the process.
44
45- Returned error values for the following stable APIs have changed their
46  semantics:
47
48  - `decode_descriptor_type_length_value()`
49  - `decode_event_message_buffer_size_resp()`
50  - `decode_get_numeric_effecter_value_resp()`
51  - `decode_get_sensor_reading_resp()`
52  - `decode_get_state_sensor_readings_resp()`
53  - `decode_numeric_sensor_data()`
54  - `decode_sensor_op_data()`
55
56  No new error values will be returned, but existing error values may be
57  returned under new conditions.
58
59- pdr: Indicates success or failure depending on the outcome of the entity
60  association PDR creation
61
62### Deprecated
63
64### Removed
65
66### Fixed
67
68- pdr: Remove PDR if the contained entity to be removed is the last one
69- meson: sizes.h: add includedir to install path
70- pdr: Create entity association PDRs with unique record handle
71
72### Security
73
74## [0.11.0] 2024-12-12
75
76### Added
77
78- dsp: firmware_update: Iterators for downstream device descriptors
79- platform: add PLDM Command numbers
80- base: add PLDM Command numbers
81
82### Changed
83
84- Register assignment for parameters of `encode_state_effecter_pdr()`
85
86- dsp: firmware_update: Iterators for downstream device descriptors
87
88  The prototype for `decode_query_downstream_identifiers_resp()` was updated to
89  improve ergonomics for the iterator APIs.
90
91- meson: Specify OEM extensions in an array
92
93  `include/libpldm/meson.build` is modified, but not in ways that are
94  significant.
95
96- Return `ENOENT` rather than `ENOKEY` from
97  `pldm_pdr_find_child_container_id_index_range_exclude()`
98
99- dsp: firmware_update: Change return type of downstream device ABIs to ERRNO
100
101  Those downstream device related ABIs have not been stabilized yet, change
102  return type from PLDM Completion Code to ERRNO
103
104- dsp: firmware_update: pack decomposed parameters to struct
105
106  `encode_query_downstream_identifiers_req()` and
107  `encode_get_downstream_firmware_params_req()`
108
109### Fixed
110
111- dsp: platform: Fix location of closing paren in overflow detection
112- libpldm: Install api header, update changelog
113
114## [0.10.0] 2024-11-01
115
116### Added
117
118- oem: meta: Add decode_oem_meta_file_io_write_req()
119- oem: meta: Add decode_oem_meta_file_io_read_req()
120- oem: meta: Add encode_oem_meta_file_io_read_resp()
121- pdr: Add pldm_entity_association_pdr_remove_contained_entity()
122- pdr: Add pldm_pdr_remove_fru_record_set_by_rsi()
123- pldm_entity_association_tree_copy_root_check()
124- oem: ibm: Add topology related state set and enum
125
126- base: Add size and buffer macros for struct pldm_msg
127
128  Together these macros reduce the need for use of reinterpret_cast<>() in C++.
129
130- entity: Add new entity types from DSP0249 v1.3.0
131- stateset: Add new state sets from DSP0249 v1.3.0
132
133### Changed
134
135- dsp: bios_table: Null check for pldm_bios_table_iter_is_end()
136
137  pldm_bios_table_iter_is_end() now returns true if the provided argument is
138  NULL.
139
140- Register assignment for parameters of a number of APIs changed with increased
141  scrutiny on their implementations.
142
143  - `decode_entity_auxiliary_names_pdr()`
144  - `decode_get_state_sensor_readings_resp()`
145  - `decode_oem_meta_file_io_req()`
146  - `decode_platform_event_message_req()`
147  - `decode_platform_event_message_resp()`
148  - `decode_sensor_op_data()`
149  - `encode_get_state_effecter_states_resp()`
150  - `encode_state_effecter_pdr()`
151  - `encode_state_sensor_pdr()`
152  - `pldm_bios_table_append_pad_checksum()`
153  - `pldm_bios_table_attr_value_entry_encode_enum()`
154  - `pldm_bios_table_attr_value_entry_encode_string()`
155  - `pldm_pdr_find_record()`
156  - `pldm_pdr_get_next_record()`
157
158- platform: Support PLDM_CPER_EVENT in encode_platform_event_message_req()
159
160- dsp: firmware_update: Bounds check
161  decode_downstream_device_parameter_table_entry_versions()
162
163  The additional bounds-checking required the addition of further length
164  parameters.
165
166### Deprecated
167
168- oem: meta: Deprecate `decode_oem_meta_file_io_req()`
169
170  Users should switch to `decode_oem_meta_file_io_write_req()`. Modify this
171  function to make it safer.
172
173  Modification:
174
175  - The meaning of the returned result.
176  - Change parameters from individual pointers to a struct.
177  - Check the length provided in the message won't exceed the buffer.
178
179- pldm_entity_association_tree_copy_root()
180
181  The implementation allocates, but gives no indication to the caller if an
182  allocation (and hence the copy) has failed. Users should migrate to
183  pldm_entity_association_tree_copy_root_check().
184
185- The following APIs are deprecated as unsafe due to various unfixable CWE
186  violations:
187
188  - [CWE-129: Improper Validation of Array Index](https://cwe.mitre.org/data/definitions/129.html)
189
190    - `encode_get_bios_current_value_by_handle_resp()`
191    - `encode_get_bios_table_resp()`
192    - `encode_get_file_table_resp()`
193    - `encode_get_version_resp()`
194    - `pldm_bios_table_attr_entry_enum_decode_def_indices()`
195    - `pldm_bios_table_attr_entry_enum_decode_def_num()`
196    - `pldm_bios_table_attr_find_by_handle()`
197    - `pldm_bios_table_attr_find_by_string_handle()`
198    - `pldm_bios_table_attr_value_find_by_handle()`
199    - `pldm_bios_table_iter_create()`
200    - `pldm_bios_table_iter_is_end()`
201    - `pldm_bios_table_string_find_by_handle()`
202    - `pldm_bios_table_string_find_by_string()`
203
204  - [CWE-617: Reachable Assertion](https://cwe.mitre.org/data/definitions/617.html)
205
206    - `pldm_entity_association_tree_copy_root()`
207
208  - [CWE-789: Memory Allocation with Excessive Size Value](https://cwe.mitre.org/data/definitions/789.html)
209
210    - `decode_oem_meta_file_io_req()`
211
212  - [CWE-823: Use of Out-of-range Pointer Offset](https://cwe.mitre.org/data/definitions/823.html)
213    - `encode_fru_record()`
214    - `encode_get_pdr_resp()`
215    - `pldm_bios_table_attr_entry_enum_encode_length()`
216
217### Removed
218
219- Deprecated functions with the `_check` suffix
220
221  - `get_fru_record_by_option_check()`
222  - `pldm_bios_table_append_pad_checksum_check()`
223  - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
224  - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
225  - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
226  - `pldm_bios_table_attr_entry_enum_encode_check()`
227  - `pldm_bios_table_attr_entry_integer_encode_check()`
228  - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
229  - `pldm_bios_table_attr_entry_string_encode_check()`
230  - `pldm_bios_table_attr_value_entry_encode_enum_check()`
231  - `pldm_bios_table_attr_value_entry_encode_integer_check()`
232  - `pldm_bios_table_attr_value_entry_encode_string_check()`
233  - `pldm_bios_table_string_entry_decode_string_check()`
234  - `pldm_bios_table_string_entry_encode_check()`
235  - `pldm_entity_association_pdr_add_check()`
236  - `pldm_entity_association_pdr_add_from_node_check()`
237  - `pldm_pdr_add_check()`
238  - `pldm_pdr_add_fru_record_set_check()`
239
240### Fixed
241
242- dsp: bios_table: Null check for pldm_bios_table_iter_is_end()
243
244  Avoid a caller-controlled NULL pointer dereference in the library
245  implementation.
246
247- platform: fix encode/decode_poll_for_platform_event_message_req
248
249  Update checking of `TransferOperationFlag` and `eventIDToAcknowledge` to
250  follow spec.
251
252- platform: Fix checking `eventIDToAcknowledge`
253
254  As the event receiver sends `PollForPlatformEventMessage` with the
255  `tranferFlag` is `AcknowledgementOnly`, the value `eventIDToAcknowledge`
256  should be the previously retrieved eventID (from the PLDM terminus).
257
258- dsp: platform: Prevent overflow of arithmetic on event_data_length
259- dsp: platform: Bounds check encode_sensor_state_pdr()
260- dsp: platform: Bounds check encode_state_effecter_pdr()
261- dsp: pdr: Bounds check pldm_entity_association_pdr_extract()
262- dsp: bios_table: Bounds check pldm_bios_table_append_pad_checksum()
263- dsp: bios_table: Bounds check pldm_bios_table_attr_value_entry_encode_string()
264- dsp: bios_table: Bounds check pldm_bios_table_attr_value_entry_encode_enum()
265- dsp: firmware_update: Bounds check
266  decode_downstream_device_parameter_table_entry_versions()
267- oem: ibm: platform: Bounds check encode_bios_attribute_update_event_req()
268- dsp: fru: Bounds check encode_get_fru_record_by_option_resp()
269- dsp: fru: Bounds check encode_fru_record()
270- dsp: bios: Bounds check encode_set_bios_table_req()
271- dsp: bios: Bounds check encode_set_bios_attribute_current_value_req()
272- dsp: bios_table: Bounds check pldm_bios_table_string_entry_encode()
273- dsp: pdr: Rework test in pldm_entity_association_pdr_extract()
274- dsp: platform: Fix decode_set_event_receiver_req()
275
276## [0.9.1] - 2024-09-07
277
278### Changed
279
280- Moved evolutions intended for v0.9.0 into place
281
282  Evolutions for the release have been moved from `evolutions/current` to
283  `evolutions/v0.9.1`. Library users can apply them to migrate off of deprecated
284  APIs.
285
286## [0.9.0] - 2024-09-07
287
288### Added
289
290- base: Define macros for reserved TIDs
291- pdr: Add pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
292- pdr: Add pldm_entity_association_pdr_create_new()
293- platform: Define macros for the responded transferflags
294- pdr: Add pldm_pdr_get_terminus_handle() API
295- pdr: Add related decode_entity_auxiliary_names_pdr() APIs
296- fw_update: Add encode req & decode resp for get_downstream_fw_params
297- platform: Add decode_pldm_platform_cper_event() API
298- decode_get_pdr_repository_info_resp_safe()
299
300  Replaces decode_get_pdr_repository_info_resp() as discussed in the
301  `Deprecated` section below
302
303- decode_get_pdr_resp_safe()
304
305  Replaces decode_get_pdr_resp() as discussed in the `Deprecated` section below
306
307### Changed
308
309- pdr: Stabilise related decode_entity_auxiliary_names_pdr() APIs
310- platform: Rework decode/encode_pldm_message_poll_event_data() APIs
311- platform: Stabilise decode_pldm_message_poll_event_data() APIs
312- ABI break for decode_sensor_op_data()
313
314  Applying LIBPLDM_CC_NONNULL to the internal msgbuf APIs caused
315  abi-compliance-checker to flag a change in the register containing the
316  parameter `previous_op_state`.
317
318- platform: Stabilise decode_pldm_platform_cper_event() API
319- oem: meta: Stabilise decode_oem_meta_file_io_write_req() API
320- oem: meta: Stabilise decode_oem_meta_file_io_read_req() API
321- oem: meta: Stabilise encode_oem_meta_file_io_read_resp() API
322
323### Deprecated
324
325- Rename and deprecate functions with the `_check` suffix
326
327  All library function return values always need to be checked. The `_check`
328  suffix is redundant, so remove it. Migration to the non-deprecated equivalents
329  without the `_check` suffix can be performed using `scripts/ apply-renames`
330  and the [clang-rename][] configurations under `evolutions/`
331
332  The deprecated functions:
333
334  - `get_fru_record_by_option_check()`
335  - `pldm_bios_table_append_pad_checksum_check()`
336  - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
337  - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
338  - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
339  - `pldm_bios_table_attr_entry_enum_encode_check()`
340  - `pldm_bios_table_attr_entry_integer_encode_check()`
341  - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
342  - `pldm_bios_table_attr_entry_string_encode_check()`
343  - `pldm_bios_table_attr_value_entry_encode_enum_check()`
344  - `pldm_bios_table_attr_value_entry_encode_integer_check()`
345  - `pldm_bios_table_attr_value_entry_encode_string_check()`
346  - `pldm_bios_table_string_entry_decode_string_check()`
347  - `pldm_bios_table_string_entry_encode_check()`
348  - `pldm_entity_association_pdr_add_check()`
349  - `pldm_entity_association_pdr_add_from_node_check()`
350  - `pldm_pdr_add_check()`
351  - `pldm_pdr_add_fru_record_set_check()`
352
353[clang-rename]: https://clang.llvm.org/extra/clang-rename.html
354
355- `decode_get_pdr_repository_info_resp()`
356
357  Users should move to `decode_get_pdr_repository_info_resp_safe()` which
358  eliminates the opportunity for buffer overruns when extracting objects from
359  the message.
360
361- `decode_get_pdr_resp()`
362
363  Users should move to `decode_get_pdr_resp_safe()` which reduces the invocation
364  tedium and improves memory safety over `decode_get_pdr_resp()`.
365
366### Removed
367
368- IBM OEM header compatibility symlinks.
369
370  Anyone left using the deprecated paths can migrate using the coccinelle patch
371  at `evolutions/current/oem-ibm-header-compat.cocci`.
372
373### Fixed
374
375- requester: instance-id: Release read lock on conflict
376- pdr: Error propagation for
377  pldm_entity_association_pdr_add_from_node_with_record_handle()
378
379## [0.8.0] - 2024-05-23
380
381### Added
382
383- base: Provide pldm_msg_hdr_correlate_response()
384- transport: af-mctp: Add pldm_transport_af_mctp_bind()
385- oem: ibm: Add chapdata file type support
386- base: Added PLDM_SMBIOS & PLDM_RDE message types
387- oem: meta: Add decode_oem_meta_file_io_req()
388- state-set: Add all state set values to system power state enum as per DSP0249
389- platform: Add alias members to the enum
390  pldm_pdr_repository_chg_event_change_record_event_data_operation.
391
392  enum constants with inconsistent names are deprecated with this change. remove
393  old inconsistent enum members after backward compatibility cleanup is done
394
395- oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
396- oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
397- platform: Add 3 PDR type enum for Redfish Device Enablement per DSP0248_1.2.0
398- state_set: Add CONNECTED and DISCONNECTED enum for Link State set
399- entity: Add enum for Network Interface Connectors and Network Ports Connection
400  Types
401- pdr: Add decode_numeric_effecter_pdr_data()
402- oem: ibm: Support for the Real SAI entity id
403- fw_update: Add encode req & decode resp for query_downstream_devices
404- fw_update: Add encode req & decode resp for query_downstream_identifiers
405- platform: Add support for GetStateEffecterStates command
406
407### Changed
408
409- base: Stabilise pldm_msg_hdr_correlate_response()
410- transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
411- libpldm: Fix header use
412- libpldm: More fixes for header use
413- pdr: Stabilise pldm_pdr_find_last_in_range() API
414- pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
415- oem: meta: stabilise decode_oem_meta_file_io_req()
416- pdr: pldm_entity_association_tree_copy_root(): Document preconditions
417
418### Deprecated
419
420- Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
421  with `PLDM_OEM_IBM_`
422
423### Fixed
424
425- libpldm: Rationalise the local and installed path of pldm.h
426- pdr: Assign record_handle in entity_association_pdr_add_children()
427- msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
428- pdr: Remove redundant constant for minimum numeric sensor PDR length
429- tests: oem: meta: Fix fileio use of msgbuf
430
431## [0.7.0] - 2023-08-29
432
433### Added
434
435- state-set: Add new enum for Operational Fault Status enum
436
437### Changed
438
439- transport: Match specified metadata in pldm_transport_send_recv_msg()
440- transport: mctp-demux: Drop ABI annotation for internal symbols
441- transport: Stabilise core transport and implementation APIs
442
443  This stabilisation covers the following headers and functions:
444
445  - libpldm/transport.h
446
447    - pldm_transport_poll()
448    - pldm_transport_send_msg()
449    - pldm_transport_recv_msg()
450    - pldm_transport_send_recv_msg()
451
452  - libpldm/transport/af-mctp.h
453
454    - pldm_transport_af_mctp_init()
455    - pldm_transport_af_mctp_destroy()
456    - pldm_transport_af_mctp_core()
457    - pldm_transport_af_mctp_init_pollfd()
458    - pldm_transport_af_mctp_map_tid()
459    - pldm_transport_af_mctp_unmap_tid()
460
461  - libpldm/transport/mctp-demux.h
462    - pldm_transport_mctp_demux_init()
463    - pldm_transport_mctp_demux_destroy()
464    - pldm_transport_mctp_demux_core()
465    - pldm_transport_mctp_demux_init_pollfd()
466    - pldm_transport_mctp_demux_map_tid()
467    - pldm_transport_mctp_demux_unmap_tid()
468
469### Deprecated
470
471- All the existing "requester" APIs from `libpldm/pldm.h` (also known as
472  `libpldm/requester/pldm.h`):
473
474  - pldm_open()
475  - pldm_send_recv()
476  - pldm_send()
477  - pldm_recv()
478  - pldm_recv_any()
479  - pldm_close()
480
481  Users should migrate to the newer "transport" APIs instead.
482
483## Fixed
484
485- tests: Exclude transport tests when build excludes testing ABIs
486- abi: Capture deprecation of pldm_close()
487
488## [0.6.0] - 2023-08-22
489
490### Changed
491
492- pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
493- meson: Apply `b_ndebug=if-release` by default
494- pdr : Stabilize pldm_entity_association_tree_add_entity()
495- pdr: Stabilise pldm_entity_association_tree_find_with_locality()
496- pdr: Stabilize pldm_entity_node_get_remote_container_id()
497- transport: af-mctp: Assign out-params on success in \*\_recv()
498- transport: Generalise the pldm_transport_recv_msg() API
499
500### Removed
501
502- pdr: Remove pldm_entity_association_pdr_add()
503- state-set: Remove enum pldm_state_set_operational_fault_status_values
504
505### Fixed
506
507- transport: register init_pollfd callback for af-mctp
508- transport: fix init_pollfd function parameter
509- transport: Fix doxygen and variables for send and recv functions
510- transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
511
512## [0.5.0] - 2023-08-09
513
514### Added
515
516- pdr: Introduce pldm_entity_association_pdr_add_check()
517
518### Changed
519
520- pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
521- transport: pldm_transport_poll(): Adjust return value semantics
522- transport: free un-wanted responses in pldm_transport_send_recv_msg()
523
524### Deprecated
525
526- state-set: Enum pldm_state_set_operational_fault_status_values
527
528  The enum operational_fault_status is defined with wrong members and will
529  eventually be replaced with the correct members. Any uses of
530  pldm_state_set_operational_fault_status_values members should move to
531  equivalent pldm_state_set_operational_stress_status_values members if needed.
532
533- platform: Struct field name in fru_record_set PDR
534
535  References to entity_instance_num should be changed to entity_instance
536
537- platform: Struct field name in numeric sensor value PDR
538
539  References to entity_instance_num should be changed to entity_instance
540
541### Removed
542
543- bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
544- bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
545- bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
546- bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
547- bios_table: Remove pldm_bios_table_append_pad_checksum()
548- fru: Remove get_fru_record_by_option()
549- pdr: Make is_present() static
550- pdr: Remove pldm_pdr_add()
551- pdr: Remove pldm_pdr_add_fru_record_set()
552- pdr: Remove pldm_entity_association_pdr_add_from_node()
553- pdr: Make find_entity_ref_in_tree() static
554- pdr: Make entity_association_tree_find() static
555
556### Fixed
557
558- requester: Fix response buffer cast in pldm_send_recv()
559- pdr: Hoist record handle overflow test to avoid memory leak
560- transport: Correct comparison in while loop condition
561
562## [0.4.0] - 2023-07-14
563
564### Added
565
566- bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
567- fru: Introduce get_fru_record_by_option_check()
568- pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
569- pdr: Introduce pldm_pdr_add_check()
570- pdr: Introduce pldm_pdr_add_fru_record_set_check()
571
572### Changed
573
574- requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
575- requester: Expose pldm_close() in header
576- bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
577- bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
578- bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
579- pdr: pldm_pdr_init(): Return NULL on allocation failure
580- pdr: pldm_pdr_destroy(): Exit early if repo is NULL
581- pdr: Document preconditions for trivial accessor functions
582
583  A trivial accessor function is one that exposes properties of an object in a
584  way can't result in an error, beyond passing an invalid argument to the
585  function. For APIs meeting this definition we define a precondition that
586  struct pointers must point to valid objects to avoid polluting the function
587  prototypes. The following APIs now have this precondition explicitly defined:
588
589  - pldm_entity_extract()
590  - pldm_entity_get_parent()
591  - pldm_entity_is_exist_parent()
592  - pldm_entity_is_node_parent()
593  - pldm_is_current_parent_child
594  - pldm_is_empty_entity_assoc_tree()
595  - pldm_pdr_get_record_count()
596  - pldm_pdr_get_record_handle()
597  - pldm_pdr_get_repo_size()
598  - pldm_pdr_record_is_remote()
599
600- pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
601- pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
602- pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
603- pdr: pldm_entity_association_tree_visit(): Document preconditions
604- pdr: pldm_entity_association_tree_visit(): Exit early on failure
605- pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
606- pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
607- pdr: pldm_is_current_parent_child(): Return false for invalid arguments
608- pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
609- pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
610- pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
611- pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
612- pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
613- pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
614- pdr: pldm_entity_get_num_children(): Don't return invalid values
615- libpldm: Lift or remove asserts where a subsequent check exists
616
617### Deprecated
618
619- pldm_bios_table_attr_entry_integer_encode()
620
621  Migrate to pldm_bios_table_attr_entry_integer_encode_check()
622
623- bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
624
625  Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
626
627- bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
628
629  Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
630
631- bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
632
633  Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
634
635- pdr: Deprecate is_present()
636
637  There should be no users of this symbol. If you are a user, you should figure
638  out how to stop, or get in touch. This symbol will be marked static the
639  release after deprecation.
640
641- pdr: Deprecate find_entity_ref_in_tree()
642
643  There should be no users of this symbol. If you are a user, you should figure
644  out how to stop, or get in touch. This symbol will be marked static the
645  release after deprecation.
646
647- pdr: Deprecate entity_association_tree_find()
648
649  There should be no users of this symbol. If you are a user, you should figure
650  out how to stop, or get in touch. This symbol will be marked static the
651  release after deprecation.
652
653- bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
654
655  pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
656  pldm_bios_table_append_pad_checksum() should migrate to
657  pldm_bios_table_append_pad_checksum_check()
658
659- fru: Stabilise get_fru_record_by_option_check()
660
661  get_fru_record_by_option() is deprecated by this change. Users of
662  get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
663
664- pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
665
666  pldm_entity_association_pdr_add_from_node() is deprecated by this change.
667  Users of pldm_entity_association_pdr_add_from_node() should migrate to
668  pldm_entity_association_pdr_add_from_node_check()
669
670- pdr: Stabilise pldm_pdr_add_check()
671
672  pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
673  migrate to pldm_pdr_add_check()
674
675- pdr: Stabilise pldm_pdr_add_fru_record_set_check()
676
677  pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
678  pldm_pdr_add_fru_record_set() should migrate to
679  pldm_pdr_add_fru_record_set_check()
680
681### Removed
682
683- bios_table: Remove deprecated APIs sanitized by assert():
684
685  - pldm_bios_table_string_entry_encode()
686  - pldm_bios_table_string_entry_decode_string()
687  - pldm_bios_table_attr_entry_enum_encode()
688  - pldm_bios_table_attr_entry_enum_decode_pv_num()
689  - pldm_bios_table_attr_entry_enum_decode_def_num()
690  - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
691  - pldm_bios_table_attr_entry_string_encode()
692  - pldm_bios_table_attr_entry_string_decode_def_string_length()
693
694### Fixed
695
696- pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
697- pdr: Rework pldm_pdr_find_container_id_range_exclude() API
698- transport: mctp-demux: Don't test socket for non-zero value
699- requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
700- pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
701- transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
702- abi: Update to remove pldm_close() from reference dumps
703- bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
704
705## [0.3.0] - 2023-06-23
706
707### Added
708
709- Add encode/decode pldmMessagePollEvent data
710- README: Add a section on working with libpldm
711- pdr: Introduce remote_container_id and associated APIs
712- pdr: Add APIs for creating and locating remote PDRs
713- pdr: Add pldm_pdr_find_last_in_range()
714- pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
715- pdr: Add pldm_pdr_find_container_id_range_exclude()
716
717### Changed
718
719- include: Move installed transport.h under libpldm/
720- libpldm: Explicit deprecated, stable and testing ABI classes
721- meson: Reduce strength of oem-ibm requirements from enabled to allowed
722
723  The `oem-ibm` feature is now enabled by the default meson configuration, for
724  CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
725  recipe:
726
727  <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10>
728
729  To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
730  when invoking `meson setup`
731
732- bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
733- bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
734
735### Deprecated
736
737- bios_table: Deprecate APIs with arguments sanitized using assert()
738
739  C provides enough foot-guns without us encoding them into library APIs.
740  Specifically, deprecate the following in favour of their `*_check()` variants
741  which ensure assertions won't fail or otherwise invoke UB:
742
743  - pldm_bios_table_string_entry_encode()
744  - pldm_bios_table_string_entry_decode_string()
745  - pldm_bios_table_attr_entry_enum_encode()
746  - pldm_bios_table_attr_entry_enum_decode_pv_num()
747  - pldm_bios_table_attr_entry_enum_decode_def_num()
748  - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
749  - pldm_bios_table_attr_entry_string_encode()
750  - pldm_bios_table_attr_entry_string_decode_def_string_length()
751
752### Removed
753
754- libpldm: Remove the requester-api option
755
756### Fixed
757
758- requester: Make pldm_open() return existing fd
759- transport: Prevent sticking in waiting for response
760- transport: Match on response in pldm_transport_send_recv_msg()
761- requester: Add check before accessing hdr in pldm_recv()
762- bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
763