32 Commits
Author SHA1 Message Date
Oleh PrypinandgVisor bot e37e6814d3 Remove srcs_version and python_version attributes, as they already default to "PY3"
PiperOrigin-RevId: 723402826
2025-02-05 01:09:37 -08:00
Richard LevasseurandgVisor bot 356c4f8601 Internal change.
PiperOrigin-RevId: 559742575
2023-08-24 07:09:55 -07:00
Adin ScannellandgVisor bot 1ceb814544 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Adin ScannellandgVisor bot 6a4908b262 Process nogo targets across all architectures.
PiperOrigin-RevId: 511343590
2023-02-21 17:06:02 -08:00
Adin ScannellandgVisor bot 0781095639 Use arch_genrule for arch-specific VDSO data.
Note that the select_arch macro changed in order to allow for its use within
a rule below arch_genrule. The command line settings were being manipulated in
a way that did not correctly propagate the select_arch select constraints.

PiperOrigin-RevId: 499651425
2023-01-04 18:36:14 -08:00
Chen Hui 4318924054 vdso: support more flags for clock_gettime() vdso interface
Current vdso(implemented by sentry, and used by the real application)
is a partial implimentation. More specifically, the clock_gettime()
vdso interface only works for CLOCK_REALTIME, CLOCK_BOOTTIME, and
CLOCK_MONOTONIC.

So we support more flags for clock_gettime() vdso interface here, like
CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_RAW, and CLOCK_MONOTONIC_COARSE,
to accelerate clock_gettime() call of real application.

And their implementations refer to the internal syscall of gvisor.
See function getClock() in pkg/sentry/syscalls/linux/sys_time.go.

Signed-off-by: Chen Hui <cedriccchen@tencent.com>
2022-09-14 15:04:50 +08:00
Adin ScannellandgVisor bot 0e492a2b5e Refactor nogo and provide facts render.
This change makes the core nogo package less of a "catch all", and splits
functionality into multiple packages. Instead of separate binaries for each
function, a single "cli" package is added with subcommands, and the core
starlark wrappers are also refactored to minimize redundancy.

The new "cli" package also adds support for a "render" command, which
allows factors to be rendered via a Go text template. This is useful for
debugging, but also allows code generation to be updated to use this
mechanism. This eliminates the use of a QEMU wrapper for the older
arch_genrule, and allows the use of a native bazel transition to extract
facts for the appropriate generated file. In other words, the correct facts
will be rendered for generating XXX_arm64.s, even on amd64.

PiperOrigin-RevId: 422846459
2022-01-19 10:26:27 -08:00
Andrei VaginandgVisor bot aa06a0cc20 vdso: remove empty note section
An empty note section looks weird and can confuse some tools. For example,
we've seen this in https://reviews.llvm.org/D116639.

PiperOrigin-RevId: 420093551
2022-01-06 10:36:14 -08:00
gVisor bot 660a1a1028 Internal change.
PiperOrigin-RevId: 309801320
2020-05-04 12:49:29 -07:00
gVisor bot eba086642e Merge pull request #1818 from lubinszARM:pr_signal_1
PiperOrigin-RevId: 307680200
2020-04-21 14:26:08 -07:00
Bin Lu fe001edb14 Arm64: VDSO support for signal
The vdso is enabled, so we can use the sigreturn trampolines
the vdso provides in arch module.

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-04-17 05:07:59 -04:00
Bin Lu 99e395e3b1 passed the syscall test case 'clock_getres' on Arm64 platform
Test command:
	bazel test //test/syscalls:clock_getres_test_runsc_ptrace

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-03-02 10:59:13 +08:00
Michael PrattandgVisor bot 74e04506a4 Prefer Type& over Type &
And Type* over Type *. This is basically a whitespace only change.

gVisor code already prefers left-alignment of pointers and references, but
clang-format formats for consistency with the majority of a file, and some
files leaned the wrong way. This is a one-time pass to make us completely
conforming.

Autogenerated with:

$ find . \( -name "*.cc" -or -name "*.c" -or -name "*.h" \) \
    | xargs clang-format -i -style="{BasedOnStyle: Google,  \
        DerivePointerAlignment: false, PointerAlignment: Left}"

PiperOrigin-RevId: 291972421
2020-01-28 11:18:17 -08:00
Adin ScannellandgVisor bot d29e59af9f Standardize on tools directory.
PiperOrigin-RevId: 291745021
2020-01-27 12:21:00 -08:00
Michael PrattandgVisor bot 803437c96b Upgrade to Python 3
Python 3 tools must be listed in exec_tools for genrules.

PiperOrigin-RevId: 286241702
2019-12-18 12:23:03 -08:00
gVisor bot f544509c01 Merge pull request #450 from Pixep:feature/add-clock-boottime-as-monotonic
PiperOrigin-RevId: 258996346
2019-07-19 10:44:45 -07:00
Michael PrattandgVisor bot 5b41ba5d0e Fix various spelling issues in the documentation
Addresses obvious typos, in the documentation only.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/gvisor/pull/443 from Pixep:fix/documentation-spelling 4d0688164eafaf0b3010e5f4824b35d1e7176d65
PiperOrigin-RevId: 255477779
2019-06-27 14:25:50 -07:00
Adrien Leravat 3688e6e99d Add CLOCK_BOOTTIME as a CLOCK_MONOTONIC alias
Makes CLOCK_BOOTTIME available with
* clock_gettime
* timerfd_create
* clock_gettime vDSO

CLOCK_BOOTTIME is implemented as an alias to CLOCK_MONOTONIC.
CLOCK_MONOTONIC already keeps track of time across save
and restore. This is the closest possible behavior to Linux
CLOCK_BOOTIME, as there is no concept of suspend/resume.

Updates google/gvisor#218
2019-06-24 21:14:38 -07:00
Michael PrattandShentubot 4d52a55201 Change copyright notice to "The gVisor Authors"
Based on the guidelines at
https://opensource.google.com/docs/releasing/authors/.

1. $ rg -l "Google LLC" | xargs sed -i 's/Google LLC.*/The gVisor Authors./'
2. Manual fixup of "Google Inc" references.
3. Add AUTHORS file. Authors may request to be added to this file.
4. Point netstack AUTHORS to gVisor AUTHORS. Drop CONTRIBUTORS.

Fixes #209

PiperOrigin-RevId: 245823212
Change-Id: I64530b24ad021a7d683137459cafc510f5ee1de9
2019-04-29 14:26:23 -07:00
Nicolas LacasseandShentubot f4ce43e1f4 Allow and document bug ids in gVisor codebase.
PiperOrigin-RevId: 245818639
Change-Id: I03703ef0fb9b6675955637b9fe2776204c545789
2019-04-29 14:04:14 -07:00
GooglerandShentubot 38e6276447 n/a
PiperOrigin-RevId: 245810347
Change-Id: Ia5f4bb268a8207bd2a7d4c77c83cdfbe1483c64f
2019-04-29 13:19:51 -07:00
Haibo XuandShentubot f4d434c180 Enable vDSO support on arm64.
Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: I20103cd6d193431ab7e8120005da1f567b9bc2eb
PiperOrigin-RevId: 244280119
2019-04-18 16:22:08 -07:00
Michael PrattandShentubot cc48969bb7 Internal change
PiperOrigin-RevId: 242978508
Change-Id: I0ea59ac5ba1dd499e87c53f2e24709371048679b
2019-04-10 18:00:18 -07:00
GooglerandShentubot 0327931ca4 Internal change.
PiperOrigin-RevId: 241350917
Change-Id: Ieacaa9ce2e41e22f1bae8900170879f549606782
2019-04-01 10:29:20 -07:00
GooglerandShentubot 66181f3de9 Add //tools/cpp:cc_flags to the toolchains attribute.
This is so that CC_FLAGS will be resolved properly.

After the --incompatible_disable_genrule_cc_toolchain_dependency flag is
flipped, Bazel will no longer be providing CC_FLAGS to genrule by default.

PiperOrigin-RevId: 240595715
Change-Id: I067334051e89f7ec006a6b6b3d2f4188911ac2db
2019-03-27 10:50:02 -07:00