chromium: fix sandbox large file flag constant for ppc64
This commit is contained in:
parent
bba182874a
commit
99b84b6cb5
1 changed files with 4 additions and 8 deletions
|
@ -249,19 +249,15 @@ index f51915edc..ca2f4f106 100644
|
||||||
// Ubuntu's version of glibc has a race condition in sem_post that can cause
|
// Ubuntu's version of glibc has a race condition in sem_post that can cause
|
||||||
// it to call futex(2) with bogus op arguments. To workaround this, we need
|
// it to call futex(2) with bogus op arguments. To workaround this, we need
|
||||||
// to allow those futex(2) calls to fail with EINVAL, instead of crashing the
|
// to allow those futex(2) calls to fail with EINVAL, instead of crashing the
|
||||||
@@ -246,9 +261,11 @@ ResultExpr RestrictFcntlCommands() {
|
@@ -248,6 +263,8 @@ ResultExpr RestrictFcntlCommands() {
|
||||||
// operator.
|
|
||||||
// Glibc overrides the kernel's O_LARGEFILE value. Account for this.
|
|
||||||
uint64_t kOLargeFileFlag = O_LARGEFILE;
|
uint64_t kOLargeFileFlag = O_LARGEFILE;
|
||||||
- if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips())
|
if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips())
|
||||||
+ if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips() \
|
|
||||||
+ || IsArchitecturePPC64())
|
|
||||||
kOLargeFileFlag = 0100000;
|
kOLargeFileFlag = 0100000;
|
||||||
|
+ else if (IsArchitecturePPC64())
|
||||||
|
+ kOLargeFileFlag = 0200000;
|
||||||
|
|
||||||
+
|
|
||||||
const Arg<int> cmd(1);
|
const Arg<int> cmd(1);
|
||||||
const Arg<long> long_arg(2);
|
const Arg<long> long_arg(2);
|
||||||
|
|
||||||
@@ -262,14 +279,23 @@ ResultExpr RestrictFcntlCommands() {
|
@@ -262,14 +279,23 @@ ResultExpr RestrictFcntlCommands() {
|
||||||
F_SETLKW,
|
F_SETLKW,
|
||||||
F_GETLK,
|
F_GETLK,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue