New issue
Advanced search Search tips

Issue 910690 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Output more information about DLC modules from dlcservice_util --list

Project Member Reported by chowes@google.com, Nov 30

Issue description

We might want to parse metadata from the manifest at /opt/google/dlc/${DLC_ID}, e.g. version number, size, etc.

 
Owner: ahass...@chromium.org
There is a patch up on gerrit, but it can't go in until we have the manifest parsing features of ImageLoader exported as a shared library.
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/56ecef146a6ec17d577ef41ca3a70a236f9c6802

commit 56ecef146a6ec17d577ef41ca3a70a236f9c6802
Author: Colin Howes <chowes@google.com>
Date: Wed Dec 19 09:12:40 2018

dlcservice: print details about installed DLC

dlcservice_util: more detailed information when listing installed DLCs.
Add a --oneline argument to only display the name of installed DLCs,
without more details. --oneline is *off* by default.

Also refactor some information into utils.cc since it's used in more
than one place.

Example output:

localhost ~ # dlcservice_util --list
Installed DLC modules:
0xc0ffee
	name: dlctest
	id: 0xc0ffee
	version: 0.1
	manifest version: 1
	preallocated size: 4194304
	size: 57344
	image type: dlc
	removable: true
	fs-type: squashfs
localhost ~ #

BUG=chromium:910690
TEST=Install DLC and run dlcservice_util --list
TEST=Install DLC and run dlcservice_util --list --oneline
TEST=FEATURES=test emerge-nocturne dlcservice
CQ-DEPEND=CL:1376136

Change-Id: I5861c7e0f77bfffa61f6aae83aeac7fb1a78ff9d
Reviewed-on: https://chromium-review.googlesource.com/1372588
Commit-Ready: Nicolas Norvez <norvez@chromium.org>
Tested-by: Nicolas Norvez <norvez@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[add] https://crrev.com/56ecef146a6ec17d577ef41ca3a70a236f9c6802/dlcservice/utils_test.cc
[modify] https://crrev.com/56ecef146a6ec17d577ef41ca3a70a236f9c6802/dlcservice/dlc_service.cc
[modify] https://crrev.com/56ecef146a6ec17d577ef41ca3a70a236f9c6802/dlcservice/utils.cc
[modify] https://crrev.com/56ecef146a6ec17d577ef41ca3a70a236f9c6802/dlcservice/utils.h
[modify] https://crrev.com/56ecef146a6ec17d577ef41ca3a70a236f9c6802/dlcservice/BUILD.gn
[modify] https://crrev.com/56ecef146a6ec17d577ef41ca3a70a236f9c6802/dlcservice/tools/dlc_service_util.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Dec 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/206e024cf768c591051d1623d9f9c92e89f02bc9

commit 206e024cf768c591051d1623d9f9c92e89f02bc9
Author: Nicolas Norvez <norvez@chromium.org>
Date: Wed Dec 19 09:12:40 2018

dlcservice: add socket/connect to amd64 seccomp

amd64 seccomp policy is missing socket, connect and sendto syscalls for
D-Bus communications. Running dlcservice through strace:

localhost ~ # grep connect /tmp/strace.log
connect(9, {sa_family=AF_UNIX, sun_path="/run/dbus/system_bus_socket"},
29) = 0
connect(10, {sa_family=AF_UNIX, sun_path="/dev/log"}, 110) = 0
localhost ~ # grep socket /tmp/strace.log
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 9
connect(9, {sa_family=AF_UNIX, sun_path="/run/dbus/system_bus_socket"},
29) = 0
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 10
localhost ~ # grep sendto /tmp/strace.log
sendto(9, "\0", 1, MSG_NOSIGNAL, NULL, 0) = 1
sendto(9, "AUTH EXTERNAL 30\r\n", 18, MSG_NOSIGNAL, NULL, 0) = 18
sendto(9, "NEGOTIATE_UNIX_FD\r\n", 19, MSG_NOSIGNAL, NULL, 0) = 19
sendto(9, "BEGIN\r\n", 7, MSG_NOSIGNAL, NULL, 0) = 7
sendto(10, "<11>Dec 18 11:20:10 dlcservice[3"..., 508, MSG_NOSIGNAL,
NULL, 0) = 508
sendto(10, "<11>Dec 18 11:20:10 dlcservice[3"..., 459, MSG_NOSIGNAL,
NULL, 0) = 459
sendto(10, "<11>Dec 18 11:20:10 dlcservice[3"..., 71, MSG_NOSIGNAL,
NULL, 0) = 71
sendto(10, "<11>Dec 18 11:20:10 dlcservice[3"..., 224, MSG_NOSIGNAL,
NULL, 0) = 224
sendto(10, "<10>Dec 18 11:20:10 dlcservice[3"..., 179, MSG_NOSIGNAL,
NULL, 0) = 179
localhost ~ #

BUG=chromium:910690
TEST=build/run dlcservice on nocturne (kernel 4.4)

Change-Id: Ida704b5ea23563a69251ba6e5df1cf8fe0019e2d
Reviewed-on: https://chromium-review.googlesource.com/1380974
Commit-Ready: Nicolas Norvez <norvez@chromium.org>
Tested-by: Nicolas Norvez <norvez@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/206e024cf768c591051d1623d9f9c92e89f02bc9/dlcservice/seccomp/dlcservice-seccomp-amd64.policy

Sign in to add a comment