Introduce CPUID detection for Blink

This commit is contained in:
Justine Tunney 2022-12-17 00:38:07 -08:00
parent 4922bc4890
commit 3da887c58f
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
12 changed files with 19 additions and 14 deletions

View file

@ -239,7 +239,7 @@
int pledge(const char *promises, const char *execpromises) {
int e, rc;
unsigned long ipromises, iexecpromises;
if (IsGenuineCosmo()) {
if (IsGenuineCosmo() || IsGenuineBlink()) {
rc = 0; // blink doesn't support seccomp
} else if (!ParsePromises(promises, &ipromises) &&
!ParsePromises(execpromises, &iexecpromises)) {

View file

@ -354,7 +354,7 @@ int sys_unveil_linux(const char *path, const char *permissions) {
int unveil(const char *path, const char *permissions) {
int e, rc;
e = errno;
if (IsGenuineCosmo()) {
if (IsGenuineCosmo() || IsGenuineBlink()) {
rc = 0; // blink doesn't support landlock
} else if (IsLinux()) {
rc = sys_unveil_linux(path, permissions);