From: liulongfang liulongfang@huawei.com
Explicitly declare the function symbol list of its external interface for the so dynamic library file of uadk, only make the external interface functions visible to the outside APP, and all other functions are only used internally.
Signed-off-by: liulongfang liulongfang@huawei.com --- Makefile.am | 18 +++-- libwd.map | 29 ++++++++ libwd_comp.map | 27 ++++++++ libwd_crypto.map | 173 +++++++++++++++++++++++++++++++++++++++++++++++ v1/libwd.map | 165 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 405 insertions(+), 7 deletions(-) create mode 100644 libwd.map create mode 100644 libwd_comp.map create mode 100644 libwd_crypto.map create mode 100644 v1/libwd.map
diff --git a/Makefile.am b/Makefile.am index b3f07df..066b954 100644 --- a/Makefile.am +++ b/Makefile.am @@ -100,20 +100,25 @@ libhisi_sec_la_DEPENDENCIES = libwd.la libwd_crypto.la libhisi_hpre_la_LIBADD = $(libwd_la_OBJECTS) $(libwd_crypto_la_OBJECTS) libhisi_hpre_la_DEPENDENCIES = libwd.la libwd_crypto.la else -libwd_la_LDFLAGS=$(UADK_VERSION) +UADK_WD_SYMBOL= -Wl,--version-script,$(top_srcdir)/libwd.map +UADK_CRYPTO_SYMBOL= -Wl,--version-script,$(top_srcdir)/libwd_crypto.map +UADK_COMP_SYMBOL= -Wl,--version-script,$(top_srcdir)/libwd_comp.map +UADK_V1_SYMBOL= -Wl,--version-script,$(top_srcdir)/v1/libwd.map + +libwd_la_LDFLAGS=$(UADK_VERSION) $(UADK_WD_SYMBOL) $(UADK_V1_SYMBOL) libwd_la_LIBADD= -lnuma
libwd_comp_la_LIBADD= -lwd -ldl -libwd_comp_la_LDFLAGS=$(UADK_VERSION) +libwd_comp_la_LDFLAGS=$(UADK_VERSION) $(UADK_COMP_SYMBOL) libwd_comp_la_DEPENDENCIES= libwd.la
-libhisi_zip_la_LIBADD= -ldl -libhisi_zip_la_LDFLAGS=$(UADK_VERSION) - libwd_crypto_la_LIBADD= -lwd -ldl -lnuma -lm -libwd_crypto_la_LDFLAGS=$(UADK_VERSION) +libwd_crypto_la_LDFLAGS=$(UADK_VERSION) $(UADK_CRYPTO_SYMBOL) libwd_crypto_la_DEPENDENCIES= libwd.la
+libhisi_zip_la_LIBADD= -ldl +libhisi_zip_la_LDFLAGS=$(UADK_VERSION) + libhisi_sec_la_LIBADD= -lwd -lwd_crypto libhisi_sec_la_LDFLAGS=$(UADK_VERSION) libhisi_sec_la_DEPENDENCIES= libwd.la libwd_crypto.la @@ -123,5 +128,4 @@ libhisi_hpre_la_LDFLAGS=$(UADK_VERSION) libhisi_hpre_la_DEPENDENCIES= libwd.la libwd_crypto.la endif # WD_STATIC_DRV
- SUBDIRS=. test v1/test uadk_tool sample diff --git a/libwd.map b/libwd.map new file mode 100644 index 0000000..e667226 --- /dev/null +++ b/libwd.map @@ -0,0 +1,29 @@ +UADK_2.0 { +global: + wd_request_ctx; + wd_release_ctx; + wd_ctx_get_api; + wd_ctx_wait; + wd_is_sva; + wd_is_isolate; + wd_get_accel_name; + wd_get_numa_id; + wd_get_avail_ctx; + wd_get_accel_list; + wd_get_accel_dev; + wd_free_list_accels; + + wd_block_alloc; + wd_block_free; + wd_blockpool_create; + wd_blockpool_destroy; + wd_mempool_create; + wd_mempool_destroy; + wd_mempool_stats; + wd_blockpool_stats; + wd_get_version; + wd_need_debug; + wd_need_info; + +local: *; +}; diff --git a/libwd_comp.map b/libwd_comp.map new file mode 100644 index 0000000..0e481c4 --- /dev/null +++ b/libwd_comp.map @@ -0,0 +1,27 @@ +UADK_COMP_2.0 { +global: + wd_comp_init; + wd_comp_uninit; + wd_comp_alloc_sess; + wd_comp_free_sess; + wd_do_comp_sync; + wd_do_comp_strm; + wd_do_comp_async; + wd_comp_poll_ctx; + wd_comp_poll; + wd_do_comp_sync2; + wd_comp_env_init; + wd_comp_env_uninit; + wd_comp_ctx_num_init; + wd_comp_ctx_num_uninit; + wd_comp_get_env_param; + wd_comp_set_driver; + wd_comp_get_driver; + wd_comp_get_msg; + + wd_sched_rr_instance; + wd_sched_rr_alloc; + wd_sched_rr_release; + +local: *; +}; diff --git a/libwd_crypto.map b/libwd_crypto.map new file mode 100644 index 0000000..5fadc53 --- /dev/null +++ b/libwd_crypto.map @@ -0,0 +1,173 @@ +UADK_CRYPTO_2.0 { +global: + wd_cipher_init; + wd_cipher_uninit; + wd_cipher_alloc_sess; + wd_cipher_free_sess; + wd_cipher_set_key; + wd_do_cipher_sync; + wd_do_cipher_async; + wd_cipher_poll_ctx; + wd_cipher_poll; + wd_cipher_env_init; + wd_cipher_env_uninit; + wd_cipher_ctx_num_init; + wd_cipher_ctx_num_uninit; + wd_cipher_get_env_param; + wd_cipher_set_driver; + wd_cipher_get_driver; + wd_cipher_get_msg; + + wd_aead_init; + wd_aead_uninit; + wd_aead_alloc_sess; + wd_aead_free_sess; + wd_aead_set_ckey; + wd_aead_set_akey; + wd_do_aead_sync; + wd_do_aead_async; + wd_aead_set_authsize; + wd_aead_get_authsize; + wd_aead_get_maxauthsize; + wd_aead_poll_ctx; + wd_aead_poll; + wd_aead_env_init; + wd_aead_env_uninit; + wd_aead_ctx_num_init; + wd_aead_ctx_num_uninit; + wd_aead_get_env_param; + wd_aead_set_driver; + wd_aead_get_driver; + wd_aead_get_msg; + + wd_digest_init; + wd_digest_uninit; + wd_digest_alloc_sess; + wd_digest_free_sess; + wd_do_digest_sync; + wd_do_digest_async; + wd_digest_set_key; + wd_digest_poll_ctx; + wd_digest_poll; + wd_digest_env_init; + wd_digest_env_uninit; + wd_digest_ctx_num_init; + wd_digest_ctx_num_uninit; + wd_digest_get_env_param; + wd_digest_set_driver; + wd_digest_get_driver; + wd_digest_get_msg; + + wd_rsa_is_crt; + wd_rsa_get_key_bits; + wd_rsa_get_pubkey; + wd_rsa_get_prikey; + wd_rsa_set_pubkey_params; + wd_rsa_get_pubkey_params; + wd_rsa_set_prikey_params; + wd_rsa_get_prikey_params; + wd_rsa_set_crt_prikey_params; + wd_rsa_get_crt_prikey_params; + wd_rsa_new_kg_in; + wd_rsa_del_kg_in; + wd_rsa_get_kg_in_params; + wd_rsa_new_kg_out; + wd_rsa_del_kg_out; + wd_rsa_get_kg_out_params; + wd_rsa_get_kg_out_crt_params; + wd_rsa_kg_in_data; + wd_rsa_kg_out_data; + wd_rsa_set_kg_out_crt_psz; + wd_rsa_set_kg_out_psz; + wd_rsa_init; + wd_rsa_uninit; + wd_rsa_alloc_sess; + wd_rsa_free_sess; + wd_do_rsa_async; + wd_rsa_poll; + wd_do_rsa_sync; + wd_do_rsa_async; + wd_rsa_poll_ctx; + wd_rsa_env_init; + wd_rsa_env_uninit; + wd_rsa_ctx_num_init; + wd_rsa_ctx_num_uninit; + wd_rsa_get_env_param; + wd_rsa_set_driver; + wd_rsa_get_driver; + wd_rsa_get_msg; + + wd_dh_get_mode; + wd_dh_key_bits; + wd_dh_set_g; + wd_dh_get_g; + wd_dh_alloc_sess; + wd_dh_free_sess; + wd_do_dh_async; + wd_do_dh_sync; + wd_dh_poll_ctx; + wd_dh_poll; + wd_dh_init; + wd_dh_uninit; + wd_dh_env_init; + wd_dh_env_uninit; + wd_dh_ctx_num_init; + wd_dh_ctx_num_uninit; + wd_dh_get_env_param; + wd_dh_set_driver; + wd_dh_get_driver; + wd_dh_get_msg; + + wd_ecc_get_key_bits; + wd_ecc_get_key; + wd_ecc_set_prikey; + wd_ecc_get_prikey; + wd_ecc_set_pubkey; + wd_ecc_get_pubkey; + wd_ecc_del_in; + wd_ecc_del_out; + wd_ecc_get_prikey_params; + wd_ecc_get_pubkey_params; + wd_ecxdh_new_in; + wd_ecxdh_new_out; + wd_ecxdh_get_out_params; + wd_ecc_set_driver; + wd_ecc_get_driver; + wd_ecc_get_msg; + + wd_sm2_new_sign_in; + wd_sm2_new_verf_in; + wd_sm2_new_enc_in; + wd_sm2_new_dec_in; + wd_sm2_new_sign_out; + wd_sm2_new_enc_out; + wd_sm2_new_dec_out; + wd_sm2_new_kg_out; + wd_sm2_get_sign_out_params; + wd_sm2_get_kg_out_params; + wd_sm2_get_enc_out_params; + wd_sm2_get_dec_out_params; + + wd_ecdsa_new_sign_in; + wd_ecdsa_new_verf_in; + wd_ecdsa_new_sign_out; + wd_ecdsa_get_sign_out_params; + wd_ecc_init; + wd_ecc_uninit; + wd_ecc_alloc_sess; + wd_ecc_free_sess; + wd_ecc_poll; + wd_do_ecc_sync; + wd_do_ecc_async; + wd_ecc_poll_ctx; + wd_ecc_env_init; + wd_ecc_env_uninit; + wd_ecc_ctx_num_init; + wd_ecc_ctx_num_uninit; + wd_ecc_get_env_param; + + wd_sched_rr_instance; + wd_sched_rr_alloc; + wd_sched_rr_release; +local: *; +}; diff --git a/v1/libwd.map b/v1/libwd.map new file mode 100644 index 0000000..4e6b639 --- /dev/null +++ b/v1/libwd.map @@ -0,0 +1,165 @@ +UADK_1.0 { +global: + wd_request_queue; + wd_release_queue; + wd_send; + wd_recv; + wd_wait; + wd_recv_sync; + wd_reserve_memory; + wd_share_reserved_memory; + wd_get_available_dev_num; + wd_get_node_id; + wd_iova_map; + wd_iova_unmap; + wd_dma_to_va; + wd_register_log; + log_out; + + wd_blkpool_create; + wd_blkpool_destroy; + wd_alloc_blk; + wd_free_blk; + wd_get_free_blk_num; + wd_blk_alloc_failures; + wd_blk_iova_map; + wd_blk_iova_unmap; + wd_blksize; + + wcrypto_create_aead_ctx; + wcrypto_set_aead_ckey; + wcrypto_set_aead_akey; + wcrypto_aead_setauthsize; + wcrypto_aead_getauthsize; + wcrypto_aead_get_maxauthsize; + wcrypto_do_aead; + wcrypto_burst_aead; + wcrypto_aead_poll; + wcrypto_del_aead_ctx; + + wcrypto_create_cipher_ctx; + wcrypto_set_cipher_key; + wcrypto_do_cipher; + wcrypto_cipher_poll; + wcrypto_del_cipher_ctx; + wcrypto_burst_cipher; + + wcrypto_create_digest_ctx; + wcrypto_set_digest_key; + wcrypto_do_digest; + wcrypto_digest_poll; + wcrypto_del_digest_ctx; + wcrypto_burst_digest; + + wcrypto_create_comp_ctx; + wcrypto_do_comp; + wcrypto_comp_poll; + wcrypto_del_comp_ctx; + + wcrypto_create_dh_ctx; + wcrypto_dh_is_g2; + wcrypto_dh_key_bits; + wcrypto_do_dh; + wcrypto_dh_poll; + wcrypto_del_dh_ctx; + wcrypto_set_dh_g; + wcrypto_get_dh_g; + + wcrypto_get_ecc_key_bits; + wcrypto_create_ecc_ctx; + wcrypto_del_ecc_ctx; + wcrypto_get_ecc_key; + wcrypto_set_ecc_prikey; + wcrypto_get_ecc_prikey; + wcrypto_set_ecc_pubkey; + wcrypto_get_ecc_pubkey; + wcrypto_del_ecc_in; + wcrypto_del_ecc_out; + wcrypto_get_ecc_prikey_params; + wcrypto_get_ecc_pubkey_params; + wcrypto_get_ecxdh_in_params; + wcrypto_get_ecxdh_out_params; + wcrypto_new_ecxdh_in; + wcrypto_new_ecxdh_out; + wcrypto_do_ecxdh; + wcrypto_ecxdh_poll; + wcrypto_new_ecdsa_sign_in; + wcrypto_new_ecdsa_verf_in; + wcrypto_new_ecdsa_sign_out; + wcrypto_get_ecdsa_sign_in_params; + wcrypto_get_ecdsa_verf_in_params; + wcrypto_get_ecdsa_sign_out_params; + wcrypto_do_ecdsa; + wcrypto_ecdsa_poll; + + wcrypto_new_sm2_sign_in; + wcrypto_new_sm2_verf_in; + wcrypto_new_sm2_sign_out; + wcrypto_get_sm2_sign_out_params; + wcrypto_new_sm2_enc_in; + wcrypto_new_sm2_dec_in; + wcrypto_new_sm2_enc_out; + wcrypto_new_sm2_dec_out; + wcrypto_new_sm2_kg_out; + wcrypto_get_sm2_kg_out_params; + wcrypto_get_sm2_enc_out_params; + wcrypto_get_sm2_dec_out_params; + wcrypto_do_sm2; + wcrypto_sm2_poll; + + wcrypto_rsa_is_crt; + wcrypto_rsa_key_bits; + wcrypto_create_rsa_ctx; + wcrypto_get_rsa_pubkey; + wcrypto_get_rsa_prikey; + wcrypto_set_rsa_pubkey_params; + wcrypto_get_rsa_pubkey_params; + wcrypto_set_rsa_prikey_params; + wcrypto_get_rsa_prikey_params; + wcrypto_set_rsa_crt_prikey_params; + wcrypto_get_rsa_crt_prikey_params; + wcrypto_new_kg_in; + wcrypto_del_kg_in; + wcrypto_get_rsa_kg_in_params; + wcrypto_new_kg_out; + wcrypto_del_kg_out; + wcrypto_get_rsa_kg_out_params; + wcrypto_get_rsa_kg_out_crt_params; + wcrypto_rsa_kg_in_data; + wcrypto_rsa_kg_out_data; + wcrypto_set_rsa_kg_out_crt_psz; + wcrypto_set_rsa_kg_out_psz; + wcrypto_do_rsa; + wcrypto_rsa_poll; + wcrypto_del_rsa_ctx; + + wcrypto_create_rng_ctx; + wcrypto_del_rng_ctx; + wcrypto_do_rng; + wcrypto_rng_poll; + + wd_sglpool_create; + wd_sglpool_destroy; + wd_alloc_sgl; + wd_free_sgl; + wd_sgl_merge; + wd_sgl_cp_to_pbuf; + wd_sgl_cp_from_pbuf; + wd_sgl_iova_map; + wd_sgl_iova_unmap; + wd_get_last_sge_buf; + wd_get_first_sge_buf; + wd_get_sgl_sge_num; + wd_get_sgl_buf_num; + wd_get_sge_buf; + wd_get_sgl_buf_sum; + wd_get_sgl_mem_size; + wd_get_free_sgl_num; + wd_get_free_sgl_sge_num; + wd_get_free_buf_num; + wd_get_sgl_datalen; + wd_get_sge_datalen; + wd_get_sgl_bufsize; + +local: *; +};