@@ -1517,43 +1517,23 @@ __cold int ipc4_user_process_module_message(struct ipc4_message_request *ipc4,
15171517 */
15181518 struct ipc4_module_init_instance mi ;
15191519
1520- BUILD_ASSERT (sizeof (struct comp_driver ) + sizeof (struct tr_ctx ) <=
1521- sizeof (((struct ipc_user * )0 )-> init_drv_data ),
1522- "ipc_user.init_drv_data too small for driver copy" );
1523-
15241520 memcpy_s (& mi , sizeof (mi ), ipc4 , sizeof (* ipc4 ));
15251521 if (!cpu_is_me (mi .extension .r .core_id )) {
15261522 ret = ipc4_init_module_instance (ipc4 );
15271523 } else {
15281524 struct ipc * ipc = ipc_get ();
15291525 uint32_t comp_id = IPC4_COMP_ID (mi .primary .r .module_id ,
15301526 mi .primary .r .instance_id );
1531- const struct comp_driver * drv = ipc4_get_comp_drv (
1532- IPC4_MOD_ID (comp_id ));
1527+ const struct comp_driver * drv = ipc4_get_comp_drv (IPC4_MOD_ID (comp_id ));
15331528
15341529 if (!drv ) {
15351530 ret = IPC4_MOD_NOT_INITIALIZED ;
15361531 } else {
15371532 struct ipc_user * pdata = ipc -> ipc_user_pdata ;
15381533
1539- /* Copy comp_driver and tr_ctx into
1540- * user-accessible ipc_user buffer —
1541- * originals are in kernel .rodata/.data
1542- * and not readable from user mode.
1543- */
1544- struct comp_driver * drv_copy =
1545- (struct comp_driver * )pdata -> init_drv_data ;
1546- struct tr_ctx * tctx_copy =
1547- (struct tr_ctx * )(pdata -> init_drv_data +
1548- sizeof (struct comp_driver ));
1549-
1550- memcpy_s (drv_copy , sizeof (* drv_copy ),
1551- drv , sizeof (* drv ));
1552- if (drv -> tctx ) {
1553- memcpy_s (tctx_copy , sizeof (* tctx_copy ),
1554- drv -> tctx , sizeof (* drv -> tctx ));
1555- drv_copy -> tctx = tctx_copy ;
1556- }
1534+ ret = llext_manager_map_lib (comp_id );
1535+ if (ret < 0 )
1536+ break ;
15571537
15581538 pdata -> init_drv = drv ;
15591539 ret = ipc_user_forward_cmd (ipc4 );
0 commit comments