Add new APIs for loader process 34/287034/2
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 19 Jan 2023 01:47:28 +0000 (01:47 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 19 Jan 2023 01:59:32 +0000 (01:59 +0000)
commit4c969c4a6db986fb18a745b613dc0997a1cc95d2
tree5d815fb3c0be0007cddaa0baa15884c200d5b009
parentbee27c1c04f682ab5ca96abaf66157abee2c4eef
Add new APIs for loader process

Before calling the loader_launch_cb() callback function, the loader process
has to make blocking all sub threads if a new thread is able to be created by
the sub thread. This patch adds new functions for the loader process.
Some loader process creates a new process while calling the security_manager_prepare_app2().
It makes an application launch failure issue.

When calling the loader_prelaunch_cb() callback function, the loader should call
the launchpad_loader_block_threads() to make blocking all sub threads.
And then, the loader calls the launchpad_loader_unblock_threads() while calling
the launchpad_launch_cb() callback function.

Even if the sub thread creates a new thread while calling the launchpad_loader_block_threads(),
it handles by the security_manager_prepare_app2() function.
This is not complete solution. But, this patch is able to reduce the risk about
the launch failure issues.

Adds:
 - launchpad_loader_block_threads()
 - launchpad_loader_unblock_threads()

Change-Id: Ib98d435507abbb0d3ebe0a5617d7fcb2509c154e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/launchpad/inc/launchpad.h
src/lib/launchpad/src/launchpad_lib.c