@@ -57,6 +57,28 @@ index 591afd7d1dcba..68a444ebd9fbd 100644
57
57
}
58
58
59
59
pkg_config_script = "//build/config/linux/pkg-config.py"
60
+ diff --git build/config/rust.gni build/config/rust.gni
61
+ index b7e3c8881b589..c4fe35c559561 100644
62
+ --- build/config/rust.gni
63
+ +++ build/config/rust.gni
64
+ @@ -193,6 +193,8 @@ rust_abi_target = ""
65
+ if (is_linux || is_chromeos) {
66
+ if (current_cpu == "arm64") {
67
+ rust_abi_target = "aarch64-unknown-linux-gnu"
68
+ + } else if (current_cpu == "loong64") {
69
+ + rust_abi_target = "loongarch64-unknown-linux-gnu"
70
+ } else if (current_cpu == "x86") {
71
+ rust_abi_target = "i686-unknown-linux-gnu"
72
+ } else if (current_cpu == "x64") {
73
+ @@ -299,6 +301,8 @@ if (current_cpu == "x86") {
74
+ rust_target_arch = "powerpc64"
75
+ } else if (current_cpu == "riscv64") {
76
+ rust_target_arch = "riscv64"
77
+ + } else if (current_cpu == "loong64") {
78
+ + rust_target_arch = "loongarch64"
79
+ }
80
+
81
+ assert(!toolchain_has_rust || rust_target_arch != "")
60
82
diff --git build/config/sysroot.gni build/config/sysroot.gni
61
83
index 47fe4cbc840dd..d89b9b4431352 100644
62
84
--- build/config/sysroot.gni
@@ -424,7 +446,7 @@ index bb0e13f4d2d9c..e9ae7ce32afc4 100644
424
446
#if defined(__arm__)
425
447
PTRACE_GETVFPREGS,
426
448
diff --git sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
427
- index 4f56b6e0d10db..c550967a4309a 100644
449
+ index 4f56b6e0d10db..8d40965583f64 100644
428
450
--- sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
429
451
+++ sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
430
452
@@ -103,7 +103,7 @@ bool SyscallSets::IsUmask(int sysno) {
@@ -551,7 +573,15 @@ index 4f56b6e0d10db..c550967a4309a 100644
551
573
case __NR_accept:
552
574
case __NR_accept4:
553
575
case __NR_bind:
554
- @@ -554,7 +561,7 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
576
+ @@ -548,13 +555,15 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
577
+ case __NR_mlock:
578
+ case __NR_munlock:
579
+ case __NR_munmap:
580
+ + #if !defined(__loongarch64)
581
+ case __NR_mseal:
582
+ + #endif
583
+ return true;
584
+ case __NR_madvise:
555
585
case __NR_mincore:
556
586
case __NR_mlockall:
557
587
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
@@ -560,7 +590,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
560
590
case __NR_mmap:
561
591
#endif
562
592
#if defined(__i386__) || defined(__arm__) || \
563
- @@ -587,7 +594 ,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) {
593
+ @@ -587,7 +596 ,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) {
564
594
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
565
595
case __NR__llseek:
566
596
#endif
@@ -569,7 +599,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
569
599
case __NR_poll:
570
600
#endif
571
601
case __NR_ppoll:
572
- @@ -608,7 +615 ,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) {
602
+ @@ -608,7 +617 ,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) {
573
603
case __NR_recv:
574
604
#endif
575
605
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
@@ -578,7 +608,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
578
608
case __NR_recvfrom: // Could specify source.
579
609
case __NR_recvmsg: // Could specify source.
580
610
#endif
581
- @@ -623,7 +630 ,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) {
611
+ @@ -623,7 +632 ,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) {
582
612
case __NR_send:
583
613
#endif
584
614
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
@@ -587,7 +617,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
587
617
case __NR_sendmsg: // Could specify destination.
588
618
case __NR_sendto: // Could specify destination.
589
619
#endif
590
- @@ -672,7 +679 ,7 @@ bool SyscallSets::IsSeccomp(int sysno) {
620
+ @@ -672,7 +681 ,7 @@ bool SyscallSets::IsSeccomp(int sysno) {
591
621
bool SyscallSets::IsAllowedBasicScheduler(int sysno) {
592
622
switch (sysno) {
593
623
case __NR_sched_yield:
@@ -596,7 +626,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
596
626
case __NR_pause:
597
627
#endif
598
628
case __NR_nanosleep:
599
- @@ -756,7 +763 ,7 @@ bool SyscallSets::IsNuma(int sysno) {
629
+ @@ -756,7 +765 ,7 @@ bool SyscallSets::IsNuma(int sysno) {
600
630
case __NR_getcpu:
601
631
case __NR_mbind:
602
632
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
@@ -605,7 +635,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
605
635
case __NR_migrate_pages:
606
636
#endif
607
637
case __NR_move_pages:
608
- @@ -804,7 +811 ,9 @@ bool SyscallSets::IsGlobalProcessEnvironment(int sysno) {
638
+ @@ -804,7 +813 ,9 @@ bool SyscallSets::IsGlobalProcessEnvironment(int sysno) {
609
639
case __NR_getrusage:
610
640
case __NR_personality: // Can change its personality as well.
611
641
case __NR_prlimit64: // Like setrlimit / getrlimit.
@@ -615,7 +645,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
615
645
case __NR_times:
616
646
return true;
617
647
default:
618
- @@ -826,7 +835 ,7 @@ bool SyscallSets::IsDebug(int sysno) {
648
+ @@ -826,7 +837 ,7 @@ bool SyscallSets::IsDebug(int sysno) {
619
649
620
650
bool SyscallSets::IsGlobalSystemStatus(int sysno) {
621
651
switch (sysno) {
@@ -624,7 +654,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
624
654
case __NR__sysctl:
625
655
case __NR_sysfs:
626
656
#endif
627
- @@ -844,7 +853 ,7 @@ bool SyscallSets::IsGlobalSystemStatus(int sysno) {
657
+ @@ -844,7 +855 ,7 @@ bool SyscallSets::IsGlobalSystemStatus(int sysno) {
628
658
629
659
bool SyscallSets::IsEventFd(int sysno) {
630
660
switch (sysno) {
@@ -633,7 +663,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
633
663
case __NR_eventfd:
634
664
#endif
635
665
case __NR_eventfd2:
636
- @@ -896,7 +905 ,8 @@ bool SyscallSets::IsKeyManagement(int sysno) {
666
+ @@ -896,7 +907 ,8 @@ bool SyscallSets::IsKeyManagement(int sysno) {
637
667
}
638
668
639
669
#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
@@ -643,7 +673,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
643
673
bool SyscallSets::IsSystemVSemaphores(int sysno) {
644
674
switch (sysno) {
645
675
case __NR_semctl:
646
- @@ -915,7 +925 ,7 @@ bool SyscallSets::IsSystemVSemaphores(int sysno) {
676
+ @@ -915,7 +927 ,7 @@ bool SyscallSets::IsSystemVSemaphores(int sysno) {
647
677
#endif
648
678
649
679
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
@@ -652,7 +682,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
652
682
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
653
683
// These give a lot of ambient authority and bypass the setuid sandbox.
654
684
bool SyscallSets::IsSystemVSharedMemory(int sysno) {
655
- @@ -932,7 +942 ,8 @@ bool SyscallSets::IsSystemVSharedMemory(int sysno) {
685
+ @@ -932,7 +944 ,8 @@ bool SyscallSets::IsSystemVSharedMemory(int sysno) {
656
686
#endif
657
687
658
688
#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
@@ -662,7 +692,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
662
692
bool SyscallSets::IsSystemVMessageQueue(int sysno) {
663
693
switch (sysno) {
664
694
case __NR_msgctl:
665
- @@ -963,7 +974 ,8 @@ bool SyscallSets::IsSystemVIpc(int sysno) {
695
+ @@ -963,7 +976 ,8 @@ bool SyscallSets::IsSystemVIpc(int sysno) {
666
696
667
697
bool SyscallSets::IsAnySystemV(int sysno) {
668
698
#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
@@ -672,7 +702,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
672
702
return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) ||
673
703
IsSystemVSharedMemory(sysno);
674
704
#elif defined(__i386__) || \
675
- @@ -1000,7 +1012 ,7 @@ bool SyscallSets::IsAdvancedScheduler(int sysno) {
705
+ @@ -1000,7 +1014 ,7 @@ bool SyscallSets::IsAdvancedScheduler(int sysno) {
676
706
bool SyscallSets::IsInotify(int sysno) {
677
707
switch (sysno) {
678
708
case __NR_inotify_add_watch:
@@ -681,7 +711,7 @@ index 4f56b6e0d10db..c550967a4309a 100644
681
711
case __NR_inotify_init:
682
712
#endif
683
713
case __NR_inotify_init1:
684
- @@ -1135,7 +1147 ,7 @@ bool SyscallSets::IsMisc(int sysno) {
714
+ @@ -1135,7 +1149 ,7 @@ bool SyscallSets::IsMisc(int sysno) {
685
715
#if defined(__x86_64__)
686
716
case __NR_tuxcall:
687
717
#endif
0 commit comments