- Jul 26, 2023
-
-
Manojkiran Eda authored
Here is the change log: ``` * SECURITY ISSUE - Fixed a bug where Cipher.update_into accepted Python buffer protocol objects, but allowed immutable buffers [CVE-2023-23931] * Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.0.8. ``` Change-Id: I3a5f88506c6bc560c66c6b0bb8005bc2d133f3ea Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Jul 25, 2023
-
-
Jeremy Kerr authored
Currently, the ReleaseDateTime data is expected to be in a "%d/%m/%Y %H:%M:%S" format. However, this is ambiguous (ie., is locale-specific). This change adds supoort to allow an ISO 8601 format of: "%Y-%m-%dT%H:%M:%S" and a relaxed version with the 'T' separator replaced with a space: "%Y-%m-%d %H:%M:%S" Update the readme and example json to switch to the preferred format. Signed-off-by:
Jeremy Kerr <jk@codeconstruct.com.au> Change-Id: Ica3ae824979df6b666b8abb619ceaedffd90b374
-
Jeremy Kerr authored
Currently, all of the datetime parse is wrapped in a `catch KeyError` block. However, the only part of this that would raise a KeyError is where we extract the PackageReleaseDateTime from the metadata dict. Instead, just do the key lookup separately, and parse outside of the catch block. Then, since we're handling a default anyway, just use .get() and then we don't need to catch the KeyError. Signed-off-by:
Jeremy Kerr <jk@codeconstruct.com.au> Change-Id: Iae6b92383af4fe49770e77005fcb575faa125703
-
- Jul 24, 2023
-
-
Andrew Jeffery authored
pldm_entity_assocation_pdr_add() is deprecated in libpldm as it used assert() for handling error cases. pldm_entity_association_pdr_add_check() instead returns a value indicating success or failure. We throw a std::runtime_error for now which at least unwinds the stack, unlike assert(). With this approach the problem is reduced to needing to refactor internal pldmd APIs, rather than despairing at libpldm aborting the process out of existence. Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: I08ebafc94cd7a392ec8f18b6c5feb75ba72cd028
-
- Jul 21, 2023
-
-
vkaverap@in.ibm.com authored
To give more clarity, this commit adds an elaborate comment in meson_options explaining why 5 seconds DBUS timeout value was chosen for PLDM. Change-Id: Icbfcb2c0521810ad1d31835ff8ccda67abd0e858 Signed-off-by:
vkaverap@in.ibm.com <vkaverap@in.ibm.com>
-
Pavithra Barithaya authored
This commit adds a new option "-n" to getPDR in the pldmtool using which we can retrieve the PDRs based on the terminus ID. Tested: ./pldmtool platform getpdr -h get platform descriptor records Usage: ./pldmtool platform GetPDR [OPTIONS] Options: -h,--help Print this help message and exit -m,--mctp_eid UINT MCTP endpoint ID -v,--verbose [Option Group: Required Option] Retrieve individual PDR, all PDRs, PDRs of a requested type or retrieve all PDRs of the requested terminusID [Exactly 1 of the following options is required] Options: -d,--data UINT retrieve individual PDRs from a PDR Repository eg: The recordHandle value for the PDR to be retrieved and 0 means get first PDR in the repository. -t,--type TEXT retrieve all PDRs of the requested type supported types: [terminusLocator, stateSensor, numericEffecter, stateEffecter, EntityAssociation, fruRecord, ... ] -i,--terminusID UINT retrieve all PDRs of the requested terminusID supported IDs: [1, 2, 208...] -a,--all retrieve all PDRs from a PDR repository Example 1: ./pldmtool platform getpdr -i 0 [] Example 2: ./pldmtool platform getpdr -i 2 Copied the output here: https://gist.github.com/Pavithrab7/4218104bc7e58951ff91fe5b49e562b0 Change-Id: I8b78818abbbbb3678e180d2bd1f38017454fd0d3 Signed-off-by:
Pavithra Barithaya <pavithra.b@ibm.com>
-
Kamalkumar Patel authored
- Previously user had to do this configuration of selecting load source, alternate load source and DASD load source manually, and this was tedious task. These are network adapters connected to PCI slots whose part location information is available in redfish. - Adding bios attribute to handle selection of PCI slot location codes for these network adapters to be selected from the GUI webpage, GUI would then populate these BIOS attributes through redfish and this selection will be communicated to Host via these PLDM BIOS attributes. Change-Id: I7fa7cefe3323f4b21fb0335d0292ee136424fbe9 Signed-off-by:
Kamalkumar Patel <kamalkumar.patel@ibm.com>
-
- Jul 20, 2023
-
-
Patrick Williams authored
There is a lot of cruft left in the .gitignore from when this repository was built using autotools and when it included libpldm, so simplify it. Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: Ice4f5fea1d0e19bea71643a56df06df547763642
-
Patrick Williams authored
Since enabling C++23, we can eliminate the need for `function2` and instead leverage `std::move_only_function`. Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: Iafc70c918e38b429e586bf18f71a716bdede43f8
-
Manojkiran Eda authored
The meson_options.txt looks to be very cumbersome and is difficult to read & maintain due to in-consistent white spacing, and the lines are longer than 80 characters. This commit would fix those by migrating the syntax to new lines for each option key, also warps the comments and the description to 80 characters & uses multilines for descriptions that are larger than 80 characters.Doing this should make this file more maintainable in future. Change-Id: Ic8421cc21b8809c659be8e63b02b6877542a47fd Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Jul 19, 2023
-
-
Andrew Jeffery authored
pldm_bios_table_attr_value_entry_encode_integer() is deprecated in libpldm as it uses assert() to sanitize its parameters. Use pldm_bios_table_attr_value_entry_encode_integer_check() instead, which returns a value indicating success or failure. Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: Ic308d24a83fe3371a7ef074cb1d20092a06a1291
-
Pavithra Barithaya authored
The error clang-diagnostic-overloaded-virtual is generated when a function hides the overloaded virtual function. Change-Id: I87fdabb4ea9efd0c69d1b030127a6a9782cd3b23 Signed-off-by:
Pavithra Barithaya <pavithra.b@ibm.com>
-
Pavithra Barithaya authored
This error is generated when expression with side effects is evaluated despite being used as an operand to 'typeid'. Change-Id: I72daa47f1c5b05b466e1635fe6d547db4b1da34b Signed-off-by:
Pavithra Barithaya <pavithra.b@ibm.com>
-
Pavithra Barithaya authored
This clang-error is generated when there is a constant unused variable. Change-Id: I4c101d3d58d468b728768fd63c1fd842e8c09ac4 Signed-off-by:
Pavithra Barithaya <pavithra.b@ibm.com>
-
Pavithra Barithaya authored
This clang-error is generated when a function overrides a member function but is not marked 'override'. Change-Id: I664941c2dff5be93dec1571cc974fae2168925f2 Signed-off-by:
Pavithra Barithaya <pavithra.b@ibm.com>
-
Pavithra Barithaya authored
The clang-diagnostic-defaulted-function-deleted error is generated when explicitly defaulted move assignment operator is implicitly deleted. This commit fixes those errors. Change-Id: I7a407dd3411b19a73a13b1c1e4805b89fc2ec51a Signed-off-by:
Pavithra Barithaya <pavithra.b@ibm.com>
-
- Jul 12, 2023
-
-
Patrick Williams authored
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it. Change-Id: I04732a67ef18c711ca80e53f0bf4828218f2b682 Signed-off-by:
Patrick Williams <patrick@stwcx.xyz>
-
- Jul 11, 2023
-
-
Andrew Jeffery authored
pldm_pdr_add_fru_record_set() is deprecated in libpldm as it used assert() to communicate failure to the caller. pldm_pdr_add_fru_record_set_check() instead returns a value indicating success or failure. Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: I88ed90a03b15a949641788906495c9507a5a196b
-
Andrew Jeffery authored
pldm_pdr_add() is deprecated in libpldm as it uses assert() to communicate to the caller that an error occurred. pldm_pdr_add_check() instead returns a value that indicates success or failure. Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: Icca92fd742f07fb935202a9d9e62f5648916b12b
-
Andrew Jeffery authored
pldm_entity_association_pdr_add_from_node() is deprecated in libpldm as it relied on assert() to communicate failures from the implementation. pldm_entity_association_pdr_add_from_node_check() instead returns a value indicating success or failure. Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: If5ef1f372f0e835e8d97affcaab7a9abc2625d97
-
Andrew Jeffery authored
get_fru_record_by_option() is deprecated in libpldm as it relied on assert() to communicate failures from the implementation. get_fru_record_by_option_check() instead returns a value indicating whether or not it succeeded. Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: I621bdcc713e37bb12ac40825edb399b151123427
-
Andrew Jeffery authored
As with handling pldm_pdr_init() failures, throw a std::runtime_error() for pldm_entity_association_tree_init() failures. Throwing is an improvement thanks to unwinding, by comparison to the immediate termination invoked by assert(). Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: I3d5d6bed5afa76503f16ec9d1842cf4fd09e9ae7
-
Andrew Jeffery authored
Migrate to pldm_bios_table_append_pad_checksum_check() which does not sanitize its behaviour with assert(). Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: Ide288bb40e5acabd2bf85870849bf176ddcbc621
-
Varsha Kaverappa authored
This commit is to support a new VPD record called PSPD that contains few keywords called #D and VM. Since these keywords are typically larger in size (4K bytes) than what is managed by PLDM, we are adding a file into which these keywords will be extracted. This keyword file is transferred to the HB PLDM layer with a readFileByType request from HB. This also includes transfer of PSPD record data via PLDM with offset included. Tested by using pldmtool to send read request command to PLDM Change-Id: Iba814a802cbbd2c2d641ee5a4c81919c3b8bdf20 Signed-off-by:
Varsha Kaverappa <vkaverap@in.ibm.com>
-
- Jul 06, 2023
-
-
Andrew Jeffery authored
Historically, libpldm's pldm_pdr_init() has internall used assert() to enforce that the returned value is not NULL. Efforts are underway to remove this reliance on assert() in libpldm to ensure consumers aren't ungracefully terminated. This change chooses to return an appropriate error to the caller of pldmd's internal APIs where possible. However, in a number of circumstances there was either not a sensible value that could be returned, or it was not possible to return a value without further refactoring. In these circumstances we choose to throw `std::runtime_error`, which will at least do what it can to unwind. While it may feel like it falls short of proper error handling, the reality is the calling code is already structured such that it pretends allocation failures never occur. The switch to throwing a runtime error makes a strict improvement over the immediate termination implemented by assert(). Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: Ibb6bc3abf62e32f05ac079453853873298db6c4f
-
Andrew Jeffery authored
It's possible that the heap allocation invoked by pldm_bios_table_iter_create() fails. The existing behaviour is to assert() in the implementation that it hadn't failed, but that will be changed to instead have the API return NULL. Check for the NULL condition with the understanding that it may occur in the future, and if observed, throw an exception to uphold the existing assumptions in the code. Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: I20016e8db4c814017306cc68a536a9c232c74e0e
-
Andrew Jeffery authored
libpldm has deprecated the affected APIs. Prefer using their `*_check()` variants as these return an error code rather than prevent misbehaviour with assert(). 1. pldm_bios_table_attr_entry_integer_encode() 2. pldm_bios_table_attr_value_entry_encode_enum() 3. pldm_bios_table_attr_value_entry_encode_string() 4. pldm_bios_table_attr_value_entry_encode_integer() Tested: Successfully booted a p10bmc host, dumped each of the BIOS tables with pldmtool without issue Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: I823b24884e518f8c53fd153b3bc30569595ecd86
-
- Jul 04, 2023
-
-
Delphine CC Chiu authored
Change the interface xyz.openbmc_project.MCTP.Control to xyz.openbmc_project.MCTP to fit the interface exposed by mctpd.service. Also fixed the incorrect data type from size_t to mctp_eid_t. Change-Id: Ic0267cef743615c1c0b253638d6c3fd390dae9ee Signed-off-by:
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
-
- Jun 23, 2023
-
-
Andrew Jeffery authored
Use of `dd(1)` results in back-to-back `read(2)` and `write(2)` syscalls; the performance of `dd(1)` is O(n) with respect to the file size. Poor choice of the `bs=` parameter to `dd(1)` can significantly amplify the amount of syscalls required to achieve the task. By contrast, `truncate(1)` generally invokes a single syscall, either `truncate(2)` or `ftruncate(2)`. As a consequence, `truncate(1)` is O(1) with respect to file size. Switch to `truncate(1)` to improve runtime efficiency of the scripts. Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: I69dd925f36e733fc2a1ee71cb8354ee04ee8871b
-
- Jun 22, 2023
-
-
Andrew Jeffery authored
The pldm_bios_table_*_check() APIs wrap around unchecked equivalents that only sanitize their parameters using assert(). The checks included in the pldm_bios_table_*_check() APIs test the same conditions that would trigger the assert()s in the unchecked APIs but instead return an error code on failure. Use of the unchecked APIs has the potential to blow up the pldmd process, but also requires that libpldm continue to be built with `-UNDEBUG` to avoid undefined behaviour (by aborting the process). This impacts the performance of the library in addition to be a bit of a UX disaster. The unchecked APIs are deprecated in libpldm as a step improve its safety and code generation: https://gerrit.openbmc.org/c/openbmc/libpldm/+/64179 Tested: Booted the host on a p10bmc system with the patch applied. Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: I9677a7fa5ca59d04865963b367f3bb55c8676cfb
-
- Jun 16, 2023
-
-
Andrew Jeffery authored
This removes any ambiguity about which config.h is being included. Subprojects such as libpldm and phosphor-logging also generate config.h files, and these are exposed in the include path. Signed-off-by:
Andrew Jeffery <andrew@aj.id.au> Change-Id: I3e0ccd6339f088380ffa29d41167b07aefc7dd16
-
- Jun 15, 2023
-
-
vkaverap@in.ibm.com authored
Dbus timeout value for every dbus call in PLDM is set to 5 seconds instead of default 25 seconds so that all dbus calls that expect a reply exists after 5 seconds if there is no response from the client. While BMC is still waiting for a response on any dbus calls it is possible that host can timeout and return an error. Another reason is that memory address from where BMC would read data sent by host may get deallocated after 20 seconds and it is possible for this to happen even before BMC has read the data. This has lead to DMA issues. Tested by adding a sleep for 10 seconds inside main function of phospher-host-postd and executed get dbus property on snoopd interface from pldm. PLDM dbus call timed out after 5 seconds. Change-Id: I1aa1b4ad7fceff2224a3ccc3bcf6abd5705963bc Signed-off-by:
Varsha Kaverappa <vkaverap@in.ibm.com>
-
- Jun 13, 2023
-
-
Manojkiran Eda authored
Traditional IBM systems since 1988 used to ship with A_Mode as the default partition mode for iBMi. Changing the default value from D_Mode to A_Mode to match the behaviour of our systems and align them with the earlier behaviour. Change-Id: I4fed505de3cf5628e5ad668870b6fd1ac00dc588 Signed-off-by:
Manojkiran Eda <manojkiran.eda@gmail.com>
-
- Jun 12, 2023
-
-
Asmitha Karunanithi authored
The existing code will allow ::<ipv4_address> without any error. However, if the address is expanded like the below, there will be "length out of range" error: 0000:0000:0000:0000:0000:ffff:xxx.xxx.xxx.xxx This commit changes the maximum string length of IPv6 address from 39 to 45, to support IPv4-mapped IPv6 address. Change-Id: I8c6e90e5a0ddbf38e7826e5918408b5d29811bfd Signed-off-by:
Asmitha Karunanithi <asmitk01@in.ibm.com>
-
- Jun 09, 2023
-
-
Jayashankar Padath authored
This commit adds new UTIL record keywords RT, F5 and F6 under the motherboard. F5 and F6 keywords are used to fill up the desired host splash screen name displayed at the host console. The RT keyword is used to hold the record name. Tested: Verified that the name filled up through the F5 and F6 keywords are displayed at the host splash screen Change-Id: I26f1c03db3e9f6a5b8cdc435d9e80d7c92563e16 Signed-off-by:
Jayashankar Padath <jayashankar.padath@in.ibm.com>
-
- Jun 02, 2023
-
-
Dung Cao authored
With pldm commands like getPDR, pldmtool opens new socket for each PDR. In case we have hundred number of PDRs, pldmtool open hundred number of socket connection to server. It causes mctp-demux (role as server) reach limit number of clients can handle. So pldmtool should close socket connection to server after completely using it. Signed-off-by:
Dung Cao <dung@os.amperecomputing.com> Change-Id: I66fb00cd2d51f131c8901a8964552bcb2fc1de13
-
- May 30, 2023
-
-
Andrew Geissler authored
The host firmware (at least for IBM) never implemented this boot progress when starting the OS. Instead, another host firmware team is utilizing it to indicate an earlier part of the boot. Therefore this boot progress code should not be treated as if the host is running. Signed-off-by:
Andrew Geissler <geissonator@yahoo.com> Change-Id: I453ec41af804db880a99b62105b510464b147efa
-
Thu Nguyen authored
In the pldmtool raw command, instanceId is inputted in raw data. It does not use the retrievedi one from the instanceId database by exec() in pldm_cmd_helper. This causes the failure when the response handler frees this provided instanceId because that instanceID is not in libpldm database. To fix that, the inputted instanceId will be ignored and the retrieved instanceId from libpldm will be used. Tested: 1. No "Invalid instance ID" in the journal log when running "pldmtool raw" commands. Signed-off-by:
Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I310f699e2d87ba2fa16b69350fdd7fa69d9598f9
-
ThuBaNguyen authored
The CI for new patch set report errors in softoff code. ''' ../softoff/softoff.cpp: In member function 'int pldm::SoftPowerOff::getSensorInfo()': ../softoff/softoff.cpp:263:14: error: 'pdr' may be used uninitialized [-Werror=maybe-uninitialized] 263 | auto possibleStatesStart = pdr->possible_states; | ^~~~~~~~~~~~~~~~~~~ ../softoff/softoff.cpp:249:32: note: 'pdr' was declared here 249 | pldm_state_sensor_pdr* pdr; cc1plus: all warnings being treated as errors ''' Update code to fix that. Signed-off-by:
ThuBaNguyen <thu@os.amperecomputing.com> Change-Id: Ib9df9f79978941ebad62164866cc688412a08922
-
Rashmica Gupta authored
and remove unnecessary `struct` from class variable; Change-Id: Id7e76bd8f6123cc47d27cfc232a2a9186f2cad06 Signed-off-by:
Rashmica Gupta <rashmica@linux.ibm.com>
-