Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Issue 1617763002: sandbox arm64: align stack 16 bytes (Closed)

Created:
4 years, 11 months ago by Riku Voipio
Modified:
4 years, 11 months ago
CC:
chromium-reviews, jln+watch_chromium.org, rickyz+watch_chromium.org, vmpstr+watch_chromium.org, Mark Mentovai
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

sandbox arm64: align stack 16 bytes chrome fails to start with user namespace sandboxing: [866:866:0120/134742:FATAL:zygote_host_impl_linux.cc(182)] Check failed: process.IsValid(). Failed to launch zygote process With strace.. clone(child_stack=0x7ffd28fd98, flags=CLONE_NEWUSER|CLONE_NEWPID|CLONE_NEWNET|SIGCHLD) = -1 EINVAL (Invalid argument) Which compared to kernel sources[1], shows that stack needs to be 16 bytes aligned. because stack grows downward, this patch assumes PTHREAD_STACK_MIN is dividable by 16 too. [1] http://lxr.free-electrons.com/source/arch/arm64/kernel/process.c#L267 BUG=581018 R=keescook@chromium.org,jln@chromium.org,rsesek@chromium.org,thakis@chromium.org TEST=base_unittests ProcessUtilTest.* and sandbox_linux_unittests NamespaceSandboxTest.* Committed: https://crrev.com/f352d974e43a73fed311c60c8fcb4dd043b16093 Cr-Commit-Position: refs/heads/master@{#371809}

Patch Set 1 #

Patch Set 2 : sandbox arm64: align stack 16 bytes #

Total comments: 1

Patch Set 3 : v3: changed to using ALIGNAS(16) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -2 lines) Patch
M base/process/launch_posix.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sandbox/linux/services/credentials.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 17 (6 generated)
Riku Voipio
4 years, 11 months ago (2016-01-21 12:42:21 UTC) #1
Kees Cook
lgtm
4 years, 11 months ago (2016-01-21 19:25:48 UTC) #2
Nico
lgtm (is there any harm in always aligning this?)
4 years, 11 months ago (2016-01-21 19:39:00 UTC) #3
rickyz (no longer on Chrome)
lgtm as well, and +1 to just always aligning it.
4 years, 11 months ago (2016-01-22 04:19:47 UTC) #5
Riku Voipio
v2 patch with 16 aligned everywhere.
4 years, 11 months ago (2016-01-25 13:30:22 UTC) #7
Nico
lgtm https://codereview.chromium.org/1617763002/diff/20001/base/process/launch_posix.cc File base/process/launch_posix.cc (right): https://codereview.chromium.org/1617763002/diff/20001/base/process/launch_posix.cc#newcode739 base/process/launch_posix.cc:739: char stack_buf[PTHREAD_STACK_MIN] __attribute__((aligned(16))); If you want you can ...
4 years, 11 months ago (2016-01-25 15:13:24 UTC) #8
Riku Voipio
On 2016/01/25 15:13:24, Nico wrote: > lgtm > > https://codereview.chromium.org/1617763002/diff/20001/base/process/launch_posix.cc > File base/process/launch_posix.cc (right): > ...
4 years, 11 months ago (2016-01-27 13:59:55 UTC) #9
Nico
base/ still lgtm
4 years, 11 months ago (2016-01-27 14:44:25 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1617763002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1617763002/40001
4 years, 11 months ago (2016-01-27 15:22:31 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 11 months ago (2016-01-27 17:14:04 UTC) #15
commit-bot: I haz the power
4 years, 11 months ago (2016-01-27 17:15:07 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f352d974e43a73fed311c60c8fcb4dd043b16093
Cr-Commit-Position: refs/heads/master@{#371809}

Powered by Google App Engine
This is Rietveld 408576698