Searched hist:c63f63a2 (Results 1 – 5 of 5) sorted by relevance
/openbmc/libpldm/tests/ |
H A D | msgbuf_generic.c | c63f63a2 Fri Feb 24 05:59:33 CST 2023 Andrew Jeffery <andrew@aj.id.au> Introduce a small msgbuf abstraction
Tidy up how we extract data from wire-format buffers.
The API achieves the following:
1. Abstracts the buffer tracking to improve clarity in the calling code
2. Prevents buffer overflows during data extraction
3. Handles type conversions while avoiding undefined behaviour
4. Handles alignment concerns with packed data and removes the need for `__attribute__((packed))` structs in the public ABI
5. Handles the endianness conversions required by the PLDM specification(s)
6. Batches error checks such that you mostly only have to do `return pldm_msgbuf_destroy();` at the end of the decode_* function for error handling, no error handling required on every `pldm_msgbuf_extract()` call
7. pldm_msgbuf_extract() is generic over the type of the data pointer (automatically calls the correct extractor for the type of the pointer)
8. Generates optimal code (where the optimiser can prove the accesses are in-bounds we generate straight-line load/store pairs and no function calls)
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I7e727cbd26c43aae2815ababe0e6ca4c8e629766 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
H A D | meson.build | c63f63a2 Fri Feb 24 05:59:33 CST 2023 Andrew Jeffery <andrew@aj.id.au> Introduce a small msgbuf abstraction
Tidy up how we extract data from wire-format buffers.
The API achieves the following:
1. Abstracts the buffer tracking to improve clarity in the calling code
2. Prevents buffer overflows during data extraction
3. Handles type conversions while avoiding undefined behaviour
4. Handles alignment concerns with packed data and removes the need for `__attribute__((packed))` structs in the public ABI
5. Handles the endianness conversions required by the PLDM specification(s)
6. Batches error checks such that you mostly only have to do `return pldm_msgbuf_destroy();` at the end of the decode_* function for error handling, no error handling required on every `pldm_msgbuf_extract()` call
7. pldm_msgbuf_extract() is generic over the type of the data pointer (automatically calls the correct extractor for the type of the pointer)
8. Generates optimal code (where the optimiser can prove the accesses are in-bounds we generate straight-line load/store pairs and no function calls)
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I7e727cbd26c43aae2815ababe0e6ca4c8e629766 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
H A D | msgbuf.cpp | c63f63a2 Fri Feb 24 05:59:33 CST 2023 Andrew Jeffery <andrew@aj.id.au> Introduce a small msgbuf abstraction
Tidy up how we extract data from wire-format buffers.
The API achieves the following:
1. Abstracts the buffer tracking to improve clarity in the calling code
2. Prevents buffer overflows during data extraction
3. Handles type conversions while avoiding undefined behaviour
4. Handles alignment concerns with packed data and removes the need for `__attribute__((packed))` structs in the public ABI
5. Handles the endianness conversions required by the PLDM specification(s)
6. Batches error checks such that you mostly only have to do `return pldm_msgbuf_destroy();` at the end of the decode_* function for error handling, no error handling required on every `pldm_msgbuf_extract()` call
7. pldm_msgbuf_extract() is generic over the type of the data pointer (automatically calls the correct extractor for the type of the pointer)
8. Generates optimal code (where the optimiser can prove the accesses are in-bounds we generate straight-line load/store pairs and no function calls)
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I7e727cbd26c43aae2815ababe0e6ca4c8e629766 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
/openbmc/libpldm/src/ |
H A D | msgbuf.h | c63f63a2 Fri Feb 24 05:59:33 CST 2023 Andrew Jeffery <andrew@aj.id.au> Introduce a small msgbuf abstraction
Tidy up how we extract data from wire-format buffers.
The API achieves the following:
1. Abstracts the buffer tracking to improve clarity in the calling code
2. Prevents buffer overflows during data extraction
3. Handles type conversions while avoiding undefined behaviour
4. Handles alignment concerns with packed data and removes the need for `__attribute__((packed))` structs in the public ABI
5. Handles the endianness conversions required by the PLDM specification(s)
6. Batches error checks such that you mostly only have to do `return pldm_msgbuf_destroy();` at the end of the decode_* function for error handling, no error handling required on every `pldm_msgbuf_extract()` call
7. pldm_msgbuf_extract() is generic over the type of the data pointer (automatically calls the correct extractor for the type of the pointer)
8. Generates optimal code (where the optimiser can prove the accesses are in-bounds we generate straight-line load/store pairs and no function calls)
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I7e727cbd26c43aae2815ababe0e6ca4c8e629766 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
/openbmc/libpldm/ |
H A D | meson.build | c63f63a2 Fri Feb 24 05:59:33 CST 2023 Andrew Jeffery <andrew@aj.id.au> Introduce a small msgbuf abstraction
Tidy up how we extract data from wire-format buffers.
The API achieves the following:
1. Abstracts the buffer tracking to improve clarity in the calling code
2. Prevents buffer overflows during data extraction
3. Handles type conversions while avoiding undefined behaviour
4. Handles alignment concerns with packed data and removes the need for `__attribute__((packed))` structs in the public ABI
5. Handles the endianness conversions required by the PLDM specification(s)
6. Batches error checks such that you mostly only have to do `return pldm_msgbuf_destroy();` at the end of the decode_* function for error handling, no error handling required on every `pldm_msgbuf_extract()` call
7. pldm_msgbuf_extract() is generic over the type of the data pointer (automatically calls the correct extractor for the type of the pointer)
8. Generates optimal code (where the optimiser can prove the accesses are in-bounds we generate straight-line load/store pairs and no function calls)
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I7e727cbd26c43aae2815ababe0e6ca4c8e629766 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|