From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::242; helo=mail-io0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::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 B1BA7203525FD for ; Thu, 26 Oct 2017 06:25:17 -0700 (PDT) Received: by mail-io0-x242.google.com with SMTP id n137so5347938iod.6 for ; Thu, 26 Oct 2017 06:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2ssnQ1ZHCej0k2m6j1z/xrB45Nk8DFWlplNAp1T82WU=; b=FjJe6k6x7BrPtyVEM3sLxagFPz0gN8qNZMNLpVtC1z8Ss4sv9tmeObeBDHy9NE+cQ/ mWGcLnwnruigDp9m4ar8twAeMSHhWV5T07lhgy6RX8CMthEYyp4c0640qytbx7ES/3NY YmMgh/hkpLW8Ef5hWQPk1pEar2CMKxi5OCjEY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=2ssnQ1ZHCej0k2m6j1z/xrB45Nk8DFWlplNAp1T82WU=; b=TeB4cxgoRNAJrBNwAa6V6oLgyBBv4ZgC87//Tvn60DLUik2ha8C8VnieDMk+yus4A4 WQnnZVKkjmnqhsONKR/2f8KdjdL7I85X1uI9Wut6pEUCWLLg+DUwW0erIwecnHhAdu+t PhGAMQwVK9+WrGZ5LTZNiNpCHRI/cNLxjARsMu8uH+Hi2TzYVnTXsTbuGfKHiMiVqzYV VDknILkr2H+5ncR7pIhZD2NaVlWFjlKGFcIOCuj6hsOSw5p4pDHaVjkKjRdubtSKFREE vGHtm59nCeR92s/s4Eg/S1mLdfuGfCb24GPYxoUuSrgaJeot49fPO2kRaBv8En6mubYL zU5w== X-Gm-Message-State: AMCzsaV9Muihv2fVP1da691Ex9NzxkPyIXofYcTGTpe2uwbT6vWxR/EQ ZHrim4lZT4KAURR34VEyzS1xk1YbONPobAqq0fdHxA== X-Google-Smtp-Source: ABhQp+SVQV2eDRQl5BVhMPs4xyo4xCTeztBSH9cfs9cuz7Wv0JzfysWK0keVKkGz7Vvxgy5Ut/dzo3HK3iBQgBHK9zM= X-Received: by 10.107.133.91 with SMTP id h88mr29371778iod.52.1509024542995; Thu, 26 Oct 2017 06:29:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.131.167 with HTTP; Thu, 26 Oct 2017 06:29:02 -0700 (PDT) In-Reply-To: <20171026132654.hrlsmozwndcjady7@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> From: Ard Biesheuvel Date: Thu, 26 Oct 2017 14:29:02 +0100 Message-ID: To: Leif Lindholm Cc: Marcin Wojtas , "edk2-devel@lists.01.org" , Nadav Haklai , Neta Zur Hershkovits , Kostya Porotchkin , Hua Jing , =?UTF-8?B?SmFuIETEhWJyb8Wb?= 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:25:17 -0000 Content-Type: text/plain; charset="UTF-8" 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. > >> 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 >>