Snap for 10209341 from 6576586ae0174555d69f4a105b952b48b71f58ab to mainline-healthfitness-release
Change-Id: I6fccfe0592b211c994be6774b3212da8be37694a
diff --git a/Android.bp b/Android.bp
index 25eb12f..fc25a10 100644
--- a/Android.bp
+++ b/Android.bp
@@ -460,6 +460,9 @@
},
},
data: ["test/*"],
+ test_options: {
+ tags: ["no-remote"],
+ }
}
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 254a062..c7d9e54 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -3,3 +3,6 @@
[Builtin Hooks Options]
clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c
+
+[Hook Scripts]
+repo_upload_warning = ./tools/repo_upload_warning ${PREUPLOAD_COMMIT}
diff --git a/gen_syscalls-inl.h b/gen_syscalls-inl.h
index aee71e2..e631424 100644
--- a/gen_syscalls-inl.h
+++ b/gen_syscalls-inl.h
@@ -86,12 +86,21 @@
#elif __arm64__
#define __NR_rseq 293
#endif
+#endif /* __NR_rseq */
#ifndef __NR_clone3
#define __NR_clone3 435
#endif
-#endif /* __NR_rseq */
+#ifndef __NR_userfaultfd
+#ifdef __x86_64__
+#define __NR_userfaultfd 323
+#elif __i386__
+#define __NR_userfaultfd 374
+#elif __arm64__
+#define __NR_userfaultfd 282
+#endif
+#endif /* __NR_userfaultfd */
#ifndef __NR_membarrier
#ifdef __x86_64__
diff --git a/tools/generate_constants_json.py b/tools/generate_constants_json.py
index 3fe8684..005fff8 100755
--- a/tools/generate_constants_json.py
+++ b/tools/generate_constants_json.py
@@ -130,6 +130,8 @@
constants_json['arch_name'] = 'arm64'
elif constants_json['arch_nr'] == 0x40000028:
constants_json['arch_name'] = 'arm'
+ elif constants_json['arch_nr'] == 0xC00000F3:
+ constants_json['arch_name'] = 'riscv64'
else:
raise ValueError('Unknown architecture: 0x%08X' %
constants_json['arch_nr'])
diff --git a/tools/repo_upload_warning b/tools/repo_upload_warning
new file mode 100755
index 0000000..3333eba
--- /dev/null
+++ b/tools/repo_upload_warning
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+if git log -n 1 --format='%B' $1 | grep -q -E "^Ignore-Upstream-First: .+" ; then
+ # Change is explicitly marked as ok to skip upstream
+ exit 0
+elif git log -n 1 --format='%s' $1 | grep -q -E "^(UPSTREAM|Upstream): .+" ; then
+ # Change is explicitly marked as coming from the upstream
+ exit 0
+fi
+
+echo "WARNING: Here is not the upstream."
+echo ""
+echo "Do not submit changes to this repository directly. Please submit changes to upstream"
+echo "from https://chromium-review.googlesource.com/q/project:chromiumos/platform/minijail"
+echo ""
+echo "If the change is from the upstream, please prepend \"UPSTREAM: \" to the subject."
+echo ""
+echo "If indeed necessary, please add \"Ignore-Upstream-First: <reason>\" to commit message"
+echo "to bypass."
+
+exit 1