#
46d07685 |
| 14-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
pldm_bios_table_attr_value_entry_encode_string() was deprecated in v0.4.0, remove it now.
Signed-off-by: Andrew Jeffery <andrew@a
bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
pldm_bios_table_attr_value_entry_encode_string() was deprecated in v0.4.0, remove it now.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I0a2bd8eef2f70a40158060cd50c49aa4d0ec4d72
show more ...
|
#
8b1c0340 |
| 14-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
pldm_bios_table_attr_value_entry_encode_enum() was deprecated in v0.4.0, so remove it now.
Signed-off-by: Andrew Jeffery <andrew@aj
bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
pldm_bios_table_attr_value_entry_encode_enum() was deprecated in v0.4.0, so remove it now.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I13ed735a541b7df97b0dafbcc5ed62bb7984b571
show more ...
|
#
0ecf6bcf |
| 14-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
pldm_bios_table_attr_entry_integer_encode_length() was deprecated in v0.4.0, now remove it.
Signed-off-by: Andrew Jeffery <andr
bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
pldm_bios_table_attr_entry_integer_encode_length() was deprecated in v0.4.0, now remove it.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ie26d609a0bcecee930222faf8ec5ef4524b583e5
show more ...
|
#
65945992 |
| 17-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Introduce pldm_entity_association_pdr_add_check()
pldm_entity_association_pdr_add_check() replaces pldm_entity_association_pdr_add(), which requires assert() for error handling. pldm_entity_ass
pdr: Introduce pldm_entity_association_pdr_add_check()
pldm_entity_association_pdr_add_check() replaces pldm_entity_association_pdr_add(), which requires assert() for error handling. pldm_entity_association_pdr_add_check() instead returns a value that indicates success or failure.
Note that a failure of pldm_entity_association_pdr_add_check() cannot guarantee consistency of the PDR repository. Multiple fallible actions that mutate the PDR repository are required and there is currently no method to unwind the mutations up to the point of failure.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I6853932b314260d4b0e2b3545a2a067b781a7ffe
show more ...
|
#
3b93d09c |
| 16-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
This makes it slightly more ergonomic when we don't care for the handle value of the new record.
Signed-off-by: Andrew Jeffery <andrew@a
pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
This makes it slightly more ergonomic when we don't care for the handle value of the new record.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ic6d212031916d9f065769e4126838ff04bcf1ddc
show more ...
|
#
c6cc028f |
| 16-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Hoist record handle overflow test to avoid memory leak
The rework in 572a39507d1e ("pdr: Introduce pldm_pdr_add_check()") left pldm_pdr_add_check() vulnerable to a memory leak. If the record ha
pdr: Hoist record handle overflow test to avoid memory leak
The rework in 572a39507d1e ("pdr: Introduce pldm_pdr_add_check()") left pldm_pdr_add_check() vulnerable to a memory leak. If the record handle counter overflowed then the early-exit reporting the fault left the memory pointed to by `record` allocated.
Hoist the overflow check over the dynamic allocation so that we don't have to clean up in the error path.
Fixes: 572a39507d1e ("pdr: Introduce pldm_pdr_add_check()") Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I72ba43d009a4e76aa585590909edf6c70d64b7af
show more ...
|
#
43a7985d |
| 17-Jul-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
requester: Fix response buffer cast in pldm_send_recv()
With the latest libpldm code version 0.4, sometimes the calling `pldmtool platform GetPDR` command while polling the sensors will be ended wit
requester: Fix response buffer cast in pldm_send_recv()
With the latest libpldm code version 0.4, sometimes the calling `pldmtool platform GetPDR` command while polling the sensors will be ended with the errors `Failed to receive RC = 3`. This error code is printed when the `pldm_send_recv()` responses PLDM_REQUESTER_NOT_RESP_MSG. In the `pldm_send_recv()`, `hdr` is `struct pldm_msg_hdr` pointer and `pldm_resp_msg` is a double pointer, type casting the double pointer to the pointer is incorrect.
Tested: 1. Call `pldmtool platform GetPDR` command while running the sensor reading. 2. No `Failed to receive RC = 3`
Fixes: 0411b712b746 ("transport: Make APIs work for all types of messages") Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I1efadc80bbd8803d0b97cb634eb8bd7df9d279b9
show more ...
|
#
8a4b5336 |
| 13-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
libpldm: Release v0.4.0
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ibe6a3adcd8f8e6977a41871671111f0bd0ea22d4
|
#
8526892f |
| 10-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
libpldm: Lift or remove asserts where a subsequent check exists
In the case where an existing public API relies on assert(), move any asserts from its underlying `*_check()` equivalent up into to th
libpldm: Lift or remove asserts where a subsequent check exists
In the case where an existing public API relies on assert(), move any asserts from its underlying `*_check()` equivalent up into to the unchecked function implementation.
Everywhere else, remove asserts where they are unnecessary as the API is capable of reporting errors.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iff8ce32b5d5e08ba1244e17d58722a556eca8694
show more ...
|
#
c83ef86d |
| 11-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: pldm_entity_get_num_children(): Don't return invalid values
Allow for future elision of the assertion.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iea112ec0e7c8a659a8819031b35a8
pdr: pldm_entity_get_num_children(): Don't return invalid values
Allow for future elision of the assertion.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iea112ec0e7c8a659a8819031b35a8869d1e21545
show more ...
|
#
0dbaa70f |
| 11-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
Avoid assigning results to out-parameters before we know we can't fail.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-
pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
Avoid assigning results to out-parameters before we know we can't fail.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I7b99d0a04471e97ae6bf13c2467dd938c57c1485
show more ...
|
#
9e33be96 |
| 11-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
0088a6ae4cec ("bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()") did the work to deprecate the function
bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
0088a6ae4cec ("bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()") did the work to deprecate the function but failed to actually mark it as such. Fix that now.
Fixes: 0088a6ae4cec ("bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()") Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I84e067a3b6ad8a39100774b25feac76703153e93
show more ...
|
#
a2c69117 |
| 06-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Stabilise pldm_pdr_add_fru_record_set_check()
pldm_pdr_add_fru_record_set_check() is a replacement for pldm_pdr_add_fru_record_set(). The latter uses assert() to sanitize its arguments, while t
pdr: Stabilise pldm_pdr_add_fru_record_set_check()
pldm_pdr_add_fru_record_set_check() is a replacement for pldm_pdr_add_fru_record_set(). The latter uses assert() to sanitize its arguments, while the former instead returns a value indicating success or failure.
Use of pldm_pdr_add_fru_record_set_check() is demonstrated in the following patch:
https://gerrit.openbmc.org/c/openbmc/pldm/+/64631
Additionally, deprecate pldm_pdr_add_fru_record_set() now that there is a stable replacement.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I706b2a8ed6c5468390b1e4a7b14fa60509dd9c37
show more ...
|
#
ca248ce3 |
| 06-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Stabilise pldm_pdr_add_check()
pldm_pdr_add_check() is a replacement for pldm_pdr_add(). The latter used assert() to sanitize its arguments while the former instead returns a value indicating s
pdr: Stabilise pldm_pdr_add_check()
pldm_pdr_add_check() is a replacement for pldm_pdr_add(). The latter used assert() to sanitize its arguments while the former instead returns a value indicating success or failure.
Use of pldm_pdr_add_check() is demonstrated in the following patch:
https://gerrit.openbmc.org/c/openbmc/pldm/+/64630
Additionally, deprecate pldm_pdr_add() now that there is a stable replacement.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3963c6f8bc869df5772e10e66e09e34b91776710
show more ...
|
#
1354a6ee |
| 06-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
pldm_entity_association_pdr_add_from_node_check() is a replacement for pldm_entity_association_pdr_add_from_node(). The latter saniti
pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
pldm_entity_association_pdr_add_from_node_check() is a replacement for pldm_entity_association_pdr_add_from_node(). The latter sanitized its arguments with assert(), while the former instead returns a value indicating success or error.
Use of pldm_entity_association_pdr_add_from_node_check() is demonstrated here:
https://gerrit.openbmc.org/c/openbmc/pldm/+/64629
Additionally, deprecate pldm_entity_association_pdr_add_from_node() now that there is a stable replacement.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: If328d4e0ad395fffc01ee79b1a24904ee1de7edf
show more ...
|
#
962fcec7 |
| 06-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
fru: Stabilise get_fru_record_by_option_check()
get_fru_record_by_option_check() is a replacement for get_fru_record_by_option(). The latter sanitized its arguments using assert() while the former i
fru: Stabilise get_fru_record_by_option_check()
get_fru_record_by_option_check() is a replacement for get_fru_record_by_option(). The latter sanitized its arguments using assert() while the former instead returns a value indicating success or failure.
Use of get_fru_record_by_option_check() is demonstrated in the following patch:
https://gerrit.openbmc.org/c/openbmc/pldm/+/64628
Additionally, deprecate get_fru_record_by_option() now that there's a stable replacement.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I80c77b12606ffe6aa5c38086fc162bbe34f2dd2f
show more ...
|
#
1264fbd9 |
| 06-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
pldm_bios_table_append_pad_checksum_check() is a replacement for pldm_bios_table_append_pad_checksum(), which used assert() to sanit
bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
pldm_bios_table_append_pad_checksum_check() is a replacement for pldm_bios_table_append_pad_checksum(), which used assert() to sanitize its arguments. pldm_bios_table_append_pad_checksum_check() instead returns an error.
Use of pldm_bios_table_append_pad_checksum_check() is demonstrated in the following patch:
https://gerrit.openbmc.org/c/openbmc/pldm/+/64626
Additionally, deprecate pldm_bios_table_append_pad_checksum() now that there's a stable replacement.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: If9fc91ac60477cfb6ba96e377dbf5768a990bd69
show more ...
|
#
cd732d14 |
| 06-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
abi: Update to remove pldm_close() from reference dumps
We transitioned this to LIBPLDM_ABI_TESTING as it wasn't exposed in the headers and there should be no users. The ABI dump updates should have
abi: Update to remove pldm_close() from reference dumps
We transitioned this to LIBPLDM_ABI_TESTING as it wasn't exposed in the headers and there should be no users. The ABI dump updates should have been included in the same change.
Fixes: 986df2a17b60 ("requester: Mark pldm_close() as LIBPLDM_ABI_TESTING") Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I55dfa20a2fcf243b2c899469c1615efcda6888d3
show more ...
|
#
178531a0 |
| 05-Jul-2023 |
Rashmica Gupta <rashmica@linux.ibm.com> |
transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
From cppcheck: ``` src/transport/socket.c:24:10: warning: Either the condition 'fp==NULL' is redundant or there is possible null p
transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
From cppcheck: ``` src/transport/socket.c:24:10: warning: Either the condition 'fp==NULL' is redundant or there is possible null pointer dereference: fp. [nullPointerRedundantCheck] fclose(fp); ^ src/transport/socket.c:23:9: note: Assuming that condition 'fp==NULL' is not redundant if (fp == NULL || fgets(line, sizeof(line), fp) == NULL) { ^ src/transport/socket.c:24:10: note: Null pointer dereference fclose(fp); ^ ```
Fixes: 04273e9f6895 ("Resize socket send buffer if needed") Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com> Change-Id: Iac053a3d3c784e3592eea027f25f005dba024850
show more ...
|
#
c821a700 |
| 02-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Introduce pldm_pdr_add_fru_record_set_check()
pldm_pdr_add_fru_record_set() relied on assert() to communicate failure to the caller. Introduce pldm_pdr_add_fru_record_set_check() which instead
pdr: Introduce pldm_pdr_add_fru_record_set_check()
pldm_pdr_add_fru_record_set() relied on assert() to communicate failure to the caller. Introduce pldm_pdr_add_fru_record_set_check() which instead returns a value indicating success or failure. pldm_pdr_add_fru_record_set() will be deprecated once pldm_pdr_add_fru_record_set_check() is stabilised.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I1e09a5663895f1e09b5e40afe5db4b4864d3496e
show more ...
|
#
572a3950 |
| 02-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Introduce pldm_pdr_add_check()
pldm_pdr_add() relied on assert() to communicate failure to the caller. Introduce pldm_pdr_add_check() which instead returns a value indicating success or failure
pdr: Introduce pldm_pdr_add_check()
pldm_pdr_add() relied on assert() to communicate failure to the caller. Introduce pldm_pdr_add_check() which instead returns a value indicating success or failure. pldm_pdr_add() will be deprecated once pldm_pdr_add_check() is stabilised.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I43542e8e7411edb32a7afa242f1ae68d6fe3ad89
show more ...
|
#
cc394529 |
| 02-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
pldm_entity_association_pdr_add_from_node_check() returns whether or not the operation was successful. pldm_entity_association_pdr_ad
pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
pldm_entity_association_pdr_add_from_node_check() returns whether or not the operation was successful. pldm_entity_association_pdr_add_from_node() is reimplemented in terms of pldm_entity_association_pdr_add_from_node_check() with the intent that it be deprecated once pldm_entity_association_pdr_add_from_node_check() is stabilised.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I186c377bfc1038195540a6cdfd65db7e1126e869
show more ...
|
#
3a5c46b4 |
| 02-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
Also identify the conditions in the doxygen commentary in the public header.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
Also identify the conditions in the doxygen commentary in the public header.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I37945ab559ffdee5648b2d9ea2befc9fc9a24a9c
show more ...
|
#
85d7a056 |
| 02-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
Also identify the condition in the doxygen commentary in the header.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-I
pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
Also identify the condition in the doxygen commentary in the header.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I706dc4364424163e51d6d2b17168f3dba280522b
show more ...
|
#
94e364db |
| 02-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
Also identify the conditions in the doxygen commentary in the header.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id
pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
Also identify the conditions in the doxygen commentary in the header.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I6a1dd656a9f888f147c4248b4793355f7ac8e7fc
show more ...
|