History log of /fuchsia/zircon/kernel/syscalls/task.cpp
Revision Date Author Comments
# 6a7a5d85 01-Aug-2018 George Kulakowski <kulakowski@google.com>

[task] Add a zx_task_suspend with the same behavior as zx_task_suspend_token

ZX-2184 #comment
Test: cq

Change-Id: I9de6de21acb57eea5f4d0f515d087cd92dce271e


# 003f5def 15-Jun-2018 Francois Rousseau <frousseau@google.com>

[debug] add thread states for fs/gs registers

also delete previously introduced "extra regs" state

ZX-2258 # step 1

TESTED=None (these states are not used at the moment)

Change-Id: I80cf642b82187c209a0f43aeb10052d3ed87016f


# 74cf5656 26-Jun-2018 Francois Rousseau <frousseau@google.com>

[thread] clang-format on fs/gs register related files

ran zircon/scripts/clang-fmt on all the files I am about to edit

ZX-2258 # initial re-formatting

TESTED=None

Change-Id: Id963c5415469078558035c6f28ed39ceff3affce


# 391f7a68 18-Jun-2018 George Kulakowski <kulakowski@google.com>

[thread] Allow, but do not require, ZX_RIGHT_MANAGE_THREAD to allow starting a thread

Change-Id: I6b1cafdffa1158e2b398dba24c4eeee2f08c596e


# f25b2ef0 11-Jun-2018 Adam Barth <abarth@chromium.org>

[syscalls] Add ZX_POL_NEW_PROCESS

Previously, we lacked a policy bit for controlling process creation.
We'll use this policy bit in the future to force clients through
fuchsia.process.Launcher.

Also, hide ZX_POL_MAX from userspace so we can add more policy bits in
the future.

TEST=spawn_launcher_test

Change-Id: Idcba7c7db595774bd10b227da41e4c7249bb83ea


# 571e8f43 07-Jun-2018 George Kulakowski <kulakowski@google.com>

[job] Remove unused zx_job_set_relative_importance

Change-Id: If267a668c17da073fd8c52cff57a51235366a7ad


# 5fb5a028 03-Jun-2018 Adam Barth <abarth@chromium.org>

[syscalls] zx_proces_start should always consume arg_handle

After this CL, zx_process_start always consumes the startup handle
passed to the started process, even in error cases.

ZX-2204 #comment

Change-Id: I10d35a12dec160a3da86df70e3246fd08bcffc64


# 159ff793 01-Mar-2018 Brett Wilson <brettw@chromium.org>

[debugger] Add thread state for FP regs and FS/GS

Adds FPU, vector, and "extra" states to the CPU states that can be
queried and set via zx_thread_read/write_state.

ZX-2101

Change-Id: Ic809077a62d963bab578ee76379deb0c1e0362c1


# 6ed375e9 30-May-2018 Benjamin Brittain <bwb@google.com>

[job] Revert "[job][right] Only use ZX_RIGHT_MANAGE_JOB for creating jobs"

This reverts commit 14012b9c9c39c1cccc61193ebd0472fdb2a59862.

Change-Id: If076d0ab32c3898250ab315d634c5d085d4f8e7c


# 14012b9c 24-May-2018 George Kulakowski <kulakowski@google.com>

[job][right] Only use ZX_RIGHT_MANAGE_JOB for creating jobs

Change-Id: Ie6674a11f3a2323de03c5d76790a5204a6371e54


# 9dd5b5f5 24-May-2018 Adam Barth <abarth@chromium.org>

[syscalls] Update parameter types and names

This CL updates the parameter types and names for a number of syscalls
to match the Zircon System API rubric. There's more work to do to make
all the syscalls conform to the rubric, but this change is a start.

Change-Id: I218ac5e7e0cbd80a8c69fef7891ad40b78b6b407


# f50bd8d0 22-May-2018 Carlos Pizano <cpu@google.com>

[zircon][clean-api] process return code

To have explicit size, in this case int64_t

Change-Id: I9d5bc3d5564787bd5a6146ae952126f6f856db7b


# ed84ac50 22-May-2018 George Kulakowski <kulakowski@google.com>

[jobs] Also check the MANAGE_JOB right for allowing job creation

Change-Id: I1933f93c8e1e7a9319e19768c5640334ff688d70


# 062f8629 30-Mar-2018 Carlos Pizano <cpu@google.com>

[zircon] thread priority

This is the low level part. There is an API today
but it only operates on the current thread. The
change here allows it to operate on any thread_t

Tests added via 'k thread_tests'

Change-Id: I79beafd15634bb95c69c87846c139da6caa189b8


# 79859a72 23-Feb-2018 Brett Wilson <brettw@chromium.org>

[threads] Add a token to suspend threads.

