[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Minios-devel] [UNIKRAFT PATCH v4 4/4] 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: Tue, 4 Feb 2020 14:10:01 +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=PXLz4XlLsPtbEggJ0Zfi3jVuUamVyNUssLFutb+Iglk=; b=JTGiIutpkt1/2arzF7KhG7JgViJm+Zeqc5yCZOAuGVb4RWjA39YHdfqr+k1oAVfhNAnBXfUvXb6YFVfixTiEdpBlF6UDAuwa/iw1cyj/eM9Vf6Vx9myhJh4YZKiHWwm3YVWCsEnI8FBHoMHx61cMhZ3wzcOfruPZY/UMA/VLGEAPR6+sIr0tErtb9cvI6YwWuK0r9NIy+pcWhK5+SiYKE+YCpJOgU4EIaYr3sYqX83rE/pRqUj2R2r0qoIP9nGOfOk8tWTurig5fr3rZSx0hOHts8yTEafjGPZ0fFxjLI6orThnF5Ug8/k+rYtRCaqLdu4QMTwIjXYOla0GbfBnNNw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AUQZ9FWYAJCn0CyXjEuTgvOldV3hxt107xZClDzg89ZQxXcGo8nc62sKy6flFR/lIpJkSQrnzXBo6iKAfltHsEFF9pYSSGp944nYRrTYq079Ffx4nyrbcnxk/RJQyvFkqOATrN5pw72nPm040y7/II+/p2F7cR/+yGLCVqprVzKYwFlDSNZ9ggiUby32EqqsC0+cHoOODiaIV8sV235hOB6Ps6ZjTObOmDN1IBcI86eoQsSCTA6cbGBpd+xdD/eLMeVWAOiZhcHDxG3hpRg3l9IKwNc9h7xJhgT7AxO1Xx77YQJ37CrVGfPr+LWg4evXJsrvR+MOu70GIjhsEf8f+Q==
- 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>
- Delivery-date: Tue, 04 Feb 2020 14:10:17 +0000
- List-id: Mini-os development list <minios-devel.lists.xenproject.org>
- Thread-index: AQHV22TKBpvTUKEKOEKU8TPNpVsueA==
- Thread-topic: [UNIKRAFT PATCH v4 4/4] lib/ukboot: Initialize the canary value at boot
We initialize the canary value right after all the internal libraries
have loaded.
Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
lib/ukboot/boot.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/ukboot/boot.c b/lib/ukboot/boot.c
index e8a2ac79..f7873a12 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 <uk/sp.h>
+#endif
int main(int argc, char *argv[]) __weak;
@@ -195,6 +198,11 @@ void ukplat_entry(int argc, char *argv[])
(*ctorfn)();
}
+#if CONFIG_LIBUKSP
+ 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
|