#
50b966f7 |
| 11-Mar-2025 |
Ed Tanous <ed@tanous.net> |
Implement common logging function
When used as a library, it's desirable to be able to suppress logging, or pipe logging through a different path. This commit changes behavior such that logging is
Implement common logging function
When used as a library, it's desirable to be able to suppress logging, or pipe logging through a different path. This commit changes behavior such that logging is disabled by default, and introduces 2 new methods, cper_set_log_stdio and cper_set_log_custom.
These allow library integrators to specify their logging mode. In practice, this also allows fuzzing to run faster by not printing errors to the log.
Change-Id: I941476627bc9b8261ba5f6c0b2b2338fdf931dd2 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
5e2164a0 |
| 09-Mar-2025 |
Ed Tanous <ed@tanous.net> |
More range checks
This is a second patch adding more range checks where appropriate.
Change-Id: Ie169efe8924153c9cc11e4472a1b07b8d04efb3b Signed-off-by: Ed Tanous <ed@tanous.net>
|
#
12dbd4fd |
| 08-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Fix range check bugs
This is a patch hunting for fuzzing failures and adding appropriate range checks.
Change-Id: Ieae02b7e461b9a6c5e25de6c663a768f7a0d5e10 Signed-off-by: Ed Tanous <etanous@nvidia
Fix range check bugs
This is a patch hunting for fuzzing failures and adding appropriate range checks.
Change-Id: Ieae02b7e461b9a6c5e25de6c663a768f7a0d5e10 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
5aedbb26 |
| 05-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Make all section reads const
The way sections are read currently is unsafe in two ways, first, buffers are completely unchecked for length, and section, buffers are passed in as non-const void*.
St
Make all section reads const
The way sections are read currently is unsafe in two ways, first, buffers are completely unchecked for length, and section, buffers are passed in as non-const void*.
Start fixing things by making the sections const.
Change-Id: I02e9ded525e9710b56589a47a9cc4f3583c216df Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
ae8f6d9a |
| 29-Jan-2025 |
Aushim Nagarkatti <anagarkatti@nvidia.com> |
Remove validation bits
Discard invalid properties from json decode. JSON output should only contain valid properties. This saves time in preventing post processing of output for valid fields.
Ensur
Remove validation bits
Discard invalid properties from json decode. JSON output should only contain valid properties. This saves time in preventing post processing of output for valid fields.
Ensure round trip validity with validation bits removed and required properties populated.
Fix bugs in json decode.
Overhaul unit tests to use valijson. Add tests with static examples to validate against schema. Use and nlohmann for better schema validation over intrinsic libcper validation.
Example json output before: { "ValidationBits": { "LevelValid": false, "CorrectedValid": true }, "Level": 1, "Corrected": true }
After: { "Corrected": true }
Change-Id: I188bdc2827a57d938c22a431238fadfcdc939ab8 Signed-off-by: Aushim Nagarkatti <anagarkatti@nvidia.com>
show more ...
|
#
17bc66a0 |
| 25-Nov-2024 |
Aushim Nagarkatti <anagarkatti@nvidia.com> |
Add affinity3 field to json output
Affinity3 in arm processor errors is used to determine the socket number generating the error. This is critical information that needs to be presented to the end-u
Add affinity3 field to json output
Affinity3 in arm processor errors is used to determine the socket number generating the error. This is critical information that needs to be presented to the end-user
Change-Id: I66c7d29407bb610625087b0f46e18ff868f7da64 Signed-off-by: Aushim Nagarkatti <anagarkatti@nvidia.com>
show more ...
|
#
e42fb487 |
| 15-Oct-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
Change include style to use system includes
The libcper header files in `libcper` are installed to `usr/include/libcper`. Use that system includes in `libcper` source instead of using the project in
Change include style to use system includes
The libcper header files in `libcper` are installed to `usr/include/libcper`. Use that system includes in `libcper` source instead of using the project includes.
Change-Id: I596edc2c754dae4829844f535a1e34caa246fb43 Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
show more ...
|
#
a3b7f8a2 |
| 04-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Unflatten edk includes
Installing the edk headers into a folder requires us to do odd things with imports, and either include headers with "..", or otherwise get the include directories lined up.
M
Unflatten edk includes
Installing the edk headers into a folder requires us to do odd things with imports, and either include headers with "..", or otherwise get the include directories lined up.
Move the contents of edk/*.c/h up a level, and just simplify the include structure. This is done to fix the immediate change of the prior patch and make this build again. Happy to discuss other options.
Change-Id: I328f20bca6d23100993493445bee0e5e11d2866a Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
5b793009 |
| 26-Sep-2024 |
Aushim Nagarkatti <anagarkatti@nvidia.com> |
Fix ArmProcessor ErrorInformation types
ErrorInformation currently has 2 supported formats according to the libcper schema, cacheError and tlbError. Remove "unknown" microarch types as we need corre
Fix ArmProcessor ErrorInformation types
ErrorInformation currently has 2 supported formats according to the libcper schema, cacheError and tlbError. Remove "unknown" microarch types as we need correctly formatted output only. Add a property name to identify which ErrorInformation type has been detected in the cper record
Tested: Used cper-convert to-json to convert a known good cper to json Used cper-convert to-cper to convert same json to cper json was generated again and validated against schema
Change-Id: I510f2ae7fef195721b618065c6ef643ab1191b76 Signed-off-by: Aushim Nagarkatti <anagarkatti@nvidia.com>
show more ...
|
#
a7d2cddd |
| 15-Jul-2024 |
Ed Tanous <etanous@nvidia.com> |
Move to embedded base64
Base64 encode/decode is a relatively simple algorithm, and currently libcper takes a dependency on libb64 for this. libb64 does not have methods for determining the encoded
Move to embedded base64
Base64 encode/decode is a relatively simple algorithm, and currently libcper takes a dependency on libb64 for this. libb64 does not have methods for determining the encoded size or decoded size, and rely on the user to provide the right buffer sizes, which libcper currently approximates as 2X the input size (which is incorrect).
This commit removes the libb64 dependency entirely, and inlines a libcper specific base64 encoder and decoder, using EDK2-allowed types.
The implementation itself is unique to libcper and makes the following design decisions. 1. Malloc is performed within the base64_<> functions. This reduces the number of malloc calls total, and removes the need for separately determining the output size. 2. Arguments are passed in by EDK2-types under the assumption that this will keep compatibility with EDK2 implementations. 3. Incremental parsing is not supported. CPER records are expected to be algorithmically small, and buffered such that the entire value fits in memory. This was already an assumption, but dropping the support for incremental encoding significantly reduces the amount of code to support it. It could be added back in the future if needed.
Change-Id: Idb010db105067ea317dbee05c2663511ab3c6611 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
fedd457d |
| 12-Jul-2024 |
Ed Tanous <ed@tanous.net> |
Remove trailing whitespace
clang-format won't remove trailing whitespace if that's the only change. Fix them all.
Change-Id: Ic6e14af43cdd11905d3b58430d49b9ec1484f812 Signed-off-by: Ed Tanous <ed@t
Remove trailing whitespace
clang-format won't remove trailing whitespace if that's the only change. Fix them all.
Change-Id: Ic6e14af43cdd11905d3b58430d49b9ec1484f812 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
0b9c9402 |
| 22-May-2024 |
John Chung <john.chung@arm.com> |
Fix compiler error : strict-aliasing
Signed-off-by: John Chung <john.chung@arm.com> Change-Id: Iae4d7962a7ffca20633b3a49c8c2cbc763a5f22d
|
#
f8fc7052 |
| 03-May-2024 |
John Chung <john.chung@arm.com> |
Formatting .c/.h files and fix memory leakage issues
Signed-off-by: John Chung <john.chung@arm.com> Change-Id: Id8328f412c2724992d80c0b3f895c8f85bc4ae68
|
#
5202bbb4 |
| 12-Aug-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Source json.h non-locally.
Change-Id: Ia42c41fde74596b394a1f7ae0021f1a5510991a8
|
#
e407b4c8 |
| 21-Jul-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Partial reformat to kernel code style.
|
#
01e3a44d |
| 20-Jul-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Fix IA32x64 pointer corruption, invalid generation on ARM.
|
#
4237584e |
| 19-Jul-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Fix various errata found from testing.
|
#
71570a2a |
| 14-Jul-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Add ARM CPER out, fix struct misalignment.
|
#
7cd13908 |
| 13-Jul-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Add partial ARM CPER-JSON support.
|
#
d0c225b9 |
| 11-Jul-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Fix duplicated MRS fields in ARM section.
|
#
583cdeee |
| 11-Jul-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Add memory error/memory error 2 sections.
|
#
3636d3c2 |
| 11-Jul-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Add ARM JSON to specification.
|
#
9a785c2a |
| 07-Jul-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Add CPU information to generic/IA32/x64 sections.
|
#
2721739a |
| 07-Jul-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Add extra definitions for existing sections.
|
#
d7e8ca34 |
| 07-Jul-2022 |
Lawrence Tang <lawrence.tang@arm.com> |
Add CXL component GUIDs, b64 dumps for unknown.
|