-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux: make use of mseal(2) #242
base: main
Are you sure you want to change the base?
Conversation
memory.c
Outdated
return false; | ||
if (unlikely(errno == ENOMEM)) | ||
return true; | ||
if (likely(errno == ENOSYS)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be marked likely
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped.
Also marked the function COLD
, since it is only called from init_slow_path()
also tagged COLD
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mseal(2)
can return -EPERM
on 32-bit architectures, should this be checked explicitly or is 32-bit not supported at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
32-bit isn't supported.
Instead of protecting the global read-only data structure after startup via the read-only flag, which can be reverted, use the in Linux 6.10 introduced irreversible syscall mseal(2).
I've been running this for about a week now without issue. |
Will get to this eventually, it's just very low priority due to low impact. |
Instead of protecting the global read-only data structure after startup via the read-only flag, which can be reverted, use the in Linux 6.10 introduced irreversible syscall mseal(2).