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

[Minios-devel] [UNIKRAFT PATCH 2/3] build: Add option to toggle the stack protection


  • To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Tue, 13 Aug 2019 09:54:44 +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=bb0K4giHc+osE7zbAzlZjtwIwzURciM8u7baqvEGSBE=; b=jTOrKL2iJPX+gpbFRWyQcbSgaKTkTmq3/Rk96ps3Far5jdzvMcEsO0lTNycLfxM5TkiUBKWtW1ynfb+twMhAUqrJH5etRlgyMfNen05HQ7OqJXNeqOevJRUklqmta1Qw6PFcqUxF8n6msOnQU5wXKDKpkV3dR4nEz5w17MnB42JJ8GCvXilhNDNQKawERMNCnXUWMn95J67aX3eBJ3lKf3yqd63fsHoII5kP3SkZp9LOs089e29b0/PaDzMGJkFUdZWbn2avgAESMfs1cIJRTtxEieumZNM417FyHUZmfoVQTXZ24qE4G3vef8pTDDyfty4ozz/K8GCww/by4qWQPA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JUGHLCdgTiyVm4yH1o8IjfYt+R6m0YZs7FGmqwlGbGxPFwQQ9d66TWz9t3G5eq6zMjFLi7D8mQQYN3BA3T9HSqWNcwqTn3LP7ZUS//g7cfEuUTqxPdGHtSt6mzMzB+0okDrMiSiZpaqlpZtlO7Lm3k6mKKRRBtvdtcqJ0/fyFnZVYw8ndohqA2ilW6bifQv9QCP8GdSdJuHBg8t8yBvCYCK7lfr/J+Mcklz01t3lkzZyZhRI/cgoRY9jlHgrfu3iDtVCy5P5mKB+rKVAiNHIOnfPE/T6719UN/niEaySB/9NogGDkMkc5JFr695Vmppxv+tlgsfTKQ78vdYsV0UdyA==
  • 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>, "costin.lupu@xxxxxxxxx" <costin.lupu@xxxxxxxxx>
  • Delivery-date: Tue, 13 Aug 2019 09:54:54 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVUb0iSxFOE4NlyUm+iVaZsG2Z+A==
  • Thread-topic: [UNIKRAFT PATCH 2/3] build: Add option to toggle the stack protection

This patch enables the -fno-stack-protector flag if the stack protector is
not enabled.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
 Makefile.uk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile.uk b/Makefile.uk
index 2047dae..84b7f90 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -8,12 +8,12 @@ ASFLAGS     += -U __linux__ -U __FreeBSD__ -U __sun__ 
-D__ASSEMBLY__
 ASINCLUDES  += -nostdinc -nostdlib -I$(CONFIG_UK_BASE)/include
 
 CFLAGS      += -U __linux__ -U __FreeBSD__ -U __sun__
-CFLAGS      += -fno-stack-protector -fno-omit-frame-pointer -fno-tree-sra
+CFLAGS      += -fno-omit-frame-pointer -fno-tree-sra
 CFLAGS      += -Wall -Wextra
 CINCLUDES   += -nostdinc -nostdlib -I$(CONFIG_UK_BASE)/include
 
 CXXFLAGS    += -U __linux__ -U __FreeBSD__ -U __sun__
-CXXFLAGS    += -fno-stack-protector -fno-omit-frame-pointer -fno-tree-sra
+CXXFLAGS    += -fno-omit-frame-pointer -fno-tree-sra
 CXXFLAGS    += -Wall -Wextra
 CXXINCLUDES += -nostdinc -nostdlib -I$(CONFIG_UK_BASE)/include
 
@@ -23,6 +23,11 @@ CXXINCLUDES += -nostdinc -nostdlib 
-I$(CONFIG_UK_BASE)/include
 LIBLDFLAGS  += -nostdinc -nostdlib -Wl,--omagic -Wl,-r -Wl,-d 
-Wl,--build-id=none
 LDFLAGS     += -nostdinc -nostdlib -Wl,--omagic -Wl,--build-id=none
 
+ifndef CONFIG_LIBUKSECURITY_SSP
+CFLAGS      += -fno-stack-protector
+CXXFLAGS    += -fno-stack-protector
+endif
+
 CFLAGS-$(CONFIG_OPTIMIZE_NONE)            += -O0 -fno-optimize-sibling-calls 
-fno-tree-vectorize
 CXXFLAGS-$(CONFIG_OPTIMIZE_NONE)          += -O0 -fno-optimize-sibling-calls 
-fno-tree-vectorize
 CFLAGS-$(CONFIG_OPTIMIZE_PERF)            += -O2
-- 
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®.