[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH v3 3/3] lib/ukboot: Initialize the canary value at boot


  • To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Wed, 4 Dec 2019 15:14:38 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ViD4unS2o3B8c4+8QE3vVMnb/LXc9+ribAfN22YsEvk=; b=LvvF8lXpDL5LWp1JTv0TSKSeeElXGJVvCK73m+TjfIvanrG+feOURnByrCRV3yGdsz8Qn+BhxbG9JkAXBNEdsKP3P3YNViRNFhqarP+T1OrZZKoZKitcGsT76Uy82vzp9BGQN8M+0XPYdw2gORsbz4bXJ6Opyi4o/LytirZpjFvs/ksNUb76SHkIYbSS7rU1PqGJJWtSESfIt0NNffQ2vH1gTm3jLCv+EKfvjuYIPN/w7KTTRFMuXZCI9D9ORvVP8z9vRFGXGyj67WVWX5wPwv84ec6akbpLMrow17YFJCqd7VD8TwVg8zrL4CWUugMJ80VxE2FNqAzhAAKDmnKwlA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VLnfJ7dC5mzyTZ91D+jSZmZ7rLcb/HWBKBo7uoeq7iTqtljhDQ7eiDVtFEa2QTRK5i3ADhZd31Dn+TXoberiJQf4NeUSHkQK+Ao5yeEyehXcb9ZgNodeTVuqlAcqfHzmqyMzgF8fZEmYRpz1JR0apbGJSi82u4iTM6oHU2pS5kiK3bqQ64OS0XDw0uA1MpqdBuamTzP7LN4SZ9PapKYndIwbeo0Z8Skv8mKi3R0Az3xZjzQZ+E2e0FZpRWUPJlaA1CO4HMJ6Zwil0zzAbVzQ2hm/lZ5bkl00qhhfasUENYEGGYcNu6V8Orv4vBj9SCnQmVQ5qe9IcCCcRwyf6nBdQg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Cc: "felipe.huici@xxxxxxxxx" <felipe.huici@xxxxxxxxx>, "simon.kuenzer@xxxxxxxxx" <simon.kuenzer@xxxxxxxxx>, Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>, "sharan.santhanam@xxxxxxxxx" <sharan.santhanam@xxxxxxxxx>, "costin.lupu@xxxxxxxxx" <costin.lupu@xxxxxxxxx>
  • Delivery-date: Wed, 04 Dec 2019 15:14:57 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVqrWLXQWB0+l9dEOXM/K70XvLFg==
  • Thread-topic: [UNIKRAFT PATCH v3 3/3] lib/ukboot: Initialize the canary value at boot

From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>

We initialize the canary value at boot with a random variable.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
 lib/ukboot/boot.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/ukboot/boot.c b/lib/ukboot/boot.c
index 3f5046ca..34f6aa8b 100644
--- a/lib/ukboot/boot.c
+++ b/lib/ukboot/boot.c
@@ -61,6 +61,9 @@
 #ifdef CONFIG_LIBUKLIBPARAM
 #include <uk/libparam.h>
 #endif /* CONFIG_LIBUKLIBPARAM */
+#if CONFIG_LIBUKSP
+#include <uksp/stackprotector.h>
+#endif
 
 int main(int argc, char *argv[]) __weak;
 
@@ -190,6 +193,10 @@ void ukplat_entry(int argc, char *argv[])
                uk_ctortab[i]();
        }
 
+#if CONFIG_LIBUKSP
+       boot_init_stack_canary();
+#endif
+
 #ifdef CONFIG_LIBUKLIBPARAM
        rc = (argc > 1) ? uk_libparam_parse(argv[0], argc - 1, &argv[1]) : 0;
        if (unlikely(rc < 0))
-- 
2.20.1

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.