Suspending a thread will will return a handle to a token that allows resuming
that thread exactly once. This ensures that different clients suspending and
resuming threads don't stomp on each other's state.

Currently this is implemented as a separate API call to facilitate landing.
In the future task_suspend/resume will use the new signature and the *_token
versions will be deleted.

Refcounting is added on ThreadDispatcher for suspend/resume calls. This
will affect the legacy suspend/resume calls.

ZX-1072

Change-Id: I9ecc63409e2e7dcea733f3ec58db50c1e8b0210b


# e5d429fb 28-Mar-2018 Shai Barack <shayba@google.com>

[syscall][vmo] removal of zx_vmo_{read,write}() actual parameter 16/n

Plumb removal of actual further down.
Still need to plumb into sys_process_{read,write}_memory

ZX-1802

Change-Id: Ibba8ce14815f34a9ca08abf854996418a25d1a87


# be2ff272 28-Feb-2018 Carlos Pizano <cpu@google.com>

[zircon] enable zx_thread_set_priority by default

This (still an experiment) was disabled by default, change the
sense and the kernel cmdline flag name so people can still
experiment, but now badness is opt in. See bug for details.

ZX-940 #comment change flag sense.

Change-Id: I034100b319503ae7e810bb04289a42b2bbe117a4


# 250baf99 20-Feb-2018 Scott Graham <scottmg@chromium.org>

[debugger][vm] Fix process_(read|write)_memory offset clamp

f509df9187 clamped read/writes to the length of the associated VMAR, but
did not take into account the mapping being offset into the VMO. Fix
this and add a test.

Change-Id: Id2dd0551b88e06d2befd7de53b4737a8aa326808


# 8726db71 09-Feb-2018 Brett Wilson <brettw@chromium.org>

[debugger] Allow threads to be single stepped.

This adds a new thread state parameter to put the thread in single-step
mode (or not). The architecture-specific exception handlers use this
flag to enable or disable single-stepping on the thread before returning
from the exception.

On x86 this sets FLAGS.TF ("trap flag"). On ARM64, this sets
MDSCR_EL1.SS which causes the process state to be set to "single step"
upon exception return.

An alternative would be to standardize on the flags to enable
single-stepping like on X86. On ARM this would be to define bit 21 or
the saved CPSR flags bit to be "single step" and then set MDSCR_EL1
accordingly before returning from the exception. On ARM32 this bit is
defined, but on ARM64 it is always undefined and you can only control
the single step state indirectly.

While this alternate approach would have enabled us to avoid the new
bool on the thread structure, using a reserved bit on the flags seemed
like a bad idea that might bite us in the future (even if it's very
unlikely). This approach is also much cleaner from an API perspective
since there is a clear step state that is toggleable, rather than
relying on CPU-specific behavior (ARM clears the SS bit after doing a
step, x86 doesn't, for example).

Change-Id: I1ef441aca6728d7837098290106fdab07e178c4c


# 42336f9c 02-Feb-2018 Brett Wilson <brettw@chromium.org>

[debugger] Remove out param for thread_read_state

The size of data being read and written should always be known in advance by
both caller and callee.

Removes backward-compatibility definitions from debug.h since the API is
currently changing in a non-backwards-compatible-way and we need to update
callers anyway. There were many changes associated with removing some users of
these structs and defines.

Add thread_read_state and thread_write_state to the zx::thread class.

Change-Id: I6d7e428d337f2722c529b68074dff16356984d63


# 56aff58f 01-Feb-2018 Brett Wilson <brettw@chromium.org>

[debugger] Clarify thread state API

Firms up the contract for zx_read|write_thread_state and makes the state more
explicit for each platform.

The general register struct has been made for the current platform which
simplifies much fo the code.

The sizes are converted to size_t for consistency with other object calls.

Forwarding #defines and typedefs are included for downstream users until they
can be updated.

This will likely need to be revised somewhat again when we add more thread
states, which I plan to do in a followup.

Change-Id: I57e8e9979d073c8efdfaeb2683f9f83494d19abf


# f509df91 30-Jan-2018 Scott Graham <scottmg@chromium.org>

[kernel][vm] Make sys_process_(read|write)_memory() clamp to mapping end

Previously, process_(read|write)_memory() would read/write any amount
out of the VMO in which it was started. Instead, clamp the length to
the mapped region. This is still not a full solution, as an ideal API
would need to read from the correct VMO for each page in the region,
but it's slightly less unexpected behavior.

ZX-1631

Change-Id: I24d543fd867160479e8e59b2a4951b6a87774314


# db3f0191 22-Dec-2017 Todd Eisenberger <teisenbe@google.com>

[kernel][syscalls] Remove redundant filename prefix

All of these files are already in a directory named syscalls.

Change-Id: If4945b107c2ae9787e63dfbfe3750d7dfdba739b