Colin Watson
47e67d809c
Remove pragmas related to -Wunreachable-code
...
-Wunreachable-code has been a no-op since GCC 4.5; GRUB hasn't been
compiled with it since 2012; and GCC 6 produces "error:
'-Wunreachable-code' is not an option that controls warnings" for these.
Fixes Debian bug #812047 .
2016-01-20 15:56:55 +00:00
Colin Watson
92bbf25714
loader/bsd: Fix signed/unsigned comparison
2016-01-16 20:40:55 +00:00
Colin Watson
95440b41d3
ahci, ehci: Fix typos
2016-01-16 20:37:15 +00:00
Andrei Borzenkov
77002c65d3
tftp: fix memory leaks in open
...
If protocol open fails, file is immediately freed, so data was leaked.
Found by: Coverity scan.
CID: 96659
2016-01-16 21:27:57 +03:00
Andrei Borzenkov
d4561cd080
tcp: fix memory leaks
...
Found by: Coverity scan.
CID: 96639, 96647
2016-01-16 20:59:50 +03:00
Andrei Borzenkov
9b4256bf05
net: fix memory leaks
...
Found by: Coverity scan.
CID: 96638, 96648
2016-01-16 20:48:33 +03:00
Andrei Borzenkov
eefa3239c2
legacycfg: fix memory leaks and add NULL check
...
Memory leaks found by Coverity scan.
CID: 96642, 96645
2016-01-16 20:34:02 +03:00
Andrei Borzenkov
4f8fe948b9
loader: Unintended sign extension
...
CID: 96707, 96699, 96693, 96691, 96711, 96709, 96708, 96703, 96702,
96700, 96698, 96696, 96695, 96692, 96710, 96705
2016-01-15 19:18:05 +03:00
Andrei Borzenkov
b95e926788
script: fix memory leak
...
Found by: Coverity scan.
CID: 96637
2016-01-12 22:50:30 +03:00
Andrei Borzenkov
26533fe6bc
normal: fix memory leak
...
Found by: Coverity scan.
CID: 96641, 96670, 96667
2016-01-12 22:40:03 +03:00
Andrei Borzenkov
29862fdc3a
xnu: fix memory leak
...
Found by: Coverity scan.
CID: 96663
2016-01-12 21:52:51 +03:00
Andrei Borzenkov
9daf7aae8b
truecrypt: fix memory leak
...
Found by: Coverity scan.
CID: 156611
2016-01-12 21:52:51 +03:00
Andrei Borzenkov
a4b1326f0d
gfxmenu: fix memory leak
...
Found by: Coverity scan.
CID: 96657
2016-01-12 21:52:50 +03:00
Andrei Borzenkov
dbb0f9fa4f
efiemu: fix memory leak
...
Found by: Coverity scan.
CID: 156610
2016-01-12 21:52:50 +03:00
Andrei Borzenkov
e9d71db53a
efidisk: fix memory leak
...
Found by: Coverity scan.
CID: 96644
2016-01-12 21:52:50 +03:00
Andrei Borzenkov
6c35ce72ba
verify: fix memory leak
...
Found by: Coverity scan.
CID: 96643
2016-01-12 21:52:42 +03:00
Andrei Borzenkov
f3c84fa798
password_pbkdf2: fix memory leak
...
Found by: Coverity scan.
CID: 96656
2016-01-12 20:53:26 +03:00
Andrei Borzenkov
5db2190f2c
parttool: fix memory leak
...
Found by: Coverity scan.
CID: 96652
2016-01-12 20:41:44 +03:00
Andrei Borzenkov
1bff60e5aa
nativedisk: fix memory leak
...
Based on Coverity scan.
CID: 96660
Extended to also cover other error return places.
2016-01-12 20:37:43 +03:00
Andrei Borzenkov
8fe17d91af
acpi: fix memory leak
...
Found by: Coverity scan.
CID: 96673
2016-01-12 20:26:30 +03:00
Andrei Borzenkov
528256932b
net: remove dead and redundant code
...
server cannot be NULL at this point (we return error earlier if it is).
Also structure is zalloc'ed, so no need to explicitly initialize
members to 0.
Found by: Coverity scan.
CID: 73837
2016-01-10 11:33:13 +03:00
Andrei Borzenkov
269a522c7d
hostdisk: fix device detection
...
Condition was apparently reversed so GRUB assumed all devices were
files. This later made it skip BLKFLSBUF ioctl on Linux which caused
various page cache coherency issues. Observed were
- failure to validate blocklist install (read content did not match
just written)
- failure to detect Linux MD on disk after online hot addition
(GRUB got stale superblock)
Closes: 46691
2016-01-10 10:41:04 +03:00
Andrei Borzenkov
31f6506c57
loader/multiboot: fix unintended sign extension
...
Found by: Coveruty scan.
CID: 73700, 73763
2016-01-09 19:58:51 +03:00
Andrei Borzenkov
9fecb0588e
kern/elf: fix unintended sign extension
...
Found by: Coverity scan.
CID: 73729, 73735, 73758, 73760
2016-01-09 19:41:26 +03:00
Andrei Borzenkov
aafd205c92
xfs: fix possible inode corruption in directory scan
...
grub_xfs_iterate_dir did not restore first character after inline
name when match was found. Dependning on XFS format this character
could be inode number and we could return to the same node later in
find_file if processing cycled symlinks.
CID: 86724
2016-01-09 18:55:55 +03:00
Andrei Borzenkov
bd60f5a207
rescue_parser: restructure code to avoid Coverity false positive
...
If line contains single word, line and argv[0] are aliases, so
no NULL dereference is possible, but Coverity does not know it.
Change code to avoid ambiguity and also remove redundant call to
grub_strchr.
CID: 86725
2016-01-09 18:15:27 +03:00
Andrei Borzenkov
fa2af21ec8
gfxmenu: fix memory leak
...
Found by: Coverity scan.
CID: 73766
2016-01-09 13:55:28 +03:00
Andrei Borzenkov
67d9ce82ac
efiemu: check return value of grub_efiemu_write_value
...
Found by: Coverity scan.
CID: 73590
2016-01-09 11:36:42 +03:00
Andrei Borzenkov
12bf87466f
efiemu: change code to avoid Coverity false positive
...
CID: 73623
2016-01-09 11:36:42 +03:00
Andrei Borzenkov
97c41e1216
efiemu: fix unintended sign extension
...
Found by: Coverity scan.
CID: 73883, 73637
2016-01-09 11:36:42 +03:00
Andrei Borzenkov
8ab2675ede
hfs: fix memory leak
...
Found by: Coverity scan.
CID: 156531
2016-01-09 11:36:42 +03:00
Vladimir Serbinenko
e4c49cab9b
arm64/setjmp: Add missing move for arg1 == 0 case.
2016-01-07 21:10:05 +01:00
Mark Salter
7eb27a49e9
arm-efi: Reduce timer event frequency by 10
...
Timer event to keep grub msec counter was running at 1000HZ. This was too
fast for UEFI timer driver and resulted in a 10x slowdown in grub time
versus wallclock. Reduce the timer event frequency and increase tick
increment accordingly to keep better time.
2016-01-07 20:54:20 +01:00
Vladimir Serbinenko
607d66116a
iee1275/datetime: Fix off-by-1 error.
2016-01-07 15:53:42 +01:00
Vladimir Serbinenko
f86fd54cf0
Add memdisk support to grub-emu.
...
Use it to add custom files, so that tests which need them work.
2016-01-05 21:10:27 +01:00
Vladimir Serbinenko
3f430a0126
Move file loading functions to grub-emu.
...
So that we can use it in grub-emu as well as utils.
2016-01-05 21:10:27 +01:00
Vladimir Serbinenko
f2b54835f2
Disable progress indicator in grub-shell.
...
This disables progress indicator for tests. This in turn fixes test
flakiness as they ended up timing-dependent.
2016-01-05 21:10:10 +01:00
Vladimir Serbinenko
300be005a8
Update checksums
2016-01-05 11:55:30 +01:00
Andrei Borzenkov
aa7bb4607b
acpihalt: add GRUB_ACPI_OPCODE_CREATE_DWORD_FIELD (0x8a)
...
Fixes ACPI halt on ASUSTeK P8B75-V,
Bios: American Megatrends v: 0414 date: 04/24/2012
Reported-By: Goh Lip <g.lip@gmx.com>
2016-01-02 21:33:18 +03:00
Andrei Borzenkov
19554a6034
acpihalt: fix GRUB_DSDT_TEST compilation
2016-01-02 19:02:19 +03:00
Andrei Borzenkov
ba83ed1538
Add missing BUILD_EXEEXT
2016-01-01 12:06:40 +03:00
Andrey Borzenkov
4d6e9c8a92
remove temporary .bin files (kernel and modules)
2015-12-31 23:00:25 +03:00
Vladimir Serbinenko
3b21499506
Disable build-time module check on emu.
...
On emu some checks can be laxer like check for relocation range. Additionally
module loading in emu is rarely used. So skip this check rather than making
it laxer for all platforms. In ideal we may want to have slightly different
check for emu but for now this is good enough.
2015-12-31 18:20:11 +01:00
Vladimir Serbinenko
68e158dffd
Strip .ARM.exidx
...
This section is generated by clang and is useful only for debugging.
It contains exotic relocations, so strip them to avoid them interferring
with module loading.
2015-12-31 18:13:59 +01:00
Vladimir Serbinenko
76588d1319
xen/relocator: Use local symbol to ensure that code is relocation-free.
2015-12-31 14:54:56 +01:00
Vladimir Serbinenko
60ae582142
backtrace: Fix register call syntax
2015-12-31 14:54:48 +01:00
Vladimir Serbinenko
a7cf8b1e23
Verify modules on build-time rather than failing in runtime.
2015-12-31 13:09:15 +01:00
Vladimir Serbinenko
5919626c90
sparc64: Fix assembly to let compiler to fill in memory references.
...
This fixes the use of not fully relocatable (they assume that variables are
under 4G limit in virtual memory) references.
2015-12-31 13:07:16 +01:00
Vladimir Serbinenko
79cfad6fbe
backtrace: Remove assembly assumption that grub_backtrace_pointer is under 4G
2015-12-30 18:19:44 +01:00
Andrei Borzenkov
93ecc3f1f8
menu: fix line count calculation for long lines
...
It gave one extra screen line if length was exactly equal to screen
width.
Reported by Michael Chang.
Also-By: Michael Chang <mchang@suse.com>
2015-12-30 06:20:51 +03:00