crypto: conftest struct crypto_engine_ctx support

struct crypto_engine_ctx removed in k6.6 hence use
conftest helper based macro to select updated data types

Bug 4346767

Change-Id: I23e8f054719f399877b11f42d355f940d8e07186
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026513
(cherry picked from commit 2a9ce8d0e2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053713
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Bitan Biswas
2023-12-01 13:02:15 +00:00
committed by mobile promotions
parent e4d4103ebe
commit 4a32aa94e5
2 changed files with 20 additions and 1 deletions

View File

@@ -157,6 +157,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_notifier_init
NV_CONFTEST_FUNCTION_COMPILE_TESTS += vm_area_struct_has_const_vm_flags NV_CONFTEST_FUNCTION_COMPILE_TESTS += vm_area_struct_has_const_vm_flags
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_fd_to_handle NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_fd_to_handle
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_handle_to_fd NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_handle_to_fd
NV_CONFTEST_FUNCTION_COMPILE_TESTS += crypto_engine_ctx_struct_removed_test
NV_CONFTEST_MACRO_COMPILE_TESTS ?= NV_CONFTEST_MACRO_COMPILE_TESTS ?=
NV_CONFTEST_SYMBOL_COMPILE_TESTS ?= NV_CONFTEST_SYMBOL_COMPILE_TESTS ?=
NV_CONFTEST_TYPE_COMPILE_TESTS += request_struct_has_completion_data_arg NV_CONFTEST_TYPE_COMPILE_TESTS += request_struct_has_completion_data_arg
@@ -165,7 +166,7 @@ $(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,functions,$(NV_CONFTEST_FUNCTION_C
$(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,generic,$(NV_CONFTEST_GENERIC_COMPILE_TESTS))) $(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,generic,$(NV_CONFTEST_GENERIC_COMPILE_TESTS)))
$(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,macros,$(NV_CONFTEST_MACRO_COMPILE_TESTS))) $(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,macros,$(NV_CONFTEST_MACRO_COMPILE_TESTS)))
$(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,symbols,$(NV_CONFTEST_SYMBOL_COMPILE_TESTS))) $(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,symbols,$(NV_CONFTEST_SYMBOL_COMPILE_TESTS)))
$(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,types,$(NV_CONFTEST_TYPE_COMPILE_TESTS))) $(eval $(call NV_GENERATE_COMPILE_TEST_HEADER,types,$(NV_CONFTEST_TYPES_COMPILE_TESTS)))
$(obj)/conftest/patches.h: $(NV_CONFTEST_SCRIPT) $(obj)/conftest/patches.h: $(NV_CONFTEST_SCRIPT)
@mkdir -p $(obj)/conftest @mkdir -p $(obj)/conftest

View File

@@ -7542,6 +7542,24 @@ compile_test() {
compile_check_conftest "$CODE" "NV_V4L2_ASYNC_NOTIFIER_INIT_PRESENT" "" "functions" compile_check_conftest "$CODE" "NV_V4L2_ASYNC_NOTIFIER_INIT_PRESENT" "" "functions"
;; ;;
crypto_engine_ctx_struct_removed_test)
#
# Determine if struct 'crypto_engine_ctx' is removed in linux kernel.
#
# Commit 5ce0bc68e0ee ("crypto: engine - Remove crypto_engine_ctx")
# Linux v6.6 removed struct crypto_engine_ctx
#
CODE="
#include <crypto/engine.h>
void conftest_crypto_engine_ctx_struct_removed_test(void) {
struct crypto_engine_ctx *ptr = NULL;
struct crypto_engine_ctx enginectx;
ptr = &enginectx;
}"
compile_check_conftest "$CODE" "NV_CONFTEST_REMOVE_STRUCT_CRYPTO_ENGINE_CTX" "" "functions"
;;
# When adding a new conftest entry, please use the correct format for # When adding a new conftest entry, please use the correct format for
# specifying the relevant upstream Linux kernel commit. # specifying the relevant upstream Linux kernel commit.
# #