From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::242; helo=mail-wr0-x242.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0D6D720347160 for ; Thu, 26 Oct 2017 06:53:38 -0700 (PDT) Received: by mail-wr0-x242.google.com with SMTP id 15so3260601wrb.5 for ; Thu, 26 Oct 2017 06:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=f8d4IxLADUkulbdSioEWgNvAGHuSayIcx1cdaSfUnZU=; b=Jx3pygk+3wbdusgCFGQ1o7DeUsdwg7OjDufq7yVddGQ88NFDnr1XOogE5/fNyxfQRq W2DY6sYUn+lCq3JNl+MebfDEL3CKTLu9ATuciTcV7u1271Et/HblVFJSUBl63MfXY83D 9IYg1R7EzmSNoGSvUPcllQevwtACAj4J++d7Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=f8d4IxLADUkulbdSioEWgNvAGHuSayIcx1cdaSfUnZU=; b=SH39lvNitw2nwsCyjx78Gq6kRNA2mjMxUgWP+1oEgb2Ia4F199Sg/sXnWFx92zGJJ+ 749YQNdx7+nZTs6INLnSv1n3KppyeSaqfpzbqpdf9kWZf50TdFdNobfhAgOxDMHyWZj8 4VJK6zlJRXSDb8m8oh3mfj+dtCs4tJaOe7JV5SafehZfw0WJpQ1YKDFPgOpGBQrVKu+g pR//fo9cgFv5XSc+m867bj6CzPjhzVy7GQsWEaX/0aYAJcRh5WdM9+YRXqOEF4x/OGbS i0zDehA7JA1nsKUq7Kenmo55ad9uI9HoIh0r2A4EcTcdm3/js5PDPgndyRV3aKh7j6Vd i+3g== X-Gm-Message-State: AMCzsaWH6NbniUDoF+mwHUOxh45Rkb5jAzpZdD1HMYtC3GEei/Y+wy96 bA+xaH5yJc3J7Z+Yv0T3ol1FfA== X-Google-Smtp-Source: ABhQp+Rc6DFVhl88TB0kModQsRrZfybHoGhe2sOWg3TI2KKPmQaMVTRMcY9Lq7nrJkfjr+aKeAOwjA== X-Received: by 10.223.155.146 with SMTP id d18mr1733664wrc.174.1509026242937; Thu, 26 Oct 2017 06:57:22 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id e132sm1206535wmd.42.2017.10.26.06.57.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Oct 2017 06:57:21 -0700 (PDT) Date: Thu, 26 Oct 2017 14:57:20 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: Marcin Wojtas , "edk2-devel@lists.01.org" , Nadav Haklai , Neta Zur Hershkovits , Kostya Porotchkin , Hua Jing , Jan =?utf-8?B?RMSFYnJvxZs=?= Message-ID: <20171026135720.p4jef2ruhe3zfnsq@bivouac.eciton.net> References: <1508980777-29006-1-git-send-email-mw@semihalf.com> <1508980777-29006-6-git-send-email-mw@semihalf.com> <20171026132654.hrlsmozwndcjady7@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [platforms: PATCH 05/10] Marvell/Library: MppLib: Disable the stack protector X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 13:53:38 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 26, 2017 at 02:29:02PM +0100, Ard Biesheuvel wrote: > On 26 October 2017 at 14:26, Leif Lindholm wrote: > > On Thu, Oct 26, 2017 at 03:19:32AM +0200, Marcin Wojtas wrote: > >> From: Ard Biesheuvel > >> > >> MppLib may be used very early (in SEC), at which point stack protection > >> measures are more likely to cause harm than help, given that not even > >> the UART has been configured to the point where we can complain usefully. > >> So just disable it. > > > > It may. But it is also used by PlatInitDxe. > > Can we use different build options for SEC and later phases? > > No, libraries are only built a single time during the build, and > linked into every module that depends on them. This is the same issue > we had with -mstrict-align. Sure, but we could have duplicated the .inf and have a SEC version and use that mapping for SEC... Clearly that's tedious. I guess it comes down to how useful we think the stack checking is in general. If the answer is "not very, to be honest": Reviewed-by: Leif Lindholm / Leif > >> Contributed-under: TianoCore Contribution Agreement 1.1 > >> Signed-off-by: Ard Biesheuvel > >> Signed-off-by: Marcin Wojtas > >> --- > >> Platform/Marvell/Library/MppLib/MppLib.inf | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/Platform/Marvell/Library/MppLib/MppLib.inf b/Platform/Marvell/Library/MppLib/MppLib.inf > >> index 2de9cd0..1268542 100644 > >> --- a/Platform/Marvell/Library/MppLib/MppLib.inf > >> +++ b/Platform/Marvell/Library/MppLib/MppLib.inf > >> @@ -106,3 +106,6 @@ > >> gMarvellTokenSpaceGuid.PcdChip3MppSel7 > >> > >> gMarvellTokenSpaceGuid.PcdPciESdhci > >> + > >> +[BuildOptions] > >> + *_*_*_CC_FLAGS = -fno-stack-protector > >> -- > >> 2.7.4 > >>