@ -78,6 +78,9 @@ static int load_elf(struct linux_binprm *bprm
|
|||||||
char *pbuf;
|
char *pbuf;
|
||||||
const char *path;
|
const char *path;
|
||||||
|
|
||||||
|
if (mcctrl_os_alive() == -1)
|
||||||
|
return -ENOEXEC;
|
||||||
|
|
||||||
if(bprm->envc == 0)
|
if(bprm->envc == 0)
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
if(memcmp(elf_ex->e_ident, ELFMAG, SELFMAG) != 0)
|
if(memcmp(elf_ex->e_ident, ELFMAG, SELFMAG) != 0)
|
||||||
|
|||||||
@ -185,6 +185,16 @@ int mcctrl_os_shutdown_notifier(int os_index)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int mcctrl_os_alive()
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < OS_MAX_MINOR; i++)
|
||||||
|
if (os[i])
|
||||||
|
return i;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
static struct ihk_os_notifier_ops mcctrl_os_notifier_ops = {
|
static struct ihk_os_notifier_ops mcctrl_os_notifier_ops = {
|
||||||
.boot = mcctrl_os_boot_notifier,
|
.boot = mcctrl_os_boot_notifier,
|
||||||
.shutdown = mcctrl_os_shutdown_notifier,
|
.shutdown = mcctrl_os_shutdown_notifier,
|
||||||
|
|||||||
@ -408,6 +408,8 @@ inline struct mcctrl_per_thread_data *mcctrl_get_per_thread_data(
|
|||||||
void __return_syscall(ihk_os_t os, struct ikc_scd_packet *packet,
|
void __return_syscall(ihk_os_t os, struct ikc_scd_packet *packet,
|
||||||
long ret, int stid);
|
long ret, int stid);
|
||||||
|
|
||||||
|
int mcctrl_os_alive(void);
|
||||||
|
|
||||||
#define PROCFS_NAME_MAX 768
|
#define PROCFS_NAME_MAX 768
|
||||||
|
|
||||||
struct procfs_read {
|
struct procfs_read {
|
||||||
|
|||||||
Reference in New Issue
Block a user