diff options
author | Ricardo Neri <ricardo.neri-calderon@linux.intel.com> | 2019-07-29 19:59:15 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-12 16:23:57 +0100 |
commit | bc59000e77b08d50d5dca3f38f8e52c9b6796304 (patch) | |
tree | f112b334077ea81ba20b6c2b295dbbff4891c613 /meta/recipes-core/ovmf/ovmf/0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch | |
parent | b2dd0b1c7c75522f9bef63160d921585c2e4300b (diff) | |
download | poky-bc59000e77b08d50d5dca3f38f8e52c9b6796304.tar.gz |
ovmf: Update to version edk2-stable201905
Fixes [YOCTO #13438]
Update OVMF to edk2-stable201905. Since the last update, several things
have changed. Many of the patches we were carrying have now been taken
upstream in EDK2 or become obsolete. See below for details.
Also, as of commit 0c1ffb9504c3("CryptoPkg: Adding OpenSSL as one
submodule of EDKII repo"), openssl is not embedded into EDK2 using a
patching script but a git submodule. Then, use the gitsm bitbabke fetcher
and drop the extra SRC_URI from openssl when building with secureboot
enabled. Also remove all related variables.
OVMF switched to BSD+Patent license as detailed in
https://bugzilla.tianocore.org/show_bug.cgi?id=1373. Hence, update
LIC_FILES_CHKSUM accordingly to reflect this change.
Patches are updated as follows:
Drop 0001-ia32-Dont-use-pie.patch as it is implemented in upstream EDK2
in commits are 11d0cd23dd1b ("BaseTools/tools_def IA32: drop -no-pie linker
option for GCC49" and c25d3905523a ("BaseTools/tools_def IA32: disable PIE
code generation explicitly") for the applicable GCC versions.
Rebase 0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch
to edk2-stable201905.
Drop VfrCompile-increase-path-length-limit.patch as it has been taken
upstream in EDK2 in commit ba78032bc8c9f("BaseTools/VfrCompile: Remove the
MAX_PATH limitation").
Rebase no-stack-protector-all-archs.patch to keep behavior on not using
stack protector on all archs.
Drop 0001-BaseTools-header.makefile-add-Wno-stringop-truncatio.patch,
0002-BaseTools-header.makefile-add-Wno-restrict.patch, and
0003-BaseTools-header.makefile-revert-gcc-8-Wno-xxx-optio.patch. These
patches have been taken in upstream EDK2 in commits 9222154ae7b3("BaseTools
/header.makefile: add "-Wno-restrict"), 1d212a83df0e("BaseTools/
header.makefile: add "-Wno-stringop-truncation"), and 777f4aa083e9
("BaseTools/header.makefile: revert gcc-8 '-Wno-xxx' options on OSX"),
respectively.
Also, drop 0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch.
GenVtf has been removed from EDK2 in commit 64ab2c82e8f6("BaseTools:
Remove GenVtf"). Also, this patch had been taken in EDK2 upstream in
commit 9de306701312("BaseTools/GenVtf: silence false 'stringop-overflow'
warning with memcpy()").
Drop patch 0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch
as it also has been taken by EDK2.
Patches 0002-ovmf-update-path-to-native-BaseTools.patch and
0004-ovmf-enable-long-path-file.patch did not need any update.
Lastly, add a needed dependency on bc.
Cc: Ross Burton <ross.burton@intel.com>
Cc: Patrick Ohly <patrick.ohly@intel.com>
(From OE-Core rev: 1f64ecf92fa77b682b18efe72fb6b27ff64ee052)
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/ovmf/ovmf/0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch')
-rw-r--r-- | meta/recipes-core/ovmf/ovmf/0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/meta/recipes-core/ovmf/ovmf/0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch b/meta/recipes-core/ovmf/ovmf/0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch deleted file mode 100644 index 7ad7cdf0ce..0000000000 --- a/meta/recipes-core/ovmf/ovmf/0004-BaseTools-GenVtf-silence-false-stringop-overflow-war.patch +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | From dfb42a5bff78d9239a80731e337855234badef3e Mon Sep 17 00:00:00 2001 | ||
2 | From: Laszlo Ersek <lersek@redhat.com> | ||
3 | Date: Fri, 2 Mar 2018 17:11:52 +0100 | ||
4 | Subject: [PATCH 4/4] BaseTools/GenVtf: silence false "stringop-overflow" | ||
5 | warning with memcpy() | ||
6 | |||
7 | gcc-8 (which is part of Fedora 28) enables the new warning | ||
8 | "-Wstringop-overflow" in "-Wall". This warning is documented in detail at | ||
9 | <https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html>; the | ||
10 | introduction says | ||
11 | |||
12 | > Warn for calls to string manipulation functions such as memcpy and | ||
13 | > strcpy that are determined to overflow the destination buffer. | ||
14 | |||
15 | It breaks the BaseTools build with: | ||
16 | |||
17 | > GenVtf.c: In function 'ConvertVersionInfo': | ||
18 | > GenVtf.c:132:7: error: 'strncpy' specified bound depends on the length | ||
19 | > of the source argument [-Werror=stringop-overflow=] | ||
20 | > strncpy (TemStr + 4 - Length, Str, Length); | ||
21 | > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
22 | > GenVtf.c:130:14: note: length computed here | ||
23 | > Length = strlen(Str); | ||
24 | > ^~~~~~~~~~~ | ||
25 | |||
26 | It is a false positive because, while the bound equals the length of the | ||
27 | source argument, the destination pointer is moved back towards the | ||
28 | beginning of the destination buffer by the same amount (and this amount is | ||
29 | range-checked first, so we can't precede the start of the dest buffer). | ||
30 | |||
31 | Replace both strncpy() calls with memcpy(). | ||
32 | |||
33 | Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> | ||
34 | Cc: Cole Robinson <crobinso@redhat.com> | ||
35 | Cc: Liming Gao <liming.gao@intel.com> | ||
36 | Cc: Paolo Bonzini <pbonzini@redhat.com> | ||
37 | Cc: Yonghong Zhu <yonghong.zhu@intel.com> | ||
38 | Reported-by: Cole Robinson <crobinso@redhat.com> | ||
39 | Contributed-under: TianoCore Contribution Agreement 1.1 | ||
40 | Signed-off-by: Laszlo Ersek <lersek@redhat.com> | ||
41 | Reviewed-by: Liming Gao <liming.gao@intel.com> | ||
42 | --- | ||
43 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
44 | Upstream-Status: Backport | ||
45 | BaseTools/Source/C/GenVtf/GenVtf.c | 4 ++-- | ||
46 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
47 | |||
48 | diff --git a/BaseTools/Source/C/GenVtf/GenVtf.c b/BaseTools/Source/C/GenVtf/GenVtf.c | ||
49 | index 2ae9a7be2c..0cd33e71e9 100644 | ||
50 | --- a/BaseTools/Source/C/GenVtf/GenVtf.c | ||
51 | +++ b/BaseTools/Source/C/GenVtf/GenVtf.c | ||
52 | @@ -129,9 +129,9 @@ Returns: | ||
53 | } else { | ||
54 | Length = strlen(Str); | ||
55 | if (Length < 4) { | ||
56 | - strncpy (TemStr + 4 - Length, Str, Length); | ||
57 | + memcpy (TemStr + 4 - Length, Str, Length); | ||
58 | } else { | ||
59 | - strncpy (TemStr, Str + Length - 4, 4); | ||
60 | + memcpy (TemStr, Str + Length - 4, 4); | ||
61 | } | ||
62 | |||
63 | sscanf ( | ||
64 | -- | ||
65 | 2.17.0 | ||
66 | |||