| commit | f5843b6c76984eac8f63fa8e47b45c4f561ff87f | [log] [tgz] |
|---|---|---|
| author | gBMC Team <gbmc-core@google.com> | Wed Oct 22 14:57:14 2025 -0700 |
| committer | Copybara-Service <copybara-worker@google.com> | Wed Oct 22 14:57:51 2025 -0700 |
| tree | ad25a6414a6e1746b9512a6351b11a67b2897145 | |
| parent | 9b1f205c109edda6f447e20837b4ba721969fc5a [diff] |
fram_utils: Improve parsing to handle truncated HSM FRAM log reads
The Cavium HSM FRU parser can fail or produce incorrect data if the
FRAM log read is truncated (i.e., ends mid-line without a newline).
If a truncated line contains partial key information like
"Board Information:EB", this could overwrite a complete value like
"Board Information:EBB6100..." read from an earlier line.
This change updates ParseFramData to prevent partial data from
overwriting complete data. Since a line not terminated by a newline is likely incomplete, it is safer and simpler to discard it entirely rather than attempting to parse potentially partial data. This commit refactors `ParseFramData` to
ignore the final line segment if the input data does not end with a
newline character.This resolves issues where incorrect data was parsed due to
truncation.
In `fru_scanner_fram_test.cc`:
* Updated tests with new coverage
* Updated test suite comments to explain test behavior
In `fru_scanner_fram_test.cc`:
* `SuccessfulPartialRead` previously read 160 bytes, which ended in a
truncated line. Because this line is now ignored, downstream
validation failed. The test is updated to read 166 bytes, ensuring
the partial data ends in a newline, allowing validation to succeed.
Tested: Unit test pass
PiperOrigin-RevId: 822751274
Change-Id: Id79a339e87dc152929c939414ba194b02dac0817
This project is Google's version of BMCWeb.
See Readme Google for Google added features. The following is the original README of OpenBMC/BMCWeb.
==============================================================================
This component attempts to be a “do everything” embedded webserver for OpenBMC.
The webserver implements a few distinct interfaces:
bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL.
Bmcweb supports multiple authentication protocols:
Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.
All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.
*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.
bmcweb is configured per the meson build files. Available options are documented in meson_options.txt
meson builddir ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects.
bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data namespace.
When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.
bmcweb is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.