lib: Add epoch-based SMR

This commit is contained in:
2026-11-01 21:06:48 +01:00
parent 3ff068e944
commit 7c04530681
24 changed files with 1059 additions and 84 deletions
+5 -1
View File
@@ -93,8 +93,12 @@ struct syscall_ret sys_setuname(const __user struct __utsname* ptr) {
struct syscall_ret sys_syslog(enum syslog_kind kind, __user char* message, size_t len) {
struct syscall_ret ret = {};
const size_t buf_len = MIN(len + 1, 256);
const size_t buf_len = MIN(len, 255) + 1;
char* buf = mem_alloc(buf_len, ALLOC_NOZERO);
if (!buf) {
ret.error = ENOMEM;
return ret;
}
if (!usercopy_read(buf, message, buf_len - 1)) {
mem_free(buf);