kernel: misc fixes

This commit is contained in:
Matheus
2025-12-06 18:48:48 -03:00
parent 9c1c363df4
commit 81f9e758dc
4 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -55,12 +55,14 @@ typedef struct {
#define DT_SOCK 12
#define DT_WHT 14
#define NAME_MAX 255
typedef struct {
ino_t d_ino;
off_t d_off;
unsigned short d_reclen;
unsigned char d_type;
char d_name[1024];
char d_name[NAME_MAX+1];
} dent_t;
#define TYPE_FIFO 1
+1 -1
View File
@@ -1,5 +1,5 @@
#ifndef _IDT_H
#define _IDT_h
#define _IDT_H
void arch_idt_reload();
void arch_idt_setup();
+1
View File
@@ -906,6 +906,7 @@ vmmcontext_t *vmm_fork(vmmcontext_t *oldcontext) {
range = range->next;
}
// TODO do only userspace invalidation as to not send ipi to all cores
arch_mmu_invalidate_range(NULL, 0);
MUTEX_RELEASE(&oldcontext->space.lock);
+1 -1
View File
@@ -579,7 +579,7 @@ bool signal_check(struct thread_t *thread, context_t *context, bool syscall, uin
memset(&sigframe->siginfo, 0, sizeof(siginfo_t));
if (signal == SIGSEGV)
sigframe->siginfo.__si_fields.__sigfault.si_addr = CTX_TRAP_ADDR(context);
sigframe->siginfo.__si_fields.__sigfault.si_addr = (void *)CTX_TRAP_ADDR(context);
if (usercopy_touser(stack, sigframe, ARCH_SIGFRAME_SIZE)) {
printf("signal: bad user stack %p (altstack %p) handling signal %d trapno %lu\n", stack, altstack, signal, sigframe->mcontext.gregs[MCONTEXT_REG_TRAPNO]);