Commit graph

6 commits

Author SHA1 Message Date
Dennis Kempin
d05bcbe9e0 Uprev all submodules
This fixes the annoying __pycache__ files virglrenderer used to
create.

BUG=b:200554399
TEST=./tools/presubmit passes

Change-Id: Ib5bfa5205f0b1432243ef53ec1b5a14d6cdd10d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3232278
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-10-19 19:12:53 +00:00
Dennis Kempin
3b3545b2c3 Upgrade ci containers to bullseye and clean up
We no longer need to build dependencies from source and provide them
via pkg-config, this simplifies much of our builder container setup.

As debian bullseye got promoted to stable, we can now also simplify
further by just using bullseye stable instead of mixing stable and
testing packages.

BUG=b:181359683
TEST=./test_all

Change-Id: I2ce61992d5cfe6eb5dc3f0ec61920dcc5455ca40
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3141772
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-09-15 17:06:46 +00:00
Dennis Kempin
00bfcab3e8 Update tpm2-sys build.rs to support cross-compilation
Also removes the use of the hermetic flag in favor of not failing the
build if the submodule is not checked out.
This allows us to remove the tpm2 build from the build_environment
Makefile.

BUG=b:198293072
TEST=./test_all

Change-Id: Ide81e78efe0da3a1b64d4b8ef094a2e901f99ccf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3133623
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-09-01 01:59:09 +00:00
Dylan Reid
bedfa1edc8 tpm: Update libtpm2 to master
The git submodule needs to be updated to work with newer chroot libssl.

In addition, the new OpenSSL version uses the getrandom syscall, so it
needs to be added to the seccomp policies.

TEST=build_test works again, vm's boot with a --software-tpm

Change-Id: Ie3242e9fa4dba42bf6266e674f987d8c9dbc1dbe
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2316380
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
2020-07-24 08:08:21 +00:00
David Tolnay
de6b29ab9d tpm: Virtio tpm device
This CL adds a "tpm" Cargo cfg to crosvm which enables a TPM device
backed by libtpm2 simulator.

Tested by running the following inside cros_sdk:

    LIBRARY_PATH=~/src/minijail LD_LIBRARY_PATH=~/src/minijail \
        cargo run --release \
        --features tpm \
        -- \
        run \
        -r rootfs.ext4 \
        --seccomp-policy-dir seccomp/x86_64/ \
        -p init=/bin/bash \
        -p panic=-1 \
        --disable-sandbox \
        vmlinux.bin

with a Linux image built from CL:1387655.

The TPM self test completes successfully with the following output:

    https://paste.googleplex.com/5996075978588160?raw

Justin's TPM playground runs with the following trace output.

    https://paste.googleplex.com/4909751007707136?raw

Design doc: go/vtpm-for-glinux

TEST=ran TPM playground program inside crosvm
TEST=local kokoro
BUG=chromium:911799

Change-Id: I2feb24a3e38cba91f62c6d2cd1f378de4dd03ecf
Reviewed-on: https://chromium-review.googlesource.com/1387624
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2019-01-24 07:43:30 -08:00
David Tolnay
c49ef3e03b tpm: Add tpm2-sys crate
This CL adds a tpm2-sys crate that builds libtpm2 from source (from a
git submodule) using the existing Makefile and then links the generated
static library as -ltpm2.

For production builds there is a flag `RUSTFLAGS='--cfg hermetic'` to
disallow building our own libtpm2. Instead it will expect to find
libtpm2 installed in the standard system location. Building from the
libtpm2 submodule is a convenience only intended for developer
environments.

The functions exposed by tpm2-sys are the ones that will be necessary to
initialize a TPM simulator in crosvm and execute TPM commands. Trunks
uses the same functions for its simulator mode here:

    e4cf13c057/trunks/tpm_simulator_handle.cc

Tested by running:

    fn main() {
        unsafe {
            tpm2_sys::TPM_Manufacture(1);
        }
    }

inside cros_sdk. Libtpm2 cannot be built outside of cros_sdk because it
requires openssl 1.0.2p, whereas dev machines come with openssl 1.1.0j.

I have not yet added any dependency on tpm2-sys from crosvm, but when it
does get added it will be behind a tpm feature flag so that crosvm can
continue to build outside of cros_sdk just without tpm support.

I published num_cpus version 1.9.0 to chromeos-localmirror.

TEST=running the code snippet above as described
BUG=chromium:911799

Change-Id: I097729bc447f9dc95e39959a426d1ac42f46b16d
Reviewed-on: https://chromium-review.googlesource.com/1396280
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2019-01-13 03:23:13 -08:00