2
0
Fork 0

Genode: 20201127 -> 20201218

This commit is contained in:
Ehmry - 2020-12-19 14:06:34 +01:00
parent b104363f43
commit 319a666823
4 changed files with 40 additions and 105 deletions

View File

@ -3,11 +3,11 @@
"genode": {
"flake": false,
"locked": {
"lastModified": 1606482107,
"narHash": "sha256-XgN1fBUsmX8oKk4ZBvROwEWlpILRlJz+UuK4kMDSI1Y=",
"lastModified": 1608279052,
"narHash": "sha256-Z7JYlKVX6fsJxZm3oFlBZofQ/MlU3ugavRlbYj+kcqA=",
"owner": "genodelabs",
"repo": "genode",
"rev": "3fac8b106d83721914797c202793ec1d8ea02d2f",
"rev": "1bef11accf650657544b16aac9cd3af62edf0fb3",
"type": "github"
},
"original": {

View File

@ -1,7 +1,7 @@
From 017abdc7a59acf7e76109b7fd285f9856b4a9eee Mon Sep 17 00:00:00 2001
From a163f085a918c4af156d84cb40aa1df5afe0bd44 Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Wed, 6 May 2020 04:38:35 +0530
Subject: [PATCH 1/8] libc: add siginterrupt dummy
Subject: [PATCH 1/7] libc: add siginterrupt dummy
---
repos/libports/src/lib/libc/signal.cc | 3 +++
@ -25,10 +25,10 @@ index a08854a8c0..2d2def34d3 100644
2.29.2
From e73c873a6e329eef4dede312e0bd0e597c93adde Mon Sep 17 00:00:00 2001
From 45bcbeec901f9d5f748d4f1f73c9a70bc449302a Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Wed, 6 May 2020 04:59:56 +0530
Subject: [PATCH 2/8] libc: add upstream mbsinit
Subject: [PATCH 2/7] libc: add upstream mbsinit
---
repos/libports/lib/mk/libc-locale.mk | 2 +-
@ -51,10 +51,10 @@ index 8e75e59589..2bb98b1456 100644
2.29.2
From 98d8ef8e3fa37076fab524b6830229f347c89feb Mon Sep 17 00:00:00 2001
From 61b10dc8c6e2dd406667046665c9d31b9505d7ac Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Wed, 27 May 2020 16:35:16 +0530
Subject: [PATCH 3/8] libc: add mlock and munlock dummies
Subject: [PATCH 3/7] libc: add mlock and munlock dummies
---
repos/libports/src/lib/libc/dummies.cc | 10 ++++++++++
@ -84,10 +84,10 @@ index b01d95f717..f676b4979c 100644
2.29.2
From a17d8387a9bbc7d340ed42cfcdc0adedce16f4dd Mon Sep 17 00:00:00 2001
From 45c8afc8319fb0eb60914d44712ddcad97509709 Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Fri, 29 May 2020 09:26:50 +0530
Subject: [PATCH 4/8] libc: return 0 from getpgrp and getppid dummies
Subject: [PATCH 4/7] libc: return 0 from getpgrp and getppid dummies
---
repos/libports/src/lib/libc/dummies.cc | 4 ++--
@ -112,75 +112,10 @@ index f676b4979c..9c568dcc77 100644
2.29.2
From 9f3375cdca705e3271f209de76beb19354a150e8 Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Thu, 26 Nov 2020 12:47:30 +0100
Subject: [PATCH 5/8] libc: always set argv and envp to valid arrays
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The arrays passed to main(…) must always be valid null-terminated arrays.
Fix #3955
---
repos/libports/include/libc/args.h | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/repos/libports/include/libc/args.h b/repos/libports/include/libc/args.h
index 76645d82cb..ca9a8fd38a 100644
--- a/repos/libports/include/libc/args.h
+++ b/repos/libports/include/libc/args.h
@@ -25,6 +25,7 @@ static void populate_args_and_env(Libc::Env &env, int &argc, char **&argv, char
{
using Genode::Xml_node;
using Genode::Xml_attribute;
+ using Genode::max;
env.config([&] (Xml_node const &node) {
@@ -40,12 +41,20 @@ static void populate_args_and_env(Libc::Env &env, int &argc, char **&argv, char
++envc;
});
- if (argc == 0 && envc == 0)
+ if (argc == 0 && envc == 0) {
+ /*
+ * If argc is zero then argv is still a NULL-terminated array.
+ */
+ static char const *args[] = { nullptr, nullptr };
+ argc = 0;
+ argv = (char**)&args;
+ envp = &argv[1];
return; /* from lambda */
+ }
- /* arguments and environment are a contiguous array (but don't count on it) */
- argv = (char**)malloc((argc + envc + 1) * sizeof(char*));
- envp = &argv[argc];
+ /* arguments and environment are arranged System V style (but don't count on it) */
+ argv = (char**)malloc((argc + envc + 2) * sizeof(char*));
+ envp = &argv[argc+1];
/* read the arguments */
int arg_i = 0;
@@ -123,6 +132,8 @@ static void populate_args_and_env(Libc::Env &env, int &argc, char **&argv, char
catch (Xml_node::Nonexistent_attribute) { }
});
+ /* argv and envp are both NULL terminated */
+ argv[arg_i] = NULL;
envp[env_i] = NULL;
});
}
--
2.29.2
From dd89c66247bf751c87b09fffc7af15c04a59fd91 Mon Sep 17 00:00:00 2001
From bc10be54b1057eb5f333cdefb35730371bd22a19 Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Wed, 2 Dec 2020 16:31:59 +0100
Subject: [PATCH 6/8] libc: implement if_nametoindex
Subject: [PATCH 5/7] libc: implement if_nametoindex
---
.../libports/src/lib/libc/socket_fs_plugin.cc | 50 ++++++++++++++++++-
@ -258,10 +193,10 @@ index d5db46ff83..fabaf68b5c 100644
2.29.2
From 1f249e18ea3972911c1405deb40afd85b8d64dea Mon Sep 17 00:00:00 2001
From 68e56d8e95bbcf8aaa77b2f95d9c76890e1f5489 Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Thu, 4 Jun 2020 01:03:37 +0530
Subject: [PATCH 7/8] libc: add readpassphrase
Subject: [PATCH 6/7] libc: add readpassphrase
This symbol is already in the stub library.
---
@ -284,13 +219,13 @@ index ab0ce929aa..1c7f84e800 100644
2.29.2
From 708d1c11c1954636df4eef2efde8f1a5cc4afa7e Mon Sep 17 00:00:00 2001
From f95d3fdeef9186476215e53ead8ed38fd7cd533e Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Wed, 2 Dec 2020 22:27:00 +0100
Subject: [PATCH 8/8] libc: replace strange errno values for O_NOFOLLOW
Subject: [PATCH 7/7] libc: do not set different errno values for O_NOFOLLOW
Do not replace ENOENT and EEXIST with ELOOP when open is called with
O_NOFOLLOW.
O_NOFOLLOW. This breaks Tor.
---
repos/libports/src/lib/libc/vfs_plugin.cc | 16 ----------------
1 file changed, 16 deletions(-)

View File

@ -1,4 +1,4 @@
From 735e7af9458005092451f448ddf3dfc1cad4acbd Mon Sep 17 00:00:00 2001
From 5ba0a72af3629723b5999f818bfcc7b1fb920c8f Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Sat, 25 Apr 2020 17:10:03 +0530
Subject: [PATCH 1/4] init/sandbox: <routes> support
@ -19,11 +19,11 @@ rules.
4 files changed, 39 insertions(+), 5 deletions(-)
diff --git a/repos/os/src/lib/sandbox/child.cc b/repos/os/src/lib/sandbox/child.cc
index e321df61fd..d25e3d9683 100644
index 4c1aa9fbbd..ab0308bd49 100644
--- a/repos/os/src/lib/sandbox/child.cc
+++ b/repos/os/src/lib/sandbox/child.cc
@@ -487,17 +487,25 @@ Sandbox::Child::resolve_session_request(Service::Name const &service_name,
Session::Label(), Session::Diag{false} };
return Route { _session_requester.service(), Session::Label(), diag };
try {
+ /* Lookup route in <default-route>… */
@ -66,7 +66,7 @@ index e321df61fd..d25e3d9683 100644
_ram_limit_accessor(ram_limit_accessor),
_cap_limit_accessor(cap_limit_accessor),
diff --git a/repos/os/src/lib/sandbox/child.h b/repos/os/src/lib/sandbox/child.h
index 2c213e662c..81836a2045 100644
index f338597f9c..01f464ffbe 100644
--- a/repos/os/src/lib/sandbox/child.h
+++ b/repos/os/src/lib/sandbox/child.h
@@ -52,6 +52,14 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
@ -92,7 +92,7 @@ index 2c213e662c..81836a2045 100644
Default_caps_accessor &_default_caps_accessor;
Ram_limit_accessor &_ram_limit_accessor;
Cap_limit_accessor &_cap_limit_accessor;
@@ -473,6 +482,7 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
@@ -474,6 +483,7 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
Report_update_trigger &report_update_trigger,
Xml_node start_node,
Default_route_accessor &default_route_accessor,
@ -183,7 +183,7 @@ index 7afcaebf00..36aab737f2 100644
2.29.2
From 0b65d7660784dbff4ef4fe392af686103c60a32d Mon Sep 17 00:00:00 2001
From 6fa4ee7a172965d31e9344d71d06d756a2300111 Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Wed, 4 Nov 2020 11:03:49 +0100
Subject: [PATCH 2/4] init/sandbox: do not parse <parent-provides> if <routes>
@ -334,7 +334,7 @@ index 30d0f2dfc1..caa9840ea6 100644
2.29.2
From 67d834c4556969e37bc050e151baeedddfb05ac9 Mon Sep 17 00:00:00 2001
From bae36ddfdd47f555c633bafb0c17e63a7674a3b2 Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Wed, 4 Nov 2020 20:02:03 +0100
Subject: [PATCH 3/4] init/sandbox: simplify routing
@ -357,7 +357,7 @@ Routes are now selected by longest match rather than first match.
4 files changed, 76 insertions(+), 127 deletions(-)
diff --git a/repos/os/src/lib/sandbox/child.cc b/repos/os/src/lib/sandbox/child.cc
index d25e3d9683..46aa22411c 100644
index ab0308bd49..bac74e0247 100644
--- a/repos/os/src/lib/sandbox/child.cc
+++ b/repos/os/src/lib/sandbox/child.cc
@@ -11,6 +11,7 @@
@ -369,8 +369,8 @@ index d25e3d9683..46aa22411c 100644
/* local includes */
@@ -486,105 +487,65 @@ Sandbox::Child::resolve_session_request(Service::Name const &service_name,
return Route { _session_requester.service(),
Session::Label(), Session::Diag{false} };
&& label.last_element() == Session_requester::rom_name())
return Route { _session_requester.service(), Session::Label(), diag };
- try {
- /* Lookup route in <default-route>… */
@ -411,7 +411,7 @@ index d25e3d9683..46aa22411c 100644
- target.attribute_value("label", Label(label.string()));
-
- Session::Diag const
- target_diag { target.attribute_value("diag", false) };
- target_diag { target.attribute_value("diag", diag.enabled) };
-
- auto no_filter = [] (Service &) -> bool { return false; };
-
@ -535,7 +535,7 @@ index d25e3d9683..46aa22411c 100644
_default_caps_accessor(default_caps_accessor),
_ram_limit_accessor(ram_limit_accessor),
diff --git a/repos/os/src/lib/sandbox/child.h b/repos/os/src/lib/sandbox/child.h
index 81836a2045..f9d04cfdaf 100644
index 01f464ffbe..e5e9bd212c 100644
--- a/repos/os/src/lib/sandbox/child.h
+++ b/repos/os/src/lib/sandbox/child.h
@@ -49,7 +49,6 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
@ -554,7 +554,7 @@ index 81836a2045..f9d04cfdaf 100644
Routes_accessor &_routes_accessor;
Default_caps_accessor &_default_caps_accessor;
Ram_limit_accessor &_ram_limit_accessor;
@@ -481,7 +479,6 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
@@ -482,7 +480,6 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
Id id,
Report_update_trigger &report_update_trigger,
Xml_node start_node,
@ -700,7 +700,7 @@ index 36aab737f2..639a4be4dd 100644
2.29.2
From 92c1f192d432f177c681e3ab001214e66e96e0f0 Mon Sep 17 00:00:00 2001
From cfa192756bda31a68f65d538bb4a4f77cef394eb Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Sat, 28 Nov 2020 14:00:49 +0100
Subject: [PATCH 4/4] Do not default Child::binary_name() to Child::name()
@ -712,7 +712,7 @@ Subject: [PATCH 4/4] Do not default Child::binary_name() to Child::name()
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/repos/base/include/base/child.h b/repos/base/include/base/child.h
index 8c7b33a9d9..bca0d566f2 100644
index cfcf8e7844..8dd3bc14db 100644
--- a/repos/base/include/base/child.h
+++ b/repos/base/include/base/child.h
@@ -58,7 +58,7 @@ struct Genode::Child_policy
@ -725,7 +725,7 @@ index 8c7b33a9d9..bca0d566f2 100644
/**
* ROM module name of the dynamic linker
diff --git a/repos/base/src/core/main.cc b/repos/base/src/core/main.cc
index d480585221..7acacf0ffd 100644
index 234bc455f6..cad2e6c081 100644
--- a/repos/base/src/core/main.cc
+++ b/repos/base/src/core/main.cc
@@ -145,6 +145,8 @@ class Core_child : public Child_policy
@ -735,13 +735,13 @@ index d480585221..7acacf0ffd 100644
+ Binary_name binary_name() const override { return "init"; }
+
Route resolve_session_request(Service::Name const &name,
Session_label const &label) override
{
Session_label const &label,
Session::Diag const diag) override
diff --git a/repos/os/src/lib/sandbox/child.h b/repos/os/src/lib/sandbox/child.h
index f9d04cfdaf..a1e45dab0d 100644
index e5e9bd212c..965b9d3c32 100644
--- a/repos/os/src/lib/sandbox/child.h
+++ b/repos/os/src/lib/sandbox/child.h
@@ -595,6 +595,7 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
@@ -596,6 +596,7 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup
****************************/
Child_policy::Name name() const override { return _unique_name; }

View File

@ -14,7 +14,7 @@ with pkgs;
curl.hash = "sha256-5+nRKLrho9oO0XlzDO6ppZ2kLfWaIReY24YFYSQT7Xc=";
dde_bsd.hash = "sha256-KPA/ua3jETcHgWzhfhFm6ppds55Xi5YXJKDJvufJmU8=";
dde_ipxe.hash = "sha256-NJ129+DkxFg1fFHJBABBFRRjqEVNSz6v2hEB80AuEM4=";
dde_linux.hash = "sha256-xHAgeKfArgMGKCGHi0762qkUcY97vbiAQYjM/ZRXCes=";
dde_linux.hash = "sha256-jmb7cOuwhVPV9aHkQT84enbQy0xmbBZErURgBv8e/uY=";
dde_rump = {
hash = "sha256-Wr5otGkWEa+5xImsFHQzwap5LckNEbyWA/7xbNcOreI=";
nativeBuildInputs = [ subversion ];
@ -55,7 +55,7 @@ with pkgs;
seoul = {
nativeBuildInputs = [ gcc python2 ];
patches = [ ./patches/seoul-port.patch ];
hash = "sha256-0TYtZrLGl3IOFpRjBRf0fkUXDd1aDlOF8RePfqoKEwA=";
hash = "sha256-CZyLG6jbGoYbd35rY/6jACL4MEkWkNGuN31bJfl7iWw=";
};
stb.hash = "sha256-9LSH1i8jcEvjRAmTvgtK+Axy9hO7uiSzmSgBvs0zkTc=";
stdcxx.hash = "sha256-4L9HUG1Wz3oCCuyyakRYOXzRna26JeeTngIS+jvJDBc=";