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

Issue 1293793009: Reland "Non-SFI mode: Add Linux asynchronous signal support" (Closed)

Created:
5 years, 4 months ago by Luis Héctor Chávez
Modified:
5 years, 4 months ago
Reviewers:
Mark Seaborn
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/src/native_client.git@master
Target Ref:
refs/heads/master
Project:
nacl
Visibility:
Public.

Description

Reland "Non-SFI mode: Add Linux asynchronous signal support" This change adds a mechanism to both receive and send signals to other threads in the process. A single signal is implemented with no option to mask it, but user code can use this to multiplex multiple signals and implement something that looks more like POSIX. Enabling signals will require allowing the tgkill system call (with the current pid and SIGUSR1 as signum) and adding the CLONE_PARENT_SETTID flag to clone. * Refactored some functions common to both signal and exception handling from src/nonsfi/linux/irt_exception_handling.c to src/nonsfi/linux/irt_signal_handling.c. That way, other code can still call |nonsfi_initialize_signal_handler| and it will install both. * Added a test for user async-signals. * Added documentation for this feature in documentation/nonsfi_mode_async_signals.txt BUG=https://code.google.com/p/nativeclient/issues/detail?id=4065 TEST=./scons run_user_async_signal_test_irt bitcode=1 nonsfi_nacl=1 \ --mode=nacl,dbg-host,nacl_irt_test [platform={arm,x86_32}] TEST=git try Committed: https://chromium.googlesource.com/native_client/src/native_client/+/821cf4bb69650569eed52c7fa6309333c1f72654

Patch Set 1 #

Patch Set 2 : Fixed races on thread termination and removed the broken FP-restoration code #

Total comments: 8

Patch Set 3 : Docs/comments updated #

Total comments: 2

Patch Set 4 : Updated documentation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+920 lines, -360 lines) Patch
M SConstruct View 1 chunk +1 line, -0 lines 0 comments Download
A documentation/nonsfi_mode_async_signals.txt View 1 2 3 1 chunk +56 lines, -0 lines 0 comments Download
M src/nonsfi/irt/irt.gyp View 1 chunk +1 line, -1 line 0 comments Download
M src/nonsfi/irt/irt_interfaces.c View 9 chunks +43 lines, -5 lines 0 comments Download
D src/nonsfi/linux/irt_exception_handling.c View 1 chunk +0 lines, -295 lines 0 comments Download
A src/nonsfi/linux/irt_signal_handling.h View 1 chunk +23 lines, -0 lines 0 comments Download
A + src/nonsfi/linux/irt_signal_handling.c View 1 8 chunks +255 lines, -37 lines 0 comments Download
M src/nonsfi/linux/linux_pthread_private.h View 2 chunks +2 lines, -1 line 0 comments Download
M src/nonsfi/linux/linux_pthread_private.c View 4 chunks +23 lines, -6 lines 0 comments Download
M src/nonsfi/linux/linux_sys_private.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/nonsfi/linux/linux_sys_private.c View 5 chunks +9 lines, -5 lines 0 comments Download
M src/nonsfi/linux/linux_syscall_defines.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/nonsfi/linux/nacl.scons View 1 chunk +1 line, -1 line 0 comments Download
M src/public/linux_syscalls/sys/syscall.h View 2 chunks +4 lines, -0 lines 0 comments Download
M src/public/nonsfi/irt_exception_handling.h View 1 chunk +6 lines, -8 lines 0 comments Download
A src/public/nonsfi/irt_signal_handling.h View 1 chunk +22 lines, -0 lines 0 comments Download
M src/untrusted/irt/irt.h View 1 2 3 chunks +74 lines, -0 lines 0 comments Download
M tests/nonsfi/nacl.scons View 1 chunk +9 lines, -0 lines 0 comments Download
A tests/nonsfi/user_async_signal_test.cc View 1 2 1 chunk +388 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
Luis Héctor Chávez
Please take a look. The previous version of the change made some bots fail (not ...
5 years, 4 months ago (2015-08-20 00:14:46 UTC) #2
Mark Seaborn
Some nits... https://codereview.chromium.org/1293793009/diff/20001/documentation/nonsfi_mode_async_signals.txt File documentation/nonsfi_mode_async_signals.txt (right): https://codereview.chromium.org/1293793009/diff/20001/documentation/nonsfi_mode_async_signals.txt#newcode54 documentation/nonsfi_mode_async_signals.txt:54: thread_create, or belonged to a thread that ...
5 years, 4 months ago (2015-08-20 15:44:30 UTC) #3
Luis Héctor Chávez
https://codereview.chromium.org/1293793009/diff/20001/documentation/nonsfi_mode_async_signals.txt File documentation/nonsfi_mode_async_signals.txt (right): https://codereview.chromium.org/1293793009/diff/20001/documentation/nonsfi_mode_async_signals.txt#newcode54 documentation/nonsfi_mode_async_signals.txt:54: thread_create, or belonged to a thread that has already ...
5 years, 4 months ago (2015-08-20 16:13:49 UTC) #4
Mark Seaborn
LGTM https://codereview.chromium.org/1293793009/diff/40001/documentation/nonsfi_mode_async_signals.txt File documentation/nonsfi_mode_async_signals.txt (right): https://codereview.chromium.org/1293793009/diff/40001/documentation/nonsfi_mode_async_signals.txt#newcode55 documentation/nonsfi_mode_async_signals.txt:55: send_async_signal() fail with ESRCH. Using the ID of ...
5 years, 4 months ago (2015-08-20 21:42:35 UTC) #5
Luis Héctor Chávez
https://codereview.chromium.org/1293793009/diff/40001/documentation/nonsfi_mode_async_signals.txt File documentation/nonsfi_mode_async_signals.txt (right): https://codereview.chromium.org/1293793009/diff/40001/documentation/nonsfi_mode_async_signals.txt#newcode55 documentation/nonsfi_mode_async_signals.txt:55: send_async_signal() fail with ESRCH. Using the ID of a ...
5 years, 4 months ago (2015-08-20 21:50:54 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1293793009/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1293793009/60001
5 years, 4 months ago (2015-08-21 03:24:21 UTC) #9
commit-bot: I haz the power
5 years, 4 months ago (2015-08-21 03:25:25 UTC) #10
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/native_client/src/native_client/+/821cf4bb6...

Powered by Google App Engine
This is Rietveld 408576698