aboutsummaryrefslogtreecommitdiff
path: root/src/elf.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-11-02 17:50:40 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2024-11-02 17:50:40 +0200
commit5531e2eaaa2fd1dd282dba2fb5bc10e09dfec5e0 (patch)
treefe3d9b84917d3b065cce92d17dcb143cae7ca52b /src/elf.c
parent17fd9daf39cf79ae310c1b7d0eb459802517dc6a (diff)
downloadkmi-5531e2eaaa2fd1dd282dba2fb5bc10e09dfec5e0.tar.gz
kmi-5531e2eaaa2fd1dd282dba2fb5bc10e09dfec5e0.zip
check effective id of create
Diffstat (limited to 'src/elf.c')
-rw-r--r--src/elf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/elf.c b/src/elf.c
index 23f9b95..85b4b2e 100644
--- a/src/elf.c
+++ b/src/elf.c
@@ -205,6 +205,8 @@ static vm_t __prepare_proc(struct tcb *t, uint8_t ei_c, vm_t elf, vm_t interp)
/* sets up all memory regions etc, returns the entry address */
vm_t load_elf(struct tcb *t, vm_t elf, vm_t interp)
{
+ /** @todo check that all of elf is in memory, theoretically we could be
+ * passed like half an elf object? */
struct elf_ident *i = (struct elf_ident *)elf;
if (i->ei_magic != cpu_to_be32(EI_MAGIC))
return 0;