~ehmry/sigil

e9d784ac527c74b2c6a28901e29d49b9961f8eca — Emery Hemingway 1 year, 9 months ago 8379dcc
Patch: Increase session creation buffer size to 240 bytes
1 files changed, 56 insertions(+), 2 deletions(-)

M packages/genodelabs/patches/label-fail.patch
M packages/genodelabs/patches/label-fail.patch => packages/genodelabs/patches/label-fail.patch +56 -2
@@ 1,7 1,7 @@
From 4250346b87b8e24a48d04ddacc77512eaa20ce0e Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Sat, 7 Nov 2020 11:23:03 +0100
Subject: [PATCH 1/2] base: fail on label truncation
Subject: [PATCH 1/3] base: fail on label truncation

---
 repos/base/include/base/session_label.h | 27 ++++++++++++++++++++++---


@@ 102,7 102,7 @@ index 610fbb16b3..48777e0c2a 100644
From 252c08cf61ad7feef83bd2e542465330633ba41f Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Wed, 10 Feb 2021 13:32:42 +0100
Subject: [PATCH 2/2] Detect destroyed argument buffers at Env::session
Subject: [PATCH 2/3] Detect destroyed argument buffers at Env::session

Session request arguments are silently zeroed when their length
exceedes some buffer size.


@@ 128,3 128,57 @@ index 568be31efb..913687ea7f 100644
-- 
2.30.0


From 53641e192bc3f9a756ae15b91640a42ac7e70918 Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Thu, 11 Feb 2021 14:10:50 +0100
Subject: [PATCH 3/3] Increase session arguments buffer size to 240 bytes

---
 repos/base/include/parent/parent.h | 2 +-
 repos/base/include/root/root.h     | 2 +-
 repos/base/lib/symbols/ld          | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/repos/base/include/parent/parent.h b/repos/base/include/parent/parent.h
index 7379342e5b..6e94047788 100644
--- a/repos/base/include/parent/parent.h
+++ b/repos/base/include/parent/parent.h
@@ -54,7 +54,7 @@ class Genode::Parent
 	public:
 
 		typedef Rpc_in_buffer<64>  Service_name;
-		typedef Rpc_in_buffer<160> Session_args;
+		typedef Rpc_in_buffer<240> Session_args;
 		typedef Rpc_in_buffer<160> Upgrade_args;
 
 		struct Client : Interface { typedef Id_space<Client>::Id Id; };
diff --git a/repos/base/include/root/root.h b/repos/base/include/root/root.h
index c7e3a0c908..4fda9e341f 100644
--- a/repos/base/include/root/root.h
+++ b/repos/base/include/root/root.h
@@ -29,7 +29,7 @@ namespace Genode {
 
 struct Genode::Root
 {
-	typedef Rpc_in_buffer<160> Session_args;
+	typedef Rpc_in_buffer<240> Session_args;
 	typedef Rpc_in_buffer<160> Upgrade_args;
 
 	virtual ~Root() { }
diff --git a/repos/base/lib/symbols/ld b/repos/base/lib/symbols/ld
index 3cfbdd7466..d7603e8ca4 100644
--- a/repos/base/lib/symbols/ld
+++ b/repos/base/lib/symbols/ld
@@ -398,6 +398,8 @@ _ZThn236_N5Timer10Connection11set_timeoutEN6Genode12MicrosecondsERNS1_15Timeout_
 _ZThn236_N5Timer10Connection9curr_timeEv T
 _ZThn288_N5Timer10Connection11set_timeoutEN6Genode12MicrosecondsERNS1_15Timeout_handlerE T
 _ZThn288_N5Timer10Connection9curr_timeEv T
+_ZThn368_N5Timer10Connection11set_timeoutEN6Genode12MicrosecondsERNS1_15Timeout_handlerE T
+_ZThn368_N5Timer10Connection9curr_timeEv T
 _ZThn8_N6Genode17Timeout_scheduler14handle_timeoutENS_8DurationE T
 _ZThn8_N6Genode17Timeout_schedulerD0Ev T
 _ZThn8_N6Genode17Timeout_schedulerD1Ev T
-- 
2.30.0