container/seccomp: cross-platform sysnum cutoff
All checks were successful
Test / Create distribution (push) Successful in 32s
Test / Sandbox (push) Successful in 1m54s
Test / Hakurei (push) Successful in 2m47s
Test / Sandbox (race detector) (push) Successful in 3m5s
Test / Planterette (push) Successful in 3m30s
Test / Hakurei (race detector) (push) Successful in 4m20s
Test / Flake checks (push) Successful in 1m10s
All checks were successful
Test / Create distribution (push) Successful in 32s
Test / Sandbox (push) Successful in 1m54s
Test / Hakurei (push) Successful in 2m47s
Test / Sandbox (race detector) (push) Successful in 3m5s
Test / Planterette (push) Successful in 3m30s
Test / Hakurei (race detector) (push) Successful in 4m20s
Test / Flake checks (push) Successful in 1m10s
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
72c2b66fc0
commit
2c7b7ad845
@ -4,8 +4,14 @@
|
|||||||
# license that can be found in the LICENSE file.
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
use POSIX ();
|
||||||
|
|
||||||
my $command = "mksysnum_linux.pl ". join(' ', @ARGV);
|
my $command = "mksysnum_linux.pl ". join(' ', @ARGV);
|
||||||
|
my $uname_arch = (POSIX::uname)[4];
|
||||||
|
my %syscall_cutoff_arch = (
|
||||||
|
"x86_64" => 302,
|
||||||
|
"aarch64" => 281,
|
||||||
|
);
|
||||||
|
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
// $command
|
// $command
|
||||||
@ -30,7 +36,7 @@ sub fmt {
|
|||||||
}
|
}
|
||||||
(my $name_upper = $name) =~ y/a-z/A-Z/;
|
(my $name_upper = $name) =~ y/a-z/A-Z/;
|
||||||
$num = $num + $offset;
|
$num = $num + $offset;
|
||||||
if($num > 302){ # not wired in Go standard library
|
if($num > $syscall_cutoff_arch{$uname_arch}){ # not wired in Go standard library
|
||||||
if($state < 0){
|
if($state < 0){
|
||||||
print " \"$name\": SYS_$name_upper,\n";
|
print " \"$name\": SYS_$name_upper,\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user