Revision tags: v0.11.0, v0.10.0 |
|
#
d0ba43af |
| 09-Sep-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
clang-tidy: Enable cppcoreguidelines-pro-type-reinterpret-cast
There are ways to avoid reinterpret_cast<>() in many circumstances. For libpldm, often its use can be replaced with placement-new. Enab
clang-tidy: Enable cppcoreguidelines-pro-type-reinterpret-cast
There are ways to avoid reinterpret_cast<>() in many circumstances. For libpldm, often its use can be replaced with placement-new. Enable the lint for reinterpret_cast<>() to prevent its use in future changes. This way we can stay inside the language rather than rely on implementation-defined behavior.
Existing uses of reinterpret_cast<>() are marked NOLINT for now, with the intent that we clean them up over time. The insertion of the NOLINTs was automated with sed.
Change-Id: If6654f774e438de9262fe9f9012c6b574764c326 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
3b5ab929 |
| 22-Sep-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Null check for pldm_bios_table_iter_is_end()
GCC's -fanalyzer identified the following:
``` In file included from ../tests/dsp/bios_table_iter.c:15: ../src/dsp/bios_table.c: In fun
dsp: bios_table: Null check for pldm_bios_table_iter_is_end()
GCC's -fanalyzer identified the following:
``` In file included from ../tests/dsp/bios_table_iter.c:15: ../src/dsp/bios_table.c: In function ‘pldm_bios_table_iter_is_end’: ../src/dsp/bios_table.c:991:17: error: dereference of NULL ‘iter’ [CWE-476] [-Werror=analyzer-null-dereference] 991 | if (iter->table_len - iter->current_pos <= pad_and_check_max) { | ~~~~^~~~~~~~~~~ ```
As a safety measure, return true to indicate the end of the iterator if the iterator is null.
Fixes: 9c76679224cf ("libpldm: Migrate to subproject") Change-Id: I18eec144120054de33eb351f9a80dee936118126 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
Revision tags: v0.9.1, v0.9.0 |
|
#
d8bb75cb |
| 29-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_append_pad_checksum_check()
Introduce pldm_bios_table_append_pad_checksum(), deprecate pldm_bios_table_append_pad_checksum_check(), add rename configuration a
dsp: bios_table: Rename pldm_bios_table_append_pad_checksum_check()
Introduce pldm_bios_table_append_pad_checksum(), deprecate pldm_bios_table_append_pad_checksum_check(), add rename configuration and apply it.
Change-Id: I77e79f4be6cecbac87b47d2140e1714b519c4e8d Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
504dd17f |
| 29-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_attr_value_entry_encode_integer_check()
Introduce pldm_bios_table_attr_value_entry_encode_integer(), deprecate pldm_bios_table_attr_value_entry_encode_integer
dsp: bios_table: Rename pldm_bios_table_attr_value_entry_encode_integer_check()
Introduce pldm_bios_table_attr_value_entry_encode_integer(), deprecate pldm_bios_table_attr_value_entry_encode_integer_check(), add rename configuration and apply it.
gitlint-ignore: T1 Change-Id: I7832752518592e69f8d64ac57d2724345b096729 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
1a3983ce |
| 29-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_attr_value_entry_encode_string_check()
Introduce pldm_bios_table_attr_value_entry_encode_string(), deprecate pldm_bios_table_attr_value_entry_encode_string_ch
dsp: bios_table: Rename pldm_bios_table_attr_value_entry_encode_string_check()
Introduce pldm_bios_table_attr_value_entry_encode_string(), deprecate pldm_bios_table_attr_value_entry_encode_string_check, add rename configuration and apply it.
gitlint-ignore: T1 Change-Id: I7f785aca80a8115bc5e6c60be40ac23ac3e322f1 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
09004d6a |
| 29-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_attr_value_entry_encode_enum_check()
Introduce pldm_bios_table_attr_value_entry_encode_enum(), deprecate pldm_bios_table_attr_value_entry_encode_enum_check(),
dsp: bios_table: Rename pldm_bios_table_attr_value_entry_encode_enum_check()
Introduce pldm_bios_table_attr_value_entry_encode_enum(), deprecate pldm_bios_table_attr_value_entry_encode_enum_check(), add rename configuration and apply it.
gitlint-ignore: T1 Change-Id: I8fe0da169b9acc919d01ba024503e72fd2792d4e Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
5347e279 |
| 29-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_attr_entry_integer_encode_check()
Introduce pldm_bios_table_attr_entry_integer_encode(), deprecate pldm_bios_table_attr_entry_integer_encode_check(), add rena
dsp: bios_table: Rename pldm_bios_table_attr_entry_integer_encode_check()
Introduce pldm_bios_table_attr_entry_integer_encode(), deprecate pldm_bios_table_attr_entry_integer_encode_check(), add rename configuration and apply it.
gitlint-ignore: T1 Change-Id: I4ad074babfa33e661cb5b0791cc539453dbd27c7 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
c668ffce |
| 25-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_attr_entry_string_decode_def_string_length_check()
Introduce pldm_bios_table_attr_entry_string_decode_def_string_length(), deprecate pldm_bios_table_attr_entr
dsp: bios_table: Rename pldm_bios_table_attr_entry_string_decode_def_string_length_check()
Introduce pldm_bios_table_attr_entry_string_decode_def_string_length(), deprecate pldm_bios_table_attr_entry_string_decode_def_string_length_check(), add the rename configuration and apply it.
As a consequence clang-tidy detected the following, though it's unclear why it was not detected previously:
``` clang-tidy-17 -export-fixes /tmp/tmpf4lalo2j/tmpkiyu1sgy.yaml -p=/home/andrew/src/openbmc.org/openbmc/libpldm/origin/build1qcxy8ww -quiet /home/andrew/src/openbmc.org/openbmc/libpldm/origin/src/dsp/bios_table.c ../src/dsp/bios_table.c:460:2: error: Null pointer passed to 2nd parameter expecting 'nonnull' [clang-analyzer-core.NonNullParamChecker,-warnings-as-errors] 460 | memcpy(buffer, fields->def_string, length); | ^ ~~~~~~~~~~~~~~~~~~ ../src/dsp/bios_table.c:457:11: note: Assuming the condition is true 457 | length = length < (size - 1) ? length : (size - 1); | ^~~~~~~~~~~~~~~~~~~ ../src/dsp/bios_table.c:457:11: note: '?' condition is true ../src/dsp/bios_table.c:460:2: note: Null pointer passed to 2nd parameter expecting 'nonnull' 460 | memcpy(buffer, fields->def_string, length); | ^ ~~~~~~~~~~~~~~~~~~ ```
gitlint-ignore: T1, B1 Change-Id: Ic390e00f520cb3d5e479604b34939cefd09e9448 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
f6be4933 |
| 25-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_attr_entry_string_encode_check()
Introduce pldm_bios_table_attr_entry_string_encode(), deprecate pldm_bios_table_attr_entry_string_encode_check(), add the ren
dsp: bios_table: Rename pldm_bios_table_attr_entry_string_encode_check()
Introduce pldm_bios_table_attr_entry_string_encode(), deprecate pldm_bios_table_attr_entry_string_encode_check(), add the rename configuration and apply it.
Change-Id: I7c2b70784dd91757723857ca9544d9462937a8a7 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
82b4d3b4 |
| 25-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
Introduce pldm_bios_table_attr_entry_enum_decode_pv_hdls(), deprecate pldm_bios_table_attr_entry_enum_decode_pv_hdls_ch
dsp: bios_table: Rename pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
Introduce pldm_bios_table_attr_entry_enum_decode_pv_hdls(), deprecate pldm_bios_table_attr_entry_enum_decode_pv_hdls_check(), add the rename configuration and apply it.
gitlint-ignore: T1 Change-Id: I29b4d24ce0bbb92ff0491c2abae4b512d4374e74 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
46673f4a |
| 25-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_attr_entry_enum_decode_def_num_check()
Introduce pldm_bios_table_attr_entry_enum_decode_def_num(), deprecate pldm_bios_table_attr_entry_enum_decode_def_num_ch
dsp: bios_table: Rename pldm_bios_table_attr_entry_enum_decode_def_num_check()
Introduce pldm_bios_table_attr_entry_enum_decode_def_num(), deprecate pldm_bios_table_attr_entry_enum_decode_def_num_check(), add the rename configuration and apply it.
gitlint-ignore: T1 Change-Id: Ia0eec8050e39f2ee45c350386af32bd5c37135c5 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
b06882f1 |
| 25-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_attr_entry_enum_decode_pv_num_check()
Introduce `pldm_bios_table_attr_entry_enum_decode_pv_num()`, deprecate `pldm_bios_table_attr_entry_enum_decode_pv_num_ch
dsp: bios_table: Rename pldm_bios_table_attr_entry_enum_decode_pv_num_check()
Introduce `pldm_bios_table_attr_entry_enum_decode_pv_num()`, deprecate `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`, add the rename configuration and apply it.
gitlint-ignore: T1 Change-Id: Ifb34736e9c1a31ad15649e556dcb6e3c98890f07 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
7126b1d2 |
| 25-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_attr_entry_enum_encode_check()
Introduce pldm_bios_table_attr_entry_enum_encode(), deprecate pldm_bios_table_attr_entry_enum_encode_check(), add the rename co
dsp: bios_table: Rename pldm_bios_table_attr_entry_enum_encode_check()
Introduce pldm_bios_table_attr_entry_enum_encode(), deprecate pldm_bios_table_attr_entry_enum_encode_check(), add the rename configuration and apply it.
Change-Id: I52586f960c5bda2a8c839d27c95bd65ca90c831f Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
8c37ab36 |
| 25-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_string_entry_decode_string_check()
Introduce pldm_bios_table_string_entry_decode_string(), deprecate pldm_bios_table_string_entry_decode_string_check(), add t
dsp: bios_table: Rename pldm_bios_table_string_entry_decode_string_check()
Introduce pldm_bios_table_string_entry_decode_string(), deprecate pldm_bios_table_string_entry_decode_string_check(), add the rename configuration and apply it.
gitlint-ignore: T1 Change-Id: Ia204acd95d9e1d9bc80d91dd0ff6ffea3a1fe243 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
e48fdd6e |
| 24-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Rename pldm_bios_table_string_entry_encode_check()
Introduce pldm_bios_table_string_entry_encode(), deprecate pldm_bios_table_string_entry_encode_check(), add the rename configurati
dsp: bios_table: Rename pldm_bios_table_string_entry_encode_check()
Introduce pldm_bios_table_string_entry_encode(), deprecate pldm_bios_table_string_entry_encode_check(), add the rename configuration and apply it.
Change-Id: I3a75320fde4be6bf913b3eb9b56ccacc11abf511 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
#
9e3a5d45 |
| 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: I25415165df192cfc3bd1405aca81bfa5bf2f7a63 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
#
48761c62 |
| 03-Jun-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
libpldm: Reorganize source and test files
Primarily this is about moving specification-specific files into 'dsp/' (in the "DMTF Standard Publication" sense[1]) subdirectories of both src/ and tests/
libpldm: Reorganize source and test files
Primarily this is about moving specification-specific files into 'dsp/' (in the "DMTF Standard Publication" sense[1]) subdirectories of both src/ and tests/.
[1]: https://www.dmtf.org/sites/default/files/standards/documents/DSP4014_2.14.0.pdf
libpldm is a concrete C implementation of the PLDM family of specifications. This invokes some accidental complexity[2] such as the msgbuf APIs and other concerns.
[2]: https://en.wikipedia.org/wiki/No_Silver_Bullet
Separate the essential complexity (everything under the dsp/ subdirectories) from the accidental complexity (almost everything else).
While doing so, I took the opportunity to drop the 'libpldm_' prefix and '_test' suffix from a variety of tests. The 'libpldm_' prefix is a hangover from the days when libpldm was a subproject of OpenBMC's pldm repo. The '_test' suffix feels redundant given the parent directory path.
Note that we maintain separation of the src/ and tests/. The test suite is implemented in C++ while libpldm's APIs are declared and defined in C. The ability to chop all the tests and C++ out of the implementation by ignoring a subtree seems like a desirable property when vendoring the library into other projects.
Finally, update the x86_64 GCC ABI dump, as rearranging the source causes a lot of churn in its definitions.
Change-Id: Icffcc6cf48b3101ecd38168827c0a81cffb8f083 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|