From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.4227.1616624610754548686 for ; Wed, 24 Mar 2021 15:23:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Lq2VONT8; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616624609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B/ZCFcyW+hZ8HsxMwYXijv5k0zrS6jE71L/QhImw6KU=; b=Lq2VONT8KwuVKRzlJLtcFy+yrfqyOWxQsCZ6aoqGPiUkaMocrRl8Mb8NQ4kF5HU2rVmNwL L7TS0R1JavinCzgdVX06FH3PvpM3gAVQuCSHd++4fwpHCQc5DcxweFeKEPXALQHCyuMQvV Yc7L+hkKX/Hd2w0jZEdLlRTgtFx5QKc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-338-Hw3aiabPPJOURgdgy-KB3g-1; Wed, 24 Mar 2021 18:23:25 -0400 X-MC-Unique: Hw3aiabPPJOURgdgy-KB3g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C9E9E801817; Wed, 24 Mar 2021 22:23:24 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-115-138.ams2.redhat.com [10.36.115.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F28B18400; Wed, 24 Mar 2021 22:23:23 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2] OvmfPkg: strip build paths in release builds To: devel@edk2.groups.io, ross@burtonini.com References: <20210324115819.605436-1-ross.burton@arm.com> From: "Laszlo Ersek" Message-ID: <62338d0d-ec93-d2ce-1c88-5df10660930c@redhat.com> Date: Wed, 24 Mar 2021 23:23:23 +0100 MIME-Version: 1.0 In-Reply-To: <20210324115819.605436-1-ross.burton@arm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 03/24/21 12:58, Ross Burton wrote: > GenFw will embed a NB10 section which contains the path to the input file, > which means the output files have build paths embedded in them. To reduce > information leakage and ensure reproducible builds, pass --zero in release > builds to remove this information. > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3256 > Signed-off-by: Ross Burton > --- > OvmfPkg/AmdSev/AmdSevX64.dsc | 1 + > OvmfPkg/Bhyve/BhyveX64.dsc | 1 + > OvmfPkg/OvmfPkgIa32.dsc | 1 + > OvmfPkg/OvmfPkgIa32X64.dsc | 1 + > OvmfPkg/OvmfPkgX64.dsc | 1 + > OvmfPkg/OvmfXen.dsc | 1 + > 6 files changed, 6 insertions(+) Reviewed-by: Laszlo Ersek Merged as commit f037af6ecbc3, via . Thanks, Laszlo > > diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc > index 65c42284d9..69a05feea9 100644 > --- a/OvmfPkg/AmdSev/AmdSevX64.dsc > +++ b/OvmfPkg/AmdSev/AmdSevX64.dsc > @@ -78,6 +78,7 @@ > GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable > INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable > !endif > + RELEASE_*_*_GENFW_FLAGS = --zero > > # > # Disable deprecated APIs. > diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc > index 4a1cdf5aca..132f55cf69 100644 > --- a/OvmfPkg/Bhyve/BhyveX64.dsc > +++ b/OvmfPkg/Bhyve/BhyveX64.dsc > @@ -76,6 +76,7 @@ > GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable > INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable > !endif > + RELEASE_*_*_GENFW_FLAGS = --zero > > # > # Disable deprecated APIs. > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index 1eaf3e99c6..93c209950c 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -80,6 +80,7 @@ > !if $(TOOL_CHAIN_TAG) != "XCODE5" && $(TOOL_CHAIN_TAG) != "CLANGPDB" > GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse > !endif > + RELEASE_*_*_GENFW_FLAGS = --zero > > # > # Disable deprecated APIs. > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index 4a5a430147..97cc438250 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -84,6 +84,7 @@ > GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable > INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable > !endif > + RELEASE_*_*_GENFW_FLAGS = --zero > > # > # Disable deprecated APIs. > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index d4d601b444..f544fb04bf 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -84,6 +84,7 @@ > GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable > INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable > !endif > + RELEASE_*_*_GENFW_FLAGS = --zero > > # > # Disable deprecated APIs. > diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc > index 507029404f..fcaa35acf1 100644 > --- a/OvmfPkg/OvmfXen.dsc > +++ b/OvmfPkg/OvmfXen.dsc > @@ -74,6 +74,7 @@ > GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable > INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable > !endif > + RELEASE_*_*_GENFW_FLAGS = --zero > > # > # Disable deprecated APIs. >