[PATCH v2 2/2] chromiumOSPackages: 81.12871.0.0-rc1 -> 83.13020.0.0-rc1

Alyssa Ross
2020-05-31T03:01:42Z

crosvm now needs the Minijail sources. However, it'll notice that a
Minijail package is provided via pkg-config, and then not actually use
those sources or build its own Minijail. It would be nice if the
Minijail we provide could be the same version as in Chromium OS, which
means bringing Minijail under chromiumOSPackages.

A couple of backports are no longer required; one to common-mk and one
to Linux.
---
v1 of this patch was corrupt, due to an editor misconfiguration that
made it strip trailing whitespace when I saved the patch after
annotating it.

Additionally, I've now DRYed the fetchFromGitiles calls in crosvm.

...ommon-mk-.gn-don-t-hardcode-env-path.patch | 4 +-
...-Suppress-Wrange-loop-analysis-warni.patch | 72 -----
.../linux/chromium-os/common-mk/default.nix | 1 -
.../linux/chromium-os/crosvm/default.nix | 34 ++-
.../os-specific/linux/chromium-os/default.nix | 4 +-
.../linux/chromium-os/modem-manager/next.nix | 5 +-
...er-don-t-leak-source-absolute-paths.patch} | 4 +-
...elier-use-stable-xdg-shell-protocol.patch} | 54 ++--
...melier-make-building-demos-optional.patch} | 4 +-
...er-Log-the-value-of-strerror-when-as.patch | 245 ------------------
.../linux/chromium-os/sommelier/default.nix | 7 +-
pkgs/os-specific/linux/chromium-os/update.py | 1 +
.../linux/chromium-os/upstream-info.json | 42 +--
...virtwl-Support-multiple-host-sockets.patch | 126 ---------
pkgs/os-specific/linux/kernel/patches.nix | 5 -
16 files changed, 83 insertions(+), 529 deletions(-)
delete mode 100644 pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
rename pkgs/os-specific/linux/chromium-os/sommelier/{0004-sommelier-don-t-leak-source-absolute-paths.patch => 0003-sommelier-don-t-leak-source-absolute-paths.patch} (82%)
rename pkgs/os-specific/linux/chromium-os/sommelier/{0005-sommelier-use-stable-xdg-shell-protocol.patch => 0004-sommelier-use-stable-xdg-shell-protocol.patch} (97%)
rename pkgs/os-specific/linux/chromium-os/sommelier/{0006-sommelier-make-building-demos-optional.patch => 0005-sommelier-make-building-demos-optional.patch} (94%)
delete mode 100644 pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
delete mode 100644 pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch

diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
index eb79e1ae8fa..347faecacf5 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
@@ -1,7 +1,7 @@
-From 56d3fe9520c1ef2a6400939f4deae06d9b5cdfc2 Mon Sep 17 00:00:00 2001
+From 22f33cfdfacc8c4536a8bf883b4c8b54e30599a3 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Sun, 24 Nov 2019 16:56:11 +0000
-Subject: [PATCH 1/7] common-mk: don't leak source-absolute paths
+Subject: [PATCH 1/5] common-mk: don't leak source-absolute paths

Source-absolute paths like //vm_tools/whatever were being leaked to
subprocesses, which of course didn't know how to understand them.
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
index 9d4843064d2..ba9e053dd72 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
@@ -1,7 +1,7 @@
-From ec1afec90fd8e391b93f53f0abd8bc11cdba0a32 Mon Sep 17 00:00:00 2001
+From 51ed7b957069bd3765222a466473c696755caa5e Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Sun, 24 Nov 2019 17:20:46 +0000
-Subject: [PATCH 2/7] common-mk: .gn: don't hardcode env path
+Subject: [PATCH 2/5] common-mk: .gn: don't hardcode env path

This is needlessly non-portable.
---
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
deleted file mode 100644
index f64969fc811..00000000000
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From b3add805d98e01488d71cbad51206f3a4949bb1c Mon Sep 17 00:00:00 2001
-From: Denis Nikitin <denik@chromium.org>
-Date: Wed, 5 Feb 2020 18:43:38 +0000
-Subject: [PATCH 3/7] Revert "common-mk: Suppress -Wrange-loop-analysis
- warning"
-
-This reverts commit 09298dce8d31b5744a83784d027a3fd1e312eb6d.
-
-Reason for revert: <The warning is fixed in the upstream starting from r382025>
-
-Original change's description:
-> common-mk: Suppress -Wrange-loop-analysis warning
->
-> Disable range-loop-analysis warning in platform2 to unblock llvm-next
-> builds failing with the following warning in libbrillo which can't be
-> easily fixed:
->
-> data_serialization.h:471:20: error: loop variable 'element' is always a
-> copy because the range of type 'const std::vector<bool, allocator<bool>
-> >' does not return a reference [-Werror,-Wrange-loop-analysis]
-> for (const auto& element : value) {
-> ^
-> use non-reference type
-> 'std::__1::__bit_const_reference<std::__1::vector<bool,
-> std::__1::allocator<bool> > >'
->
-> BUG=chromium:1042979
-> TEST=emerge-kevin libbrillo
->
-> Change-Id: If5b70cb1a836df325d3683217be4c841fc7a5516
-> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2008102
-> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
-> Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
-> Tested-by: Manoj Gupta <manojgupta@chromium.org>
-
-Bug: chromium:1042979
-Change-Id: Ib86d9f0d61b703d391f60824d8d2ef47eb60f345
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2039651
-Reviewed-by: Mike Frysinger <vapier@chromium.org>
-Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
-Commit-Queue: Denis Nikitin <denik@chromium.org>
-Tested-by: Denis Nikitin <denik@chromium.org>
-(cherry picked from commit f53a0117ded343295015e81db68bbe878fae5fac)
----
- common-mk/BUILD.gn | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/common-mk/BUILD.gn b/common-mk/BUILD.gn
-index 7c0601b18..dc02a6979 100644
---- a/common-mk/BUILD.gn
-+++ b/common-mk/BUILD.gn
-@@ -53,7 +53,6 @@ config("compiler_defaults") {
- cflags = [
- "-Wall",
- "-Wunused",
--
- # We use C99 array designators in C++ code. Our compilers support this
- # extension since C++ has no equivalent yet (as of C++20).
- "-Wno-c99-designator",
-@@ -65,9 +64,6 @@ config("compiler_defaults") {
- "-fvisibility=internal",
- "-Wa,--noexecstack",
- "-Wimplicit-fallthrough",
--
-- # TODO(crbug.com/1042979): Verify the warning when the issue gets fixed.
-- "-Wno-range-loop-analysis",
- ]
- cflags_c = [ "-std=gnu11" ] + external_cppflags + external_cxxflags
- cflags_cc = [ "-std=gnu++14" ] + external_cppflags + external_cxxflags
---
-2.26.2
-
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
index 73862bcaa97..cc72aab5d15 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
@@ -59,7 +59,6 @@ stdenv.mkDerivation ({
'') ([
./0001-common-mk-don-t-leak-source-absolute-paths.patch
./0002-common-mk-.gn-don-t-hardcode-env-path.patch
- ./0003-Revert-common-mk-Suppress-Wrange-loop-analysis-warni.patch
] ++ platform2Patches)}

patchShebangs common-mk
diff --git a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
index 8698ef67a83..d64dc316772 100644
--- a/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/crosvm/default.nix
@@ -8,11 +8,12 @@ let
else if isx86_64 then "x86_64"
else throw "no seccomp policy files available for host platform";

- crosvmSrc = fetchFromGitiles
- upstreamInfo.components."src/platform/crosvm";
-
- adhdSrc = fetchFromGitiles
- upstreamInfo.components."src/third_party/adhd";
+ getSrc = path: fetchFromGitiles upstreamInfo.components.${path};
+ srcs = lib.genAttrs [
+ "src/platform/crosvm"
+ "src/third_party/adhd"
+ "src/aosp/external/minijail"
+ ] getSrc;
in

rustPlatform.buildRustPackage rec {
@@ -22,28 +23,25 @@ in
unpackPhase = ''
runHook preUnpack

- mkdir -p chromiumos/platform chromiumos/third_party
-
- pushd chromiumos/platform
- unpackFile ${crosvmSrc}
- popd
-
- pushd chromiumos/third_party
- unpackFile ${adhdSrc}
- popd
+ ${lib.concatStringsSep "\n" (lib.mapAttrsToList (path: src: ''
+ mkdir -p ${dirOf path}
+ pushd ${dirOf path}
+ unpackFile ${src}
+ popd
+ '') srcs)}

chmod -R u+w -- "$sourceRoot"

runHook postUnpack
'';

- sourceRoot = "chromiumos/platform/crosvm";
+ sourceRoot = "src/platform/crosvm";

patches = [
./default-seccomp-policy-dir.diff
];

- cargoSha256 = "0lhivwvdihslwp81i3sa5q88p5hr83bzkvklrcgf6x73arwk8kdz";
+ cargoSha256 = "0wzqn2n4vyv3bk39079yg1zbnriagi5xns928bzdqmq9djdcj21i";

nativeBuildInputs = [ pkgconfig ];

@@ -68,8 +66,8 @@ in
"${linux}/${stdenv.hostPlatform.platform.kernelTarget}";

passthru = {
- inherit adhdSrc;
- src = crosvmSrc;
+ inherit srcs;
+ src = srcs.${sourceRoot};
updateScript = ../update.py;
};

diff --git a/pkgs/os-specific/linux/chromium-os/default.nix b/pkgs/os-specific/linux/chromium-os/default.nix
index db719e8b0f1..6eb9f335ff3 100644
--- a/pkgs/os-specific/linux/chromium-os/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/default.nix
@@ -30,9 +30,7 @@ let
};

linux_5_4 = callPackage ../kernel/linux-cros.nix {
- kernelPatches = linux_5_4.kernelPatches ++ (with kernelPatches; [
- virtwl_multiple_sockets
- ]);
+ inherit (linux_5_4) kernelPatches;
};

linux = self.linux_5_4;
diff --git a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
index 91aa18b3846..d40b2c9292e 100644
--- a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
+++ b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix
@@ -1,5 +1,5 @@
{ modemmanager, lib, fetchFromGitiles, upstreamInfo, autoreconfHook
-, libqmi, libxslt
+, autoconf-archive, libqmi, libxslt
}:

modemmanager.overrideAttrs (
@@ -11,7 +11,8 @@ modemmanager.overrideAttrs (
src = fetchFromGitiles
upstreamInfo.components."src/third_party/modemmanager-next";

- nativeBuildInputs = nativeBuildInputs ++ [ autoreconfHook libqmi libxslt ];
+ nativeBuildInputs = nativeBuildInputs ++
+ [ autoreconfHook autoconf-archive libqmi libxslt ];

passthru = passthru // {
updateScript = ../update.py;
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
similarity index 82%
rename from pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch
rename to pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
index 5d3ec4effe8..f5c5b8f3667 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-don-t-leak-source-absolute-paths.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0003-sommelier-don-t-leak-source-absolute-paths.patch
@@ -1,7 +1,7 @@
-From 1fa4de5b2228c40b25fd6333a74ae7535d73bcce Mon Sep 17 00:00:00 2001
+From 27381a5b01d14d3aca173cf66d3f13c8ea8f475c Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Sun, 1 Dec 2019 17:04:04 +0000
-Subject: [PATCH 4/7] sommelier: don't leak source-absolute paths
+Subject: [PATCH 3/5] sommelier: don't leak source-absolute paths

---
vm_tools/sommelier/wayland_protocol.gni | 2 +-
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-use-stable-xdg-shell-protocol.patch
similarity index 97%
rename from pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch
rename to pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-use-stable-xdg-shell-protocol.patch
index 5a6e57375a3..e107ab0f7e7 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-use-stable-xdg-shell-protocol.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0004-sommelier-use-stable-xdg-shell-protocol.patch
@@ -1,7 +1,7 @@
-From 5068e64b2fdedca0a4a9f1894335af8587c4c55a Mon Sep 17 00:00:00 2001
+From 119676ba72d8da73636978aa342e2e58c092384e Mon Sep 17 00:00:00 2001
From: Puck Meerburg <puck@puckipedia.com>
Date: Tue, 3 Dec 2019 18:06:14 +0000
-Subject: [PATCH 5/7] sommelier: use stable xdg-shell protocol
+Subject: [PATCH 4/5] sommelier: use stable xdg-shell protocol

From https://github.com/wayland-project/weston/commit/d8d9f5e6e16c8f6a3c06763d5f56c27dc9a6e52e:

@@ -1200,7 +1200,7 @@ index ecd0fc647..a3ba0d6e1 100644
+ sl_bind_host_xdg_wm_base);
}
diff --git a/vm_tools/sommelier/sommelier.c b/vm_tools/sommelier/sommelier.c
-index d87bced03..5e03d8978 100644
+index 98e101135..9a56f350d 100644
--- a/vm_tools/sommelier/sommelier.c
+++ b/vm_tools/sommelier/sommelier.c
@@ -35,7 +35,7 @@
@@ -1210,9 +1210,9 @@ index d87bced03..5e03d8978 100644
-#include "xdg-shell-unstable-v6-client-protocol.h"
+#include "xdg-shell-client-protocol.h"

- // Check that required macro definitions exist.
- #ifndef XWAYLAND_PATH
-@@ -272,14 +272,14 @@ void sl_sync_point_destroy(struct sl_sync_point* sync_point) {
+ #define errno_assert(rv) \
+ { \
+@@ -281,14 +281,14 @@ void sl_sync_point_destroy(struct sl_sync_point* sync_point) {
free(sync_point);
}

@@ -1232,7 +1232,7 @@ index d87bced03..5e03d8978 100644

static void sl_send_configure_notify(struct sl_window* window) {
xcb_configure_notify_event_t event = {
-@@ -442,8 +442,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
+@@ -451,8 +451,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
}

if (window->xdg_surface) {
@@ -1243,7 +1243,7 @@ index d87bced03..5e03d8978 100644
}
window->pending_config.serial = 0;

-@@ -454,8 +454,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
+@@ -463,8 +463,8 @@ int sl_process_pending_configure_acks(struct sl_window* window,
}

static void sl_internal_xdg_surface_configure(
@@ -1254,7 +1254,7 @@ index d87bced03..5e03d8978 100644

window->next_config.serial = serial;
if (!window->pending_config.serial) {
-@@ -476,16 +476,16 @@ static void sl_internal_xdg_surface_configure(
+@@ -485,16 +485,16 @@ static void sl_internal_xdg_surface_configure(
}
}

@@ -1274,7 +1274,7 @@ index d87bced03..5e03d8978 100644
int activated = 0;
uint32_t* state;
int i = 0;
-@@ -515,21 +515,21 @@ static void sl_internal_xdg_toplevel_configure(
+@@ -524,21 +524,21 @@ static void sl_internal_xdg_toplevel_configure(

window->allow_resize = 1;
wl_array_for_each(state, states) {
@@ -1300,7 +1300,7 @@ index d87bced03..5e03d8978 100644
window->allow_resize = 0;
}

-@@ -545,8 +545,8 @@ static void sl_internal_xdg_toplevel_configure(
+@@ -554,8 +554,8 @@ static void sl_internal_xdg_toplevel_configure(
}

static void sl_internal_xdg_toplevel_close(
@@ -1311,7 +1311,7 @@ index d87bced03..5e03d8978 100644
xcb_client_message_event_t event = {
.response_type = XCB_CLIENT_MESSAGE,
.format = 32,
-@@ -563,21 +563,21 @@ static void sl_internal_xdg_toplevel_close(
+@@ -572,21 +572,21 @@ static void sl_internal_xdg_toplevel_close(
XCB_EVENT_MASK_NO_EVENT, (const char*)&event);
}

@@ -1337,7 +1337,7 @@ index d87bced03..5e03d8978 100644
sl_internal_xdg_popup_configure, sl_internal_xdg_popup_done};

static void sl_window_set_wm_state(struct sl_window* window, int state) {
-@@ -645,15 +645,15 @@ void sl_window_update(struct sl_window* window) {
+@@ -654,15 +654,15 @@ void sl_window_update(struct sl_window* window) {
window->aura_surface = NULL;
}
if (window->xdg_toplevel) {
@@ -1356,7 +1356,7 @@ index d87bced03..5e03d8978 100644
window->xdg_surface = NULL;
}
window->realized = 0;
-@@ -664,8 +664,8 @@ void sl_window_update(struct sl_window* window) {
+@@ -673,8 +673,8 @@ void sl_window_update(struct sl_window* window) {
assert(host_surface);
assert(!host_surface->has_role);

@@ -1367,7 +1367,7 @@ index d87bced03..5e03d8978 100644

if (window->managed) {
if (window->transient_for != XCB_WINDOW_NONE) {
-@@ -727,11 +727,11 @@ void sl_window_update(struct sl_window* window) {
+@@ -736,11 +736,11 @@ void sl_window_update(struct sl_window* window) {
}

if (!window->xdg_surface) {
@@ -1384,7 +1384,7 @@ index d87bced03..5e03d8978 100644
}

if (ctx->aura_shell) {
-@@ -761,50 +761,50 @@ void sl_window_update(struct sl_window* window) {
+@@ -770,50 +770,50 @@ void sl_window_update(struct sl_window* window) {
// window is closed.
if (ctx->xwayland || !parent) {
if (!window->xdg_toplevel) {
@@ -1454,7 +1454,7 @@ index d87bced03..5e03d8978 100644
}

if ((window->size_flags & (US_POSITION | P_POSITION)) && parent &&
-@@ -1168,22 +1168,23 @@ static void sl_registry_handler(void* data,
+@@ -1177,22 +1177,23 @@ static void sl_registry_handler(void* data,
data_device_manager->host_global =
sl_data_device_manager_global_create(ctx);
}
@@ -1492,7 +1492,7 @@ index d87bced03..5e03d8978 100644
}
} else if (strcmp(interface, "zaura_shell") == 0) {
if (version >= MIN_AURA_SHELL_VERSION) {
-@@ -1290,13 +1291,13 @@ static void sl_registry_remover(void* data,
+@@ -1299,13 +1300,13 @@ static void sl_registry_remover(void* data,
ctx->data_device_manager = NULL;
return;
}
@@ -1513,7 +1513,7 @@ index d87bced03..5e03d8978 100644
return;
}
if (ctx->aura_shell && ctx->aura_shell->id == id) {
-@@ -1458,11 +1459,11 @@ static void sl_destroy_window(struct sl_window* window) {
+@@ -1467,11 +1468,11 @@ static void sl_destroy_window(struct sl_window* window) {
}

if (window->xdg_popup)
@@ -1528,7 +1528,7 @@ index d87bced03..5e03d8978 100644
if (window->aura_surface)
zaura_surface_destroy(window->aura_surface);

-@@ -1906,15 +1907,15 @@ static void sl_handle_configure_request(struct sl_context* ctx,
+@@ -1915,15 +1916,15 @@ static void sl_handle_configure_request(struct sl_context* ctx,
// that matching contents will arrive.
if (window->xdg_toplevel) {
if (window->pending_config.serial) {
@@ -1548,7 +1548,7 @@ index d87bced03..5e03d8978 100644
window->next_config.serial = 0;
window->next_config.mask = 0;
window->next_config.states_length = 0;
-@@ -2035,23 +2036,23 @@ static void sl_handle_configure_notify(struct sl_context* ctx,
+@@ -2044,23 +2045,23 @@ static void sl_handle_configure_notify(struct sl_context* ctx,
static uint32_t sl_resize_edge(int net_wm_moveresize_size) {
switch (net_wm_moveresize_size) {
case NET_WM_MOVERESIZE_SIZE_TOPLEFT:
@@ -1581,7 +1581,7 @@ index d87bced03..5e03d8978 100644
}
}

-@@ -2098,15 +2099,15 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2107,15 +2108,15 @@ static void sl_handle_client_message(struct sl_context* ctx,
return;

if (event->data.data32[2] == NET_WM_MOVERESIZE_MOVE) {
@@ -1600,7 +1600,7 @@ index d87bced03..5e03d8978 100644
seat->seat->last_serial, edge);
}
}
-@@ -2125,24 +2126,24 @@ static void sl_handle_client_message(struct sl_context* ctx,
+@@ -2134,24 +2135,24 @@ static void sl_handle_client_message(struct sl_context* ctx,

if (changed[ATOM_NET_WM_STATE_FULLSCREEN]) {
if (action == NET_WM_STATE_ADD)
@@ -1630,7 +1630,7 @@ index d87bced03..5e03d8978 100644
}
}
}
-@@ -2155,7 +2156,7 @@ static void sl_handle_focus_in(struct sl_context* ctx,
+@@ -2164,7 +2165,7 @@ static void sl_handle_focus_in(struct sl_context* ctx,
// window was realized.
struct sl_window* parent = sl_lookup_window(ctx, window->transient_for);
if (parent && parent->xdg_toplevel && window->xdg_toplevel)
@@ -1639,7 +1639,7 @@ index d87bced03..5e03d8978 100644
}
}

-@@ -2373,9 +2374,9 @@ static void sl_handle_property_notify(struct sl_context* ctx,
+@@ -2381,9 +2382,9 @@ static void sl_handle_property_notify(struct sl_context* ctx,
return;

if (window->name) {
@@ -1651,7 +1651,7 @@ index d87bced03..5e03d8978 100644
}
} else if (event->atom == XCB_ATOM_WM_CLASS) {
struct sl_window* window = sl_lookup_window(ctx, event->window);
-@@ -2427,19 +2428,19 @@ static void sl_handle_property_notify(struct sl_context* ctx,
+@@ -2435,19 +2436,19 @@ static void sl_handle_property_notify(struct sl_context* ctx,
return;

if (window->size_flags & P_MIN_SIZE) {
@@ -1675,7 +1675,7 @@ index d87bced03..5e03d8978 100644
}
} else if (event->atom == XCB_ATOM_WM_HINTS) {
struct sl_window* window = sl_lookup_window(ctx, event->window);
-@@ -3536,7 +3537,7 @@ int main(int argc, char** argv) {
+@@ -3535,7 +3536,7 @@ int main(int argc, char** argv) {
.shm = NULL,
.shell = NULL,
.data_device_manager = NULL,
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-make-building-demos-optional.patch
similarity index 94%
rename from pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch
rename to pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-make-building-demos-optional.patch
index 3538932d804..283e765d9d4 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/0005-sommelier-make-building-demos-optional.patch
@@ -1,7 +1,7 @@
-From 8774d76f1b57092df9004d654fd075d7691b9f12 Mon Sep 17 00:00:00 2001
+From c0c705cb90026eef892be8e3e717429ccf26b018 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Wed, 15 Jan 2020 21:36:43 +0000
-Subject: [PATCH 6/7] sommelier: make building demos optional
+Subject: [PATCH 5/5] sommelier: make building demos optional
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
deleted file mode 100644
index 778c481d598..00000000000
--- a/pkgs/os-specific/linux/chromium-os/sommelier/0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-From 64afc7e7271e0bad332a8a246a4fb4151b3d296f Mon Sep 17 00:00:00 2001
-From: Fergus Dall <sidereal@google.com>
-Date: Fri, 27 Mar 2020 18:34:04 +1100
-Subject: [PATCH 7/7] vm_tools: sommelier: Log the value of strerror when
- asserting
-
-There's some reports of sommelier crashing with assert failures, and
-right now we don't even have a way to tell what the error was from the
-logs.
-
-BUG=chromium:1053843
-TEST=emerge-tatl vm_guest_tools
-
-Change-Id: Iac9e0470600f7c7a8d8328049a79305251d7ef7f
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2124131
-Commit-Queue: Fergus Dall <sidereal@google.com>
-Tested-by: Fergus Dall <sidereal@google.com>
-Reviewed-by: Nic Hollingum <hollingum@google.com>
----
- vm_tools/sommelier/sommelier.c | 65 +++++++++++++++++-----------------
- 1 file changed, 32 insertions(+), 33 deletions(-)
-
-diff --git a/vm_tools/sommelier/sommelier.c b/vm_tools/sommelier/sommelier.c
-index 5e03d8978..ffe6f645c 100644
---- a/vm_tools/sommelier/sommelier.c
-+++ b/vm_tools/sommelier/sommelier.c
-@@ -37,6 +37,15 @@
- #include "viewporter-client-protocol.h"
- #include "xdg-shell-client-protocol.h"
-
-+#define errno_assert(rv) \
-+ { \
-+ int macro_private_assert_value = (rv); \
-+ if (!macro_private_assert_value) { \
-+ fprintf(stderr, "Unexpected error: %s\n", strerror(errno)); \
-+ assert(false); \
-+ } \
-+ }
-+
- // Check that required macro definitions exist.
- #ifndef XWAYLAND_PATH
- #error XWAYLAND_PATH must be defined
-@@ -239,7 +248,7 @@ struct sl_mmap* sl_mmap_create(int fd,
- map->buffer_resource = NULL;
- map->addr =
- mmap(NULL, size + offset0, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-- assert(map->addr != MAP_FAILED);
-+ errno_assert(map->addr != MAP_FAILED);
-
- return map;
- }
-@@ -2183,8 +2192,7 @@ int sl_begin_data_source_send(struct sl_context* ctx,
-
- flags = fcntl(fd, F_GETFL, 0);
- rv = fcntl(fd, F_SETFL, flags | O_NONBLOCK);
-- assert(!rv);
-- UNUSED(rv);
-+ errno_assert(!rv);
-
- ctx->selection_data_source_send_fd = fd;
- free(reply);
-@@ -2810,7 +2818,7 @@ static void sl_send_data(struct sl_context* ctx, xcb_atom_t data_type) {
- int p[2];
-
- rv = pipe2(p, O_CLOEXEC | O_NONBLOCK);
-- assert(!rv);
-+ errno_assert(!rv);
-
- fd_to_receive = p[0];
- fd_to_wayland = p[1];
-@@ -3153,7 +3161,7 @@ static void sl_sd_notify(const char* state) {
- assert(socket_name);
-
- fd = socket(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);
-- assert(fd >= 0);
-+ errno_assert(fd >= 0);
-
- memset(&addr, 0, sizeof(addr));
- addr.sun_family = AF_UNIX;
-@@ -3171,8 +3179,7 @@ static void sl_sd_notify(const char* state) {
- msghdr.msg_iovlen = 1;
-
- rv = sendmsg(fd, &msghdr, MSG_NOSIGNAL);
-- assert(rv != -1);
-- UNUSED(rv);
-+ errno_assert(rv != -1);
- }
-
- static int sl_handle_sigchld(int signal_number, void* data) {
-@@ -3304,7 +3311,7 @@ static int sl_handle_display_ready_event(int fd, uint32_t mask, void* data) {
- (int)(XCURSOR_SIZE_BASE * ctx->scale + 0.5)));
-
- pid = fork();
-- assert(pid >= 0);
-+ errno_assert(pid >= 0);
- if (pid == 0) {
- sl_execvp(ctx->runprog[0], ctx->runprog, -1);
- _exit(EXIT_FAILURE);
-@@ -3373,8 +3380,7 @@ static int sl_handle_virtwl_ctx_event(int fd, uint32_t mask, void* data) {
- }
-
- bytes = sendmsg(ctx->virtwl_socket_fd, &msg, MSG_NOSIGNAL);
-- assert(bytes == ioctl_recv->len);
-- UNUSED(bytes);
-+ errno_assert(bytes == ioctl_recv->len);
-
- while (fd_count--)
- close(ioctl_recv->fds[fd_count]);
-@@ -3406,10 +3412,7 @@ static int sl_handle_virtwl_socket_event(int fd, uint32_t mask, void* data) {
- msg.msg_controllen = sizeof(fd_buffer);
-
- bytes = recvmsg(ctx->virtwl_socket_fd, &msg, 0);
-- if (bytes < 0) {
-- fprintf(stderr, "Failed to get message from virtwl: %s\n", strerror(errno));
-- }
-- assert(bytes > 0);
-+ errno_assert(bytes > 0);
-
- // If there were any FDs recv'd by recvmsg, there will be some data in the
- // msg_control buffer. To get the FDs out we iterate all cmsghdr's within and
-@@ -3437,11 +3440,7 @@ static int sl_handle_virtwl_socket_event(int fd, uint32_t mask, void* data) {
- // structure which we now pass along to the kernel.
- ioctl_send->len = bytes;
- rv = ioctl(ctx->virtwl_ctx_fd, VIRTWL_IOCTL_SEND, ioctl_send);
-- if (!rv) {
-- fprintf(stderr, "Failed to send message to virtwl: %s\n", strerror(errno));
-- }
-- assert(!rv);
-- UNUSED(rv);
-+ errno_assert(!rv);
-
- while (fd_count--)
- close(ioctl_send->fds[fd_count]);
-@@ -3765,7 +3764,7 @@ int main(int argc, char** argv) {
-
- lock_fd = open(lock_addr, O_CREAT | O_CLOEXEC,
- (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
-- assert(lock_fd >= 0);
-+ errno_assert(lock_fd >= 0);
-
- rv = flock(lock_fd, LOCK_EX | LOCK_NB);
- if (rv < 0) {
-@@ -3781,25 +3780,25 @@ int main(int argc, char** argv) {
- if (sock_stat.st_mode & (S_IWUSR | S_IWGRP))
- unlink(addr.sun_path);
- } else {
-- assert(errno == ENOENT);
-+ errno_assert(errno == ENOENT);
- }
-
- sock_fd = socket(PF_LOCAL, SOCK_STREAM, 0);
-- assert(sock_fd >= 0);
-+ errno_assert(sock_fd >= 0);
-
- rv = bind(sock_fd, (struct sockaddr*)&addr,
- offsetof(struct sockaddr_un, sun_path) + strlen(addr.sun_path));
-- assert(rv >= 0);
-+ errno_assert(rv >= 0);
-
- rv = listen(sock_fd, 128);
-- assert(rv >= 0);
-+ errno_assert(rv >= 0);
-
- // Spawn optional child process before we notify systemd that we're ready
- // to accept connections. WAYLAND_DISPLAY will be set but any attempt to
- // connect to this socket at this time will fail.
- if (ctx.runprog && ctx.runprog[0]) {
- pid = fork();
-- assert(pid != -1);
-+ errno_assert(pid != -1);
- if (pid == 0) {
- setenv("WAYLAND_DISPLAY", socket_name, 1);
- sl_execvp(ctx.runprog[0], ctx.runprog, -1);
-@@ -3816,7 +3815,7 @@ int main(int argc, char** argv) {
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = SA_RESTART;
- rv = sigaction(SIGCHLD, &sa, NULL);
-- assert(rv >= 0);
-+ errno_assert(rv >= 0);
-
- do {
- struct ucred ucred;
-@@ -3833,7 +3832,7 @@ int main(int argc, char** argv) {
- rv = getsockopt(client_fd, SOL_SOCKET, SO_PEERCRED, &ucred, &length);
-
- pid = fork();
-- assert(pid != -1);
-+ errno_assert(pid != -1);
- if (pid == 0) {
- char* client_fd_str;
- char* peer_pid_str;
-@@ -3963,7 +3962,7 @@ int main(int argc, char** argv) {
-
- // Connection to virtwl channel.
- rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, vws);
-- assert(!rv);
-+ errno_assert(!rv);
-
- ctx.virtwl_socket_fd = vws[0];
- virtwl_display_fd = vws[1];
-@@ -4083,7 +4082,7 @@ int main(int argc, char** argv) {
- if (ctx.runprog || ctx.xwayland) {
- // Wayland connection from client.
- rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv);
-- assert(!rv);
-+ errno_assert(!rv);
-
- client_fd = sv[0];
- }
-@@ -4199,7 +4198,7 @@ int main(int argc, char** argv) {
-
- // Xwayland display ready socket.
- rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, ds);
-- assert(!rv);
-+ errno_assert(!rv);
-
- ctx.display_ready_event_source =
- wl_event_loop_add_fd(event_loop, ds[0], WL_EVENT_READABLE,
-@@ -4207,12 +4206,12 @@ int main(int argc, char** argv) {
-
- // X connection to Xwayland.
- rv = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, wm);
-- assert(!rv);
-+ errno_assert(!rv);
-
- ctx.wm_fd = wm[0];
-
- pid = fork();
-- assert(pid != -1);
-+ errno_assert(pid != -1);
- if (pid == 0) {
- char* display_fd_str;
- char* wm_fd_str;
-@@ -4280,7 +4279,7 @@ int main(int argc, char** argv) {
- ctx.xwayland_pid = pid;
- } else {
- pid = fork();
-- assert(pid != -1);
-+ errno_assert(pid != -1);
- if (pid == 0) {
- sl_execvp(ctx.runprog[0], ctx.runprog, sv[1]);
- _exit(EXIT_FAILURE);
---
-2.26.2
-
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/default.nix b/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
index da2a554837b..e0ce28205f2 100644
--- a/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/sommelier/default.nix
@@ -7,10 +7,9 @@ common-mk {
platformSubdir = "vm_tools/sommelier";

platform2Patches = [
- ./0004-sommelier-don-t-leak-source-absolute-paths.patch
- ./0005-sommelier-use-stable-xdg-shell-protocol.patch
- ./0006-sommelier-make-building-demos-optional.patch
- ./0007-vm_tools-sommelier-Log-the-value-of-strerror-when-as.patch
+ ./0003-sommelier-don-t-leak-source-absolute-paths.patch
+ ./0004-sommelier-use-stable-xdg-shell-protocol.patch
+ ./0005-sommelier-make-building-demos-optional.patch
];

buildInputs = [
diff --git a/pkgs/os-specific/linux/chromium-os/update.py b/pkgs/os-specific/linux/chromium-os/update.py
index 58a15dbb8e8..a2e093c2e9e 100755
--- a/pkgs/os-specific/linux/chromium-os/update.py
+++ b/pkgs/os-specific/linux/chromium-os/update.py
@@ -14,6 +14,7 @@ from urllib.request import urlopen

# ChromiumOS components used in Nixpkgs
component_paths = [
+ 'src/aosp/external/minijail',
'src/platform/crosvm',
'src/platform/minigbm',
'src/platform2',
diff --git a/pkgs/os-specific/linux/chromium-os/upstream-info.json b/pkgs/os-specific/linux/chromium-os/upstream-info.json
index 842912800bc..7755c48239c 100644
--- a/pkgs/os-specific/linux/chromium-os/upstream-info.json
+++ b/pkgs/os-specific/linux/chromium-os/upstream-info.json
@@ -1,54 +1,60 @@
{
- "version": "81.12871.0.0-rc1",
+ "version": "83.13020.0.0-rc1",
"components": {
+ "src/aosp/external/minijail": {
+ "name": "minijail",
+ "url": "https://android.googlesource.com/platform/external/minijail",
+ "rev": "84ffabcf488bf0935f00930a9a23bbce1f34d79f",
+ "sha256": "0yhbklwmgqws4cb098hpaky4w8if5snpkdabridcc5hk5d7vgild"
+ },
"src/platform/crosvm": {
"name": "crosvm",
"url": "https://chromium.googlesource.com/chromiumos/platform/crosvm",
- "rev": "8b8c01e1ad31718932491e4aee63f56109a138e2",
- "sha256": "1qmf1k06pwynh15c3nr9m6v90z2pkk930xniwvlvbvnazrk4rllg"
+ "rev": "664cc3ca49cb58d5bf7d936686fd211d6dd728bf",
+ "sha256": "0rms1hkb3r4w6j3l71gavky6ylc7gi9sfr2rq4dr82v6vc8zxbjx"
},
"src/platform/minigbm": {
"name": "minigbm",
"url": "https://chromium.googlesource.com/chromiumos/platform/minigbm",
- "rev": "fbfb338e7db246f05ae68da97141fbd49481584b",
- "sha256": "11p6v4nmqivyqyc8lmypbwqv9q819lhx6v3igfsv3455mmq02kcb"
+ "rev": "bc4f023bfcc51cf9dcfcfec5bf4177b2e607dd68",
+ "sha256": "08ag207199xj5cw686386rmvr7sx2mzihdckm2pnvw743w03gipr"
},
"src/platform2": {
"name": "platform2",
"url": "https://chromium.googlesource.com/chromiumos/platform2",
- "rev": "6e0d88d0bea8e7cb28a310298cc8c77ed742f60a",
- "sha256": "13vrbnl3ck8cxiyifc58cs9i0yby92vp5si27ihrx33v6bdlir4s"
+ "rev": "e45d54bedee94e0121e12cc86fded46be8b3fa4e",
+ "sha256": "0ag01p8ch0wn7ds9ywasrdxkbibg19qzf5rldf8nr8irk1n851n7"
},
"src/third_party/adhd": {
"name": "adhd",
"url": "https://chromium.googlesource.com/chromiumos/third_party/adhd",
- "rev": "f361d5b02623274723bff251dafa1e2a2887b013",
- "sha256": "1p8iwjwgmcgmzri03ik2jaid8l0ch0bzn6z9z64dix1hlrvrlliw"
+ "rev": "d3af897db5540cadc439463a0ffdde07f2b8898a",
+ "sha256": "1h0xxf338d7fwmfwjlpsjiml8d3v426a95x3ka7qfikdapgmav3d"
},
"src/third_party/chromiumos-overlay": {
"name": "chromiumos-overlay",
"url": "https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay",
- "rev": "be285b729ef2af700cc248f741af20c387b5a1bc",
- "sha256": "18y2icdb3hxqxxaaz8sylw21q2qwcpjyns75ig7ahc4vc1k5hg7s"
+ "rev": "270f5c2cfb7eadc374638076c8fdee72360a6d66",
+ "sha256": "1d88xvnf0qc3v5hp9b2pafxhi83rph84y2sbk1nc46rhj63m8bwi"
},
"src/third_party/kernel/v5.4": {
"name": "v5.4",
"url": "https://chromium.googlesource.com/chromiumos/third_party/kernel",
- "rev": "17611b6e636c8ccae25e873e659d69c20b215815",
- "sha256": "0an8w3660v2zf2crb68ambg7vzw2rajpjmcby1am08qy37lqsfkd",
- "version": "5.4.16"
+ "rev": "36270ae817fb576debb80bce752addb3a4cc9886",
+ "sha256": "0h7fj3w9vwmq8a6cx96vjcyw29v7wfamxykh1nx3lmhxxkn120f4",
+ "version": "5.4.28"
},
"src/third_party/libqmi": {
"name": "libqmi",
"url": "https://chromium.googlesource.com/chromiumos/third_party/libqmi",
- "rev": "6267c12fef0be9a95d687bf4b476593eeffbaaf1",
- "sha256": "00yjjcngjkbgxmmf79ciddk9yq393a94230ahq8vszyfygzhs3rz"
+ "rev": "20726755e60d48c70f0189a1cfe9665a87a5e6c6",
+ "sha256": "0w04lyd459jgcag70kx6nq1i952fbhy32nmkh6r255xjf2wrliwr"
},
"src/third_party/modemmanager-next": {
"name": "modemmanager-next",
"url": "https://chromium.googlesource.com/chromiumos/third_party/modemmanager-next",
- "rev": "a4d3a4de1fdab7c282f1a188d2d3d0aaa24f0698",
- "sha256": "1b1l1jfiyl7fnm29pp9npi0gdlqcw1jmmbigf0qlndqdh0ly2izg"
+ "rev": "988f572cc882a74209fba0f5c49cf0b01b9163a6",
+ "sha256": "1hiqz7wn1w461sd94v179q81yahisffnw033yix3dwfwagm9ndf8"
},
"src/third_party/modp_b64": {
"name": "modp_b64",
diff --git a/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch b/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch
deleted file mode 100644
index 3e4e504978c..00000000000
--- a/pkgs/os-specific/linux/kernel/0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 7f7629cc680bf3c22d547fb5333e521af58c6c9e Mon Sep 17 00:00:00 2001
-From: Ryo Hashimoto <hashimoto@google.com>
-Date: Wed, 11 Dec 2019 18:32:03 +0900
-Subject: [PATCH] CHROMIUM: virtwl: Support multiple host sockets
-
-Add a new argument to VIRTWL_IOCTL_NEW_CTX.
-This CL doesn't change the size of structs.
-
-Guest can use this parameter to create a context connected to a host
-process other than the compositor.
-
-BUG=b:146100044, b:140202859
-TEST=Camera works
-
-Change-Id: I1c6b1a256002a336774a36caf0fe8d18f08c0f56
-Signed-off-by: Ryo Hashimoto <hashimoto@chromium.org>
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1962108
-Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
-Reviewed-by: Zach Reizner <zachr@chromium.org>
-(cherry picked from commit 5d641a7b7b64664230d2fd2aa1e74dd792b8b7bf)
-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2035921
-Tested-by: Chirantan Ekbote <chirantan@chromium.org>
-Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
-Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
-Signed-off-by: Alyssa Ross <hi@alyssa.is>
----
- drivers/virtio/virtio_wl.c | 6 ++++++
- include/uapi/linux/virtio_wl.h | 29 +++++++++++++++++------------
- include/uapi/linux/virtwl.h | 3 +++
- 3 files changed, 26 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/virtio/virtio_wl.c b/drivers/virtio/virtio_wl.c
-index 1b3f8926519a7..80cf799bed464 100644
---- a/drivers/virtio/virtio_wl.c
-+++ b/drivers/virtio/virtio_wl.c
-@@ -1024,6 +1024,7 @@ static struct virtwl_vfd *do_new(struct virtwl_info *vi,
- int ret = 0;
-
- if (ioctl_new->type != VIRTWL_IOCTL_NEW_CTX &&
-+ ioctl_new->type != VIRTWL_IOCTL_NEW_CTX_NAMED &&
- ioctl_new->type != VIRTWL_IOCTL_NEW_ALLOC &&
- ioctl_new->type != VIRTWL_IOCTL_NEW_PIPE_READ &&
- ioctl_new->type != VIRTWL_IOCTL_NEW_PIPE_WRITE &&
-@@ -1060,6 +1061,11 @@ static struct virtwl_vfd *do_new(struct virtwl_info *vi,
- ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW_CTX;
- ctrl_new->flags = VIRTIO_WL_VFD_WRITE | VIRTIO_WL_VFD_READ;
- break;
-+ case VIRTWL_IOCTL_NEW_CTX_NAMED:
-+ ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED;
-+ ctrl_new->flags = VIRTIO_WL_VFD_WRITE | VIRTIO_WL_VFD_READ;
-+ memcpy(ctrl_new->name, ioctl_new->name, sizeof(ctrl_new->name));
-+ break;
- case VIRTWL_IOCTL_NEW_ALLOC:
- ctrl_new->hdr.type = VIRTIO_WL_CMD_VFD_NEW;
- ctrl_new->size = PAGE_ALIGN(ioctl_new->size);
-diff --git a/include/uapi/linux/virtio_wl.h b/include/uapi/linux/virtio_wl.h
-index 1d3ec6b31d4d3..ad9b6dfcd3263 100644
---- a/include/uapi/linux/virtio_wl.h
-+++ b/include/uapi/linux/virtio_wl.h
-@@ -37,6 +37,7 @@ enum virtio_wl_ctrl_type {
- VIRTIO_WL_CMD_VFD_NEW_DMABUF, /* virtio_wl_ctrl_vfd_new */
- VIRTIO_WL_CMD_VFD_DMABUF_SYNC, /* virtio_wl_ctrl_vfd_dmabuf_sync */
- VIRTIO_WL_CMD_VFD_SEND_FOREIGN_ID, /* virtio_wl_ctrl_vfd_send + data */
-+ VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED, /* virtio_wl_ctrl_vfd_new */
-
- VIRTIO_WL_RESP_OK = 0x1000,
- VIRTIO_WL_RESP_VFD_NEW = 0x1001, /* virtio_wl_ctrl_vfd_new */
-@@ -78,18 +79,22 @@ struct virtio_wl_ctrl_vfd_new {
- __le32 flags; /* virtio_wl_vfd_flags */
- __le64 pfn; /* first guest physical page frame number if VFD_MAP */
- __le32 size; /* size in bytes if VIRTIO_WL_CMD_VFD_NEW* */
-- /* buffer description if VIRTIO_WL_CMD_VFD_NEW_DMABUF */
-- struct {
-- __le32 width; /* width in pixels */
-- __le32 height; /* height in pixels */
-- __le32 format; /* fourcc format */
-- __le32 stride0; /* return stride0 */
-- __le32 stride1; /* return stride1 */
-- __le32 stride2; /* return stride2 */
-- __le32 offset0; /* return offset0 */
-- __le32 offset1; /* return offset1 */
-- __le32 offset2; /* return offset2 */
-- } dmabuf;
-+ union {
-+ /* buffer description if VIRTIO_WL_CMD_VFD_NEW_DMABUF */
-+ struct {
-+ __le32 width; /* width in pixels */
-+ __le32 height; /* height in pixels */
-+ __le32 format; /* fourcc format */
-+ __le32 stride0; /* return stride0 */
-+ __le32 stride1; /* return stride1 */
-+ __le32 stride2; /* return stride2 */
-+ __le32 offset0; /* return offset0 */
-+ __le32 offset1; /* return offset1 */
-+ __le32 offset2; /* return offset2 */
-+ } dmabuf;
-+ /* name of socket if VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED */
-+ char name[32];
-+ };
- };
-
-
-diff --git a/include/uapi/linux/virtwl.h b/include/uapi/linux/virtwl.h
-index 939041389b403..baa9b341377a5 100644
---- a/include/uapi/linux/virtwl.h
-+++ b/include/uapi/linux/virtwl.h
-@@ -21,6 +21,7 @@ enum virtwl_ioctl_new_type {
- VIRTWL_IOCTL_NEW_PIPE_WRITE,
- /* create a new virtwl dmabuf that is writable via the returned fd */
- VIRTWL_IOCTL_NEW_DMABUF,
-+ VIRTWL_IOCTL_NEW_CTX_NAMED, /* open a new named connection context */
- };
-
- struct virtwl_ioctl_new {
-@@ -42,6 +43,8 @@ struct virtwl_ioctl_new {
- __u32 offset1; /* return offset1 */
- __u32 offset2; /* return offset2 */
- } dmabuf;
-+ /* name of socket if type == VIRTIO_WL_CMD_VFD_NEW_CTX_NAMED */
-+ char name[32];
- };
- };
-
---
-2.26.2
-
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 66cbdbb36fa..8ce1ac2b587 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -92,9 +92,4 @@
name = "mac_nvme_t2";
patch = ./mac-nvme-t2.patch;
};
-
- virtwl_multiple_sockets = {
- name = "virtwl_multiple_sockets";
- patch = ./0001-CHROMIUM-virtwl-Support-multiple-host-sockets.patch;
- };
}
--
2.26.2