#
a873eca0 |
| 26-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
Allow assertions to be disabled in get_bios_string_handle() by returning PLDM_ERROR_INVALID_DATA if the next handle will will
bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
Allow assertions to be disabled in get_bios_string_handle() by returning PLDM_ERROR_INVALID_DATA if the next handle will will cause the allocator state to overflow.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Id36c2f48d9fe62cd6dc10a530d4fc5174ed349b4
show more ...
|
#
4e1ba8a7 |
| 28-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
As it stood the reimplementation of pldm_open() passed back the return value of the pldm_transport_mctp_demux_*() APIs, which don
requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
As it stood the reimplementation of pldm_open() passed back the return value of the pldm_transport_mctp_demux_*() APIs, which don't align with the specified behaviour of pldm_open()'s return values.
Rework the return values such that PLDM_REQUESTER_OPEN_FAIL is always returned on error. This fixes error handling in at least openpower-occ-control, which only tested for that value and considered all other values as success.
Further, handle any external close(2) of the returned file descriptor. This again caters to openpower-occ-control which issues close() in its response handler.
Fixes: 39f883259956 ("requester: Make pldm_open() return existing fd") Fixes: c1b66f420912 ("requester: Add new APIs to support multiple transports") Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I7144f6ecf0fdfbbc3a2a418a651207c012e0db54
show more ...
|
#
a4da6858 |
| 28-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
transport: mctp-demux: Don't test socket for non-zero value
It's valid for a file descriptor to take the value 0. It may be unusual for the socket descriptor value to be zero, but it's technically n
transport: mctp-demux: Don't test socket for non-zero value
It's valid for a file descriptor to take the value 0. It may be unusual for the socket descriptor value to be zero, but it's technically not invalid.
Fixes: c1b66f420912 ("requester: Add new APIs to support multiple transports") Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Idda55c2766121842c0afc8632469e51b8a562772
show more ...
|
#
5fb9680b |
| 28-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
requester: Expose pldm_close() in header
The function was defined in the source but not visible in the header. Make it so such that we don't have to forward-declare it in the source.
Signed-off-by:
requester: Expose pldm_close() in header
The function was defined in the source but not visible in the header. Make it so such that we don't have to forward-declare it in the source.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I1552a69a0f7a44bb69afb1b4adcb90427eeecc15
show more ...
|
#
986df2a1 |
| 28-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
pldm_close() exists in the implementation but isn't exposed in the corresponding header. As there should be no current users of it, take the oppor
requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
pldm_close() exists in the implementation but isn't exposed in the corresponding header. As there should be no current users of it, take the opportunity to remove it from the stable ABI.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I11f50a8bd39d7113bf97bc32a34d0556233afa14
show more ...
|
#
09778a82 |
| 28-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
changelog: s/Fixes/Fixed/ for the header in [Unreleased]
Make sure the header matches that in the list of categories in the changelog blurb.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-I
changelog: s/Fixes/Fixed/ for the header in [Unreleased]
Make sure the header matches that in the list of categories in the changelog blurb.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ic3b47c40c00a46a2fc3e8fd30c4da94f9dc9e90a
show more ...
|
Revision tags: v0.3.0 |
|
#
8cf70456 |
| 22-Jun-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
pdr: Rework pldm_pdr_find_container_id_range_exclude() API
The API was returning the child container id, so renamed the API as pldm_pdr_find_child_container_id_index_range_exclude(). The API returns
pdr: Rework pldm_pdr_find_container_id_range_exclude() API
The API was returning the child container id, so renamed the API as pldm_pdr_find_child_container_id_index_range_exclude(). The API returns the child container id based on the index passed as an argument.
This commit addresses the comment in https://gerrit.openbmc.org/c/openbmc/libpldm/+/63615/comment/439b3560_78f6dbbc/
Fixes: 5dc025719dc3 (“pdr: Add pldm_pdr_find_container_id_range_exclude() API”) Change-Id: I811105d9ccc64e6f5ab28133e75ff63fdcc2c6bc Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
#
ffd5342c |
| 23-Jun-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
pdr: Return success for pldm_pdr_find_child_container_id_range_exclude()
The API finds the child container id and once its found there is no necessity to loop further. The function was also returnin
pdr: Return success for pldm_pdr_find_child_container_id_range_exclude()
The API finds the child container id and once its found there is no necessity to loop further. The function was also returning -ENOKEY even if a child node meeting the criteria is found. Hence, we are returning from the loop once the container id is found.
This commit addresses the comment in https://gerrit.openbmc.org/c/openbmc/libpldm/+/63615/29..31/src/pdr.c#b426
Fixes: 5dc025719dc3 (“pdr: Add pldm_pdr_find_container_id_range_exclude() API”) Change-Id: Ib96de317abcffb043e98094b3b7b4552ec63b9bc Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
#
6409c8a0 |
| 13-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_table: Remove deprecated APIs sanitized by assert()
pldmd has now been reworked to remove its use of the unchecked APIs[1].
[1]: https://gerrit.openbmc.org/c/openbmc/pldm/+/64181
Signed-off-b
bios_table: Remove deprecated APIs sanitized by assert()
pldmd has now been reworked to remove its use of the unchecked APIs[1].
[1]: https://gerrit.openbmc.org/c/openbmc/pldm/+/64181
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I04101c4e5f3408e27130dc7aa960f013eba3e0a3
show more ...
|
#
291da195 |
| 22-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
libpldm: Bump to v0.3.0
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Idc30de5bbb87cd1cee6c652acaca6cd5c9a5b1b0
|
#
5dc02571 |
| 19-May-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
pdr: Add pldm_pdr_find_container_id_range_exclude() API
This API is necessary to find the container id of contained entity which is not within the record handle ranges of the remote endpoint PDRs.Th
pdr: Add pldm_pdr_find_container_id_range_exclude() API
This API is necessary to find the container id of contained entity which is not within the record handle ranges of the remote endpoint PDRs.The remote endpoint has their own set of PDRs and have record handle ranges defined.
Change-Id: If28325869d4c5c797c33bc4efd41bee16777a7aa Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
25ddbccf |
| 19-May-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
This API adds the entity association PDR record from node to the repo with record handle given as the input parameter by the c
pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
This API adds the entity association PDR record from node to the repo with record handle given as the input parameter by the caller API. Earlier the records where added in a sequential way alone, with this change the entity association PDR records gets the new record handle based on the input value.
Change-Id: Ib29ecf1ef493cbb45938502a670c68e2e0bbd6bb Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
#
d47e8ab8 |
| 12-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_table: Deprecate APIs with arguments sanitized using assert()
C provides enough foot-guns without us encoding them into library APIs. Specifically, deprecate the following in favour of their *_
bios_table: Deprecate APIs with arguments sanitized using assert()
C provides enough foot-guns without us encoding them into library APIs. Specifically, deprecate the following in favour of their *_check() variants which ensure assertions won't fail or otherwise invoke UB:
* pldm_bios_table_string_entry_encode() * pldm_bios_table_string_entry_decode_string() * pldm_bios_table_attr_entry_enum_encode() * pldm_bios_table_attr_entry_enum_decode_pv_num() * pldm_bios_table_attr_entry_enum_decode_def_num() * pldm_bios_table_attr_entry_enum_decode_pv_hdls() * pldm_bios_table_attr_entry_string_encode() * pldm_bios_table_attr_entry_string_decode_def_string_length()
Change-Id: I752c27210d04209a4677ed5de26a10bbcaa0ec24 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
0c9f5a8a |
| 14-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
Allow the number of handles decoded by pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() to be fewer than the number of
bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
Allow the number of handles decoded by pldm_bios_table_attr_entry_enum_decode_pv_hdls_check() to be fewer than the number of handles reported by pldm_bios_table_attr_entry_enum_decode_pv_num_check(). The relaxation provides equivalent behaviour to pldm_bios_table_attr_entry_enum_decode_pv_hdls() but provides assert() safety by instead returning an error.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I1d51174450cbe97c9985a1361e235d90efc19b35
show more ...
|
#
98c1e69d |
| 14-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
Allow the string decoded by pldm_bios_table_string_entry_decode_string_check() to be truncated, as per the unchecked pldm_bios_ta
bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
Allow the string decoded by pldm_bios_table_string_entry_decode_string_check() to be truncated, as per the unchecked pldm_bios_table_string_entry_decode_string(). With this change pldm_bios_table_string_entry_decode_string_check() provides assert() safety but is otherwise equivalent.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ia872f1496c642efbb34ee3ae29455f4eaf574082
show more ...
|
#
df02e360 |
| 14-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
The relationship of info->def_length to strlen(info->def_string) should only be tested if info->def_string is not NULL.
Signed-
bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
The relationship of info->def_length to strlen(info->def_string) should only be tested if info->def_string is not NULL.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I125a8d5da8b8f23401604c2ab32c2ed17956b74c
show more ...
|
#
a3035938 |
| 16-Jun-2023 |
Rashmica Gupta <rashmica@linux.ibm.com> |
requester: Add check before accessing hdr in pldm_recv()
Fixes "pldmSoftPowerOff.service: Main process exited, code=dumped, status=11/SEGV".
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com> C
requester: Add check before accessing hdr in pldm_recv()
Fixes "pldmSoftPowerOff.service: Main process exited, code=dumped, status=11/SEGV".
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com> Change-Id: I198b1bac8c4c849cb1b8756f070fd5aa62c24f24
show more ...
|
#
4b4603b3 |
| 13-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
changelog: Consistent ordering of sections
The order sections under [Unreleased] was not consistent with the ordering of the list of sections in the preamble. Fix the ordering for sanity's sake.
Si
changelog: Consistent ordering of sections
The order sections under [Unreleased] was not consistent with the ordering of the list of sections in the preamble. Fix the ordering for sanity's sake.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ibdc243f8767db9c2a22ec68292523fdd5f656df4
show more ...
|
#
4d694346 |
| 19-May-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
pdr: Add pldm_pdr_find_last_in_range()
Adds a new libpldm API to find the last PDR record from the PDR repo based on the range of record handle values given as input. This API is used when a record
pdr: Add pldm_pdr_find_last_in_range()
Adds a new libpldm API to find the last PDR record from the PDR repo based on the range of record handle values given as input. This API is used when a record needs to be added in a particular range of record handles to the repo that contains all PDRs (inclusive of BMC and remote endpoints).
Change-Id: Ica5187053361b27810577a4985fab4b994d35961 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
9947f9d6 |
| 18-May-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
pdr: Add APIs for creating and locating remote PDRs
In the current state, the tree_find() and tree_add() utilities work by replacing the existing container ID that comes from the remote endpoints. B
pdr: Add APIs for creating and locating remote PDRs
In the current state, the tree_find() and tree_add() utilities work by replacing the existing container ID that comes from the remote endpoints. But we need the remote container ID when we do the PDR normalization (merging) in BMC.
Two boolean properties are introduced:
* is_remote: used to indicate if the entity is BMC owned or of remote endpoint owned.
* is_update_container_id: used to indicate if the container id of the entity needs to be updated or not.
We handle 3 different combinations,
1. Both are false - when it is the parent node in the tree example: - https://github.com/ibm-openbmc/pldm/blob/1050/ libpldmresponder/pdr_state_sensor.hpp#L136
2. is_remote is false and update_container_id is true - when it is a BMC entity but we have a container id change needed. example: - https://github.com/ibm-openbmc/pldm/blob/1050/ libpldmresponder/fru.cpp#L130
3. is_remote is true and update_container_id is false - In IBM PLDM stack talks to two different remote firmware implementations over PLDM, and we had a conflicting requirement to not merge the container ID from one endpoint but merge the container ID from another endpoint. Example: -https://github.com/ibm-openbmc/ pldm/blob/1050/host-bmc/host_pdr_handler.cpp#L509
Change-Id: I8541b76aa46ba23172ffbc4d72e686909b7147fc Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
Revision tags: v0.2.0 |
|
#
39bd2ea5 |
| 02-Feb-2023 |
ArchanaKakani <archana.kakani@ibm.com> |
pdr: Introduce remote_container_id and associated APIs
We have a concept of a Primary PDR repository and merging the PDRs from a remote PLDM endpoint (DSP0248 section 7: PDRs support functions).
Th
pdr: Introduce remote_container_id and associated APIs
We have a concept of a Primary PDR repository and merging the PDRs from a remote PLDM endpoint (DSP0248 section 7: PDRs support functions).
The main functions of the PLDM discovery Agent (DSP0248 section 14) (assuming a PLDM terminus like BMC) is maintaining a primary PDR repository, adding/deleting/updating the PDRs to form a complete system model. And to do so this API (pldm_entity_node_get_remote_container_id) will help us update the container id field of the PDR obtained by the remote PLDM terminus.
Change-Id: I249e627a1e05ee6d9644f3f93f326e47256d914a Signed-off-by: Archana Kakani <archana.kakani@ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
8de8e1ec |
| 09-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
meson: Reduce strength of oem-ibm requirements from enabled to allowed
If it's not expressly disabled, do what's necessary to build the oem-ibm pieces of the code-base. Capture the newly-enabled API
meson: Reduce strength of oem-ibm requirements from enabled to allowed
If it's not expressly disabled, do what's necessary to build the oem-ibm pieces of the code-base. Capture the newly-enabled APIs in the ABI dumps.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I50168309432620e03f00a4620b6bfc38f2e575c8
show more ...
|
#
83841fb5 |
| 07-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
README: Add a section on working with libpldm
9d2a1c6ad095 ("libpldm: Explicit deprecated, stable and testing ABI classes") gave us the ability to merge new APIs without having to review them to dea
README: Add a section on working with libpldm
9d2a1c6ad095 ("libpldm: Explicit deprecated, stable and testing ABI classes") gave us the ability to merge new APIs without having to review them to death before merging. Now we can merge and iterate on an API before locking into the library's ABI.
Given this, document how people should consume the library, and expectations on developers contributing to the library.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ida0c691e48f3885d12039755994cf5dfeefa5206
show more ...
|
#
8085efe0 |
| 05-Jun-2023 |
Andrew Jeffery <andrew@aj.id.au> |
changelog: Note the removal of requester-api meson option
This should be noted for anyone who might be using it, though it appears no-one was (hence its removal).
Signed-off-by: Andrew Jeffery <and
changelog: Note the removal of requester-api meson option
This should be noted for anyone who might be using it, though it appears no-one was (hence its removal).
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iadd30e6f0471c8d7991aac24761413c01020c39a
show more ...
|
#
b01fb1cc |
| 27-May-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
transport: Match on response in pldm_transport_send_recv_msg()
pldm_send_recv() does not verify the corrected match of a PLDM response message with the request message by comparing the Instance ID a
transport: Match on response in pldm_transport_send_recv_msg()
pldm_send_recv() does not verify the corrected match of a PLDM response message with the request message by comparing the Instance ID as pldm_recv(). This will cause the PLDM command of the pldmtool receives the response message of the other PLDM command from other services. The pldm_transport_send_recv_msg() which is called by pldm_send_recv() method should check the Instance ID of the response to verify the match.
Tested:
1. Run pldmtool while pldmd service continuously polls multiple pldm sensors. 2. The pldmtool should not be failed with PLDM_ERROR_INVALID_LENGTH error.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I491db086cf2a0dff1981f2959d1dab936d46d2db
show more ...
|