Apply GCC's tainted_args attribute to library entrypoints
The implementation applies `__attribute__((tainted_args))` by
integrating it into the existing ABI macro annotations.
In the process, quite a number of APIs were discovered to be unsafe in
ways that were not immediately fixable. Often this is because they lack
arguments that enable the appropriate bounds-checking to be applied.
Redesigning them is work beyond the scope of the immediate
effort. Instead, we also introduce a new annotation,
LIBPLDM_ABI_DEPRECATED_UNSAFE, that simply lacks
`__attribute__((tainted_args))` and therefore doesn't trigger the extra
analysis.
Change-Id: Ib8994eaa3907a5432d040426ad03687cbf4c2136
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/src/dsp/bios.c b/src/dsp/bios.c
index 5ef5e99..9768e4b 100644
--- a/src/dsp/bios.c
+++ b/src/dsp/bios.c
@@ -210,7 +210,7 @@
return PLDM_SUCCESS;
}
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED_UNSAFE
int encode_get_bios_table_resp(uint8_t instance_id, uint8_t completion_code,
uint32_t next_transfer_handle,
uint8_t transfer_flag, uint8_t *table_data,
@@ -426,7 +426,7 @@
return PLDM_SUCCESS;
}
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED_UNSAFE
int encode_get_bios_current_value_by_handle_resp(uint8_t instance_id,
uint8_t completion_code,
uint32_t next_transfer_handle,