]> git.ipfire.org Git - thirdparty/grub.git/log
thirdparty/grub.git
10 years agoefi: fix memory leak in variable handling
Ignat Korchagin [Thu, 23 Jul 2015 18:13:09 +0000 (21:13 +0300)] 
efi: fix memory leak in variable handling

10 years agoexclude.pot: Add missing blacklisted strings.
Vladimir Serbinenko [Thu, 23 Jul 2015 17:04:55 +0000 (19:04 +0200)] 
exclude.pot: Add missing blacklisted strings.

10 years agoarchelp: Fix handling of dot and dotdot at the end of the name.
Vladimir Serbinenko [Thu, 23 Jul 2015 17:01:00 +0000 (19:01 +0200)] 
archelp: Fix handling of dot and dotdot at the end of the name.

Fixes cpio_test and tar_test.

10 years agoarm-emu: Add __aeabi_memcpy* and __aeabi_memclr* symbols.
Vladimir Serbinenko [Thu, 23 Jul 2015 00:15:46 +0000 (02:15 +0200)] 
arm-emu: Add __aeabi_memcpy* and __aeabi_memclr* symbols.

Fixes compilation with clang.

10 years agofwstart: Fix loading of address of read_spd_fail.
Vladimir Serbinenko [Wed, 22 Jul 2015 19:42:41 +0000 (21:42 +0200)] 
fwstart: Fix loading of address of read_spd_fail.

10 years agofwstart: Add missing argument to p2align.
Vladimir Serbinenko [Wed, 22 Jul 2015 19:41:58 +0000 (21:41 +0200)] 
fwstart: Add missing argument to p2align.

Resulting binary is unchanged as it happens we were already aligned
by chance.

10 years agofwstart: Replace blt with bltz.
Vladimir Serbinenko [Wed, 22 Jul 2015 19:40:55 +0000 (21:40 +0200)] 
fwstart: Replace blt with bltz.

blt A, $zero, B and bltz A, B are equivalent but clang recognizes only
later, so use it.

Resulting binary is unchanged.

10 years agoRemove mips_attributes.
Vladimir Serbinenko [Wed, 22 Jul 2015 18:47:56 +0000 (20:47 +0200)] 
Remove mips_attributes.

mips_attributes was introduced to work around clang problems with
-msoft-float. Those problems are now fixed and moreover .gnu_attributes
itself is unportable and creates problem with clang.

Revert "mips: Fix soft-float handling."

This partially reverts commit 6a4ecd276ed39f66be0ad6ff0f8ff67598098605.

10 years agoARM: provide __aeabi_memclr* and __aeabi_memcpy* symbols
Vladimir Serbinenko [Wed, 22 Jul 2015 18:40:13 +0000 (20:40 +0200)] 
ARM: provide __aeabi_memclr* and __aeabi_memcpy* symbols

Fixes compilation with recent clang.

10 years agodiskfilter: Make name a const char to fix compilation error.
Vladimir Serbinenko [Wed, 22 Jul 2015 18:39:14 +0000 (20:39 +0200)] 
diskfilter: Make name a const char to fix compilation error.

10 years agodmraid_nvidia: Set a name to usable value to avoid null dereference.
Vladimir Serbinenko [Tue, 21 Jul 2015 23:57:40 +0000 (01:57 +0200)] 
dmraid_nvidia: Set a name to usable value to avoid null dereference.

Reported by: Andrei Borzenkov

10 years agoconfigure.ac: Handle powerpc64le compiler
Vladimir Serbinenko [Tue, 21 Jul 2015 23:54:59 +0000 (01:54 +0200)] 
configure.ac: Handle powerpc64le compiler

Also-by: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
10 years agoloader/linux: Make trailer initrd entry aligned again.
Bernhard Übelacker [Mon, 20 Jul 2015 12:06:45 +0000 (14:06 +0200)] 
loader/linux: Make trailer initrd entry aligned again.

Regression from commit:
  loader/linux: do not pad initrd with zeroes at the end
  a8c473288d3f0a5e17a903a5121dea1a695dda3b

Wimboot fails since the change above because it expects the "trailer"
initrd element on an aligned address.
This issue shows only when newc_name is used and the last initrd
entry has a not aligned size.

10 years agoXFS: Fix wrong alignment treatment.
Vladimir Serbinenko [Thu, 16 Jul 2015 10:46:02 +0000 (12:46 +0200)] 
XFS: Fix wrong alignment treatment.

10 years agogrub_ext2_read_block: Fix return type on error.
Vladimir Serbinenko [Thu, 16 Jul 2015 08:59:33 +0000 (10:59 +0200)] 
grub_ext2_read_block: Fix return type on error.

10 years agouse TARGET_LDFLAGS in grub_PROG_OBJCOPY_ABSOLUTE
Andrei Borzenkov [Sun, 5 Jul 2015 05:21:38 +0000 (08:21 +0300)] 
use TARGET_LDFLAGS in grub_PROG_OBJCOPY_ABSOLUTE

That's what Makefile will use and it is required if unusual flags
must be passed to linker (e.g. to build ppc32 code on ppc64le with clang).

10 years agoFix missing byte order conversion in get_btrfs_fs_prefix function
Michael Chang [Mon, 22 Jun 2015 08:45:27 +0000 (16:45 +0800)] 
Fix missing byte order conversion in get_btrfs_fs_prefix function

Since btrfs on-disk format uses little-endian, the searched item types
(ROOT_REF, INODE_REF) need converting the byte order in order to
function properly on big-endian systems.

10 years agochainloader: fix resoource leak
Andrei Borzenkov [Fri, 26 Jun 2015 06:25:30 +0000 (09:25 +0300)] 
chainloader: fix resoource leak

Found by: Coverity scan.
CID: 96651

10 years agoloader/bsd: fix memory leak
Andrei Borzenkov [Fri, 26 Jun 2015 06:25:30 +0000 (09:25 +0300)] 
loader/bsd: fix memory leak

Found by: Coverity scan.
CID: 96662, 96665

10 years agoloader/bsd: free memory leaks
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:19 +0000 (23:38 +0300)] 
loader/bsd: free memory leaks

Found by: Coverity scan.
CID: 96671, 96658, 96653

10 years agosearch_wrap: fix memory leak
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:19 +0000 (23:38 +0300)] 
search_wrap: fix memory leak

Found by: Coverity scan.
CID: 96675

10 years agopassword_pbkdf2: fix memory leak
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:19 +0000 (23:38 +0300)] 
password_pbkdf2: fix memory leak

Found by: Coverity scan.
CID: 96676

10 years agonormal: fix memory leak
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:19 +0000 (23:38 +0300)] 
normal: fix memory leak

Found by: Coverity scan.
CID: 96677

10 years agoefi/serial: fix memory leak
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:19 +0000 (23:38 +0300)] 
efi/serial: fix memory leak

Found by: Coverity scan.
CID: 96678

10 years agoohci: fix memory leak
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:19 +0000 (23:38 +0300)] 
ohci: fix memory leak

Found by: Coverity scan.
CID: 96679

10 years agoloader/bsd: free memory leaks
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:18 +0000 (23:38 +0300)] 
loader/bsd: free memory leaks

Found by: Coverity scan.
CID: 96682

10 years agomultiboot: fix memory leak
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:18 +0000 (23:38 +0300)] 
multiboot: fix memory leak

Found by: Coverity scan.
CID: 96684

10 years agonormal: fix memory leak
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:18 +0000 (23:38 +0300)] 
normal: fix memory leak

Found by: Coverity scan.
CID: 96685

10 years agoloader/bsd: fix memory leak
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:18 +0000 (23:38 +0300)] 
loader/bsd: fix memory leak

Found by: Coverity scan.
CID: 96686

10 years agoreed_solomon: fix memory leak
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:18 +0000 (23:38 +0300)] 
reed_solomon: fix memory leak

Found by: Coverity scan.
CID: 96688

10 years agousb: fix use after free
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:18 +0000 (23:38 +0300)] 
usb: fix use after free

Found by: Coverity scan.
CID: 96704

10 years agoxnu: fix use after free
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:18 +0000 (23:38 +0300)] 
xnu: fix use after free

Found by: Coverity scan.
CID: 96706

10 years agodisk/scsi: fix use after free
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:18 +0000 (23:38 +0300)] 
disk/scsi: fix use after free

Found by: Coverity scan.
CID: 96713

10 years agoefi/chainloader: fix use after free
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:17 +0000 (23:38 +0300)] 
efi/chainloader: fix use after free

Found by: Coverity scan.
CID: 96714

10 years agosearch: fix use after free
Andrei Borzenkov [Sat, 20 Jun 2015 20:38:17 +0000 (23:38 +0300)] 
search: fix use after free

Found by: Coverity scan.
CID: 96715

10 years agoNEWS: emu libusb support removed
Andrei Borzenkov [Sat, 20 Jun 2015 06:23:43 +0000 (09:23 +0300)] 
NEWS: emu libusb support removed

10 years agogrub-probe: fix memory leak in probe (ofpath)
Andrei Borzenkov [Fri, 19 Jun 2015 17:47:44 +0000 (20:47 +0300)] 
grub-probe: fix memory leak in probe (ofpath)

Found by: Coverity scan.
CID: 73772

10 years agogrub-probe: restructure code to make static analysis easier
Andrei Borzenkov [Fri, 19 Jun 2015 17:47:43 +0000 (20:47 +0300)] 
grub-probe: restructure code to make static analysis easier

Current code in probe() could not be verified to not contain memory leaks.
Restructure code and ensure grub_device_close is always called at the end of
loop.

Calms down Coverity scan.
CID: 73739

10 years agozfs: fix memory leak
Andrei Borzenkov [Fri, 19 Jun 2015 17:47:43 +0000 (20:47 +0300)] 
zfs: fix memory leak

Found by: Coverity scan.
CID: 73647

10 years agoxfs: silence Coverity overflow warning
Andrei Borzenkov [Fri, 19 Jun 2015 15:38:25 +0000 (18:38 +0300)] 
xfs: silence Coverity overflow warning

inode size cannot really overflow integer, but Coverity does not know it.
CID: 96602

10 years agozfs: memory leak
Andrei Borzenkov [Fri, 19 Jun 2015 15:38:25 +0000 (18:38 +0300)] 
zfs: memory leak

Found by Coverity scan.
CID: 96603

10 years agounix/getroot: memory leak
Andrei Borzenkov [Fri, 19 Jun 2015 15:38:25 +0000 (18:38 +0300)] 
unix/getroot: memory leak

Found by Coverity scan.
CID: 96605

10 years agounix/relpath: memory leak
Andrei Borzenkov [Fri, 19 Jun 2015 15:38:25 +0000 (18:38 +0300)] 
unix/relpath: memory leak

Found by Coverity scan.
CID: 96606

10 years agosyslinux_parse: assorted issues found by Coverity
Andrei Borzenkov [Fri, 19 Jun 2015 15:38:25 +0000 (18:38 +0300)] 
syslinux_parse: assorted issues found by Coverity

1. Remove unneeded NULL check
CID: 96607

2. Do not allocate storage for initrd, copy it directly from input
buffer. Avoids memory leak in failure path.
CID: 96604

3. Unchecked error return from print()
CID: 96601, 73595

10 years agosyslinux_parse: make print_escaped actually stop before `to'
Andrei Borzenkov [Fri, 19 Jun 2015 14:35:17 +0000 (17:35 +0300)] 
syslinux_parse: make print_escaped actually stop before `to'

The only current user is mboot.c32 which unfortunately is not covered
by regression tests.

10 years agofat: fix handling of "." and ".." directory entries
Andrei Borzenkov [Thu, 18 Jun 2015 17:09:47 +0000 (20:09 +0300)] 
fat: fix handling of "." and ".." directory entries

Emulate dot and dotdot in root directory. For other directories do not
add separator between name and extension for these two special entries.

Closes: 45335
10 years agotests: regression tests for "." and ".." directory entries
Andrei Borzenkov [Thu, 18 Jun 2015 17:09:47 +0000 (20:09 +0300)] 
tests: regression tests for "." and ".." directory entries

10 years agoefinet: enable hardware filters when opening interface
Andrei Borzenkov [Tue, 16 Jun 2015 16:52:45 +0000 (19:52 +0300)] 
efinet: enable hardware filters when opening interface

Exclusive open on SNP will close all existing protocol instances which
may disable all receive filters on interface. Reinstall them after we
opened protocol exclusively.

Also follow UEFI specification recommendation and stop interfaces when
closing them:

Unexpected system errors, reboots and hangs can occur if an OS is loaded
and the network devices are not Shutdown() and Stopped().

Also by: Mark Salter <msalter@redhat.com>
Closes: 45204
10 years agoNEWS: mention libgcc removal
Andrei Borzenkov [Tue, 16 Jun 2015 16:49:32 +0000 (19:49 +0300)] 
NEWS: mention libgcc removal

10 years agoAdd flag for powerpc ieee1275 to avoid unneeded optimizations
Paulo Flabiano Smorigo [Mon, 15 Jun 2015 12:10:19 +0000 (09:10 -0300)] 
Add flag for powerpc ieee1275 to avoid unneeded optimizations

10 years agoFix exit to EFI firmware
Mark Salter [Fri, 15 Aug 2014 16:22:43 +0000 (12:22 -0400)] 
Fix exit to EFI firmware

The current code for EFI grub_exit() calls grub_efi_fini() before
returning to firmware. In the case of ARM, this leaves a timer
event running which could lead to a firmware crash. This patch
changes this so that grub_machine_fini() is called with a NORETURN
flag. This allows machine-specific shutdown to happen as well
as the shutdown done by grub_efi_fini().

Signed-off-by: Mark Salter <msalter@redhat.com>
10 years agodisk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD...
Paul Menzel [Thu, 28 May 2015 17:14:19 +0000 (19:14 +0200)] 
disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON`

Instead of hard coding `2` and `4` use the macros defined already at the
top of the file. As a consequence, wrap the now too long line.

10 years agoNEWS: XFS v5 support
Andrei Borzenkov [Fri, 12 Jun 2015 06:40:00 +0000 (09:40 +0300)] 
NEWS: XFS v5 support

10 years agoxfs: V5 filesystem format support
Jan Kara [Mon, 1 Jun 2015 12:28:46 +0000 (14:28 +0200)] 
xfs: V5 filesystem format support

Add support for new XFS on disk format. We have to handle optional
filetype fields in directory entries, additional CRC, LSN, UUID entries
in some structures, etc.

Signed-off-by: Jan Kara <jack@suse.cz>
10 years agoxfs: Add helpers for inode size
Jan Kara [Mon, 1 Jun 2015 12:28:45 +0000 (14:28 +0200)] 
xfs: Add helpers for inode size

Add helpers to return size of XFS inode on disk and when loaded in
memory.

Signed-off-by: Jan Kara <jack@suse.cz>
10 years agomultiboot_header_tag_module_align fix to confirm multiboot specification
Toomas Soome [Thu, 4 Jun 2015 16:41:54 +0000 (19:41 +0300)] 
multiboot_header_tag_module_align fix to confirm multiboot specification

10 years agoconfigure.ac: clean up arm64 soft-float handling
Leif Lindholm [Tue, 2 Jun 2015 14:41:09 +0000 (15:41 +0100)] 
configure.ac: clean up arm64 soft-float handling

Fix compilation with gcc 5.1 (avoid internal compiler error), by
replacing explicit -march +nofp+nosimd options with -mgeneral-regs-only.

This also enables the removal of some further conditional build flag
setting.

10 years agoarm64/setjmp: Add missing license macro
dann frazier [Thu, 21 May 2015 16:28:48 +0000 (10:28 -0600)] 
arm64/setjmp: Add missing license macro

Including the setjmp module in an arm64-efi image will cause it to
immediately exit with an "incompatible license" error.

The source file includes a GPLv3+ boilerplate, so fix this by declaring a
GPLv3+ license using the GRUB_MOD_LICENSE macro.

Signed-off-by: dann frazier <dann.frazier@canonical.com>
10 years agodisk/ahci.c: Add port number to port debug messages
Paul Menzel [Wed, 27 May 2015 20:48:57 +0000 (22:48 +0200)] 
disk/ahci.c: Add port number to port debug messages

Currently, some messages cannot be mapped to the port they belong to as
the port number is missing from the output. So add `port: n` to the
debug messages.

10 years agoClarify use of superusers variable and menu entry access
Andrei Borzenkov [Sat, 30 May 2015 16:36:41 +0000 (19:36 +0300)] 
Clarify use of superusers variable and menu entry access

superusers controls both CLI and editing. Also explicitly mention that
empty superusers disables them.

"Access to menuentry" is a bit vague - change to "execute menuentry"
to make it obvious, what access is granted.

10 years agoCorrect spelling of *scheduled*
Paul Menzel [Sun, 24 May 2015 21:27:46 +0000 (23:27 +0200)] 
Correct spelling of *scheduled*

Run the command below

$ git grep -l schedulded | xargs sed -i 's/schedulded/scheduled/g'

and revert the change in `ChangeLog-2015`.

Including "miscellaneous" spelling fix noted by richardvoigt@gmail.com

10 years agozfs extensible_dataset and large_blocks feature support
Toomas Soome [Thu, 16 Apr 2015 05:24:38 +0000 (08:24 +0300)] 
zfs extensible_dataset and large_blocks feature support

large blocks basically use extensible dataset feature, or to be exact,
setting recordsize above 128k will trigger large_block feature to be
enabled and storing such blocks is using feature extensible dataset. so
the extensible dataset is prerequisite.

Changes implement read support extensible dataset… instead of fixed DMU
types they dont specify type, making it possible to use fat zap objects
from bonus area.

10 years agomultiboot1: never place modules in low memory.
Vladimir Serbinenko [Wed, 27 May 2015 06:37:55 +0000 (08:37 +0200)] 
multiboot1: never place modules in low memory.

While in theory permitted by the spec, modules rarely fit in low memory
anyway and not every kernel is able to handle modules in low memory anyway.
At least VMWare is known not to be able to handle modules at arbitrary
locations.

10 years agodisk/ahci: Use defines `GRUB_ATA_STATUS_BUSY` and `GRUB_ATA_STATUS_DRQ`
Paul Menzel [Sun, 24 May 2015 09:11:25 +0000 (11:11 +0200)] 
disk/ahci: Use defines `GRUB_ATA_STATUS_BUSY` and `GRUB_ATA_STATUS_DRQ`

Instead of hard coding `0x88` use the macros defined in `disk/ata.h`.

10 years agocb_timestamps.c: Add new time stamp descriptions
Paul Menzel [Fri, 15 May 2015 15:35:00 +0000 (17:35 +0200)] 
cb_timestamps.c: Add new time stamp descriptions

Add the descriptions of the “core”, that means no vendorcode or payload,
coreboot time stamps added up to coreboot commit a7d92441 (timestamps:
You can never have enough of them!) [1].

Running `coreboot_boottime` in the GRUB command line interface now shows
descriptions for all time stamps again on the ASRock E350M1.

[1] http://review.coreboot.org/9608

10 years agobootp: ignore gateway_ip (relay) field.
Andrei Borzenkov [Sun, 17 May 2015 19:38:30 +0000 (22:38 +0300)] 
bootp: ignore gateway_ip (relay) field.

From RFC1542:

   The 'giaddr' field is rather poorly named.  It exists to facilitate
   the transfer of BOOTREQUEST messages from a client, through BOOTP
   relay agents, to servers on different networks than the client.
   Similarly, it facilitates the delivery of BOOTREPLY messages from the
   servers, through BOOTP relay agents, back to the client.  In no case
   does it represent a general IP router to be used by the client.  A
   BOOTP client MUST set the 'giaddr' field to zero (0.0.0.0) in all
   BOOTREQUEST messages it generates.

   A BOOTP client MUST NOT interpret the 'giaddr' field of a BOOTREPLY
   message to be the IP address of an IP router.  A BOOTP client SHOULD
   completely ignore the contents of the 'giaddr' field in BOOTREPLY
   messages.

Leave code ifdef'd out for the time being in case we see regression.

Suggested by: Rink Springer <rink@rink.nu>
Closes: 43396
10 years agohostdisk: fix crash with NULL device.map
Andrei Borzenkov [Sun, 17 May 2015 11:16:36 +0000 (14:16 +0300)] 
hostdisk: fix crash with NULL device.map

grub-macbless calls grub_util_biosdisk_init with NULL device.map.

10 years agozfs: fix integer truncation in zap_lookup
Andrei Borzenkov [Thu, 14 May 2015 04:50:33 +0000 (07:50 +0300)] 
zfs: fix integer truncation in zap_lookup

Size after shift could exceed 16 bits; use grub_unit32_t for result.

Reported and tested by: Kostya Berger <bergerkos@yahoo.co.uk>
Closes: 44448
10 years agoremove extra newlines in grub_util_* strings
Andrei Borzenkov [Wed, 13 May 2015 06:47:17 +0000 (09:47 +0300)] 
remove extra newlines in grub_util_* strings

grub_util_{info,warn,error} already add trailing newlines, so remove
them from format strings. Also trailing full stops are already added.

10 years agoxfs: Convert inode numbers to cpu endianity immediately after reading
Jan Kara [Mon, 14 Jul 2014 15:21:30 +0000 (17:21 +0200)] 
xfs: Convert inode numbers to cpu endianity immediately after reading

Currently XFS driver converted inode numbers to native endianity only
when using them to compute inode position. Although this works, it is
somewhat confusing. So convert inode numbers when reading them from disk
structures as every other field.

Signed-off-by: Jan Kara <jack@suse.cz>
10 years agoxfs: Fix termination loop for directory iteration
Jan Kara [Mon, 14 Jul 2014 15:21:29 +0000 (17:21 +0200)] 
xfs: Fix termination loop for directory iteration

Directory iteration used wrong position (sizeof wrong structure) for
termination of iteration inside a directory block. Luckily the position
ended up being wrong by just 1 byte and directory entries are larger so
things worked out fine in practice. But fix the problem anyway.

Signed-off-by: Jan Kara <jack@suse.cz>
10 years agoacpi: do not skip BIOS scan if EBDA length is zero
Andrei Borzenkov [Fri, 8 May 2015 03:15:16 +0000 (06:15 +0300)] 
acpi: do not skip BIOS scan if EBDA length is zero

EBDA layout is not standardized so we cannot assume first two bytes
are length. Neither is it required by ACPI standard. HP 8710W is known
to contain zeroes here.

Closes: 45002
10 years agoAdd asm-tests to tarball
Andrei Borzenkov [Thu, 7 May 2015 19:13:34 +0000 (22:13 +0300)] 
Add asm-tests to tarball

10 years agoutil/grub-mkrescue: Fix compilation
Vladimir Serbinenko [Thu, 7 May 2015 17:45:06 +0000 (19:45 +0200)] 
util/grub-mkrescue: Fix compilation

10 years agoefinet: open Simple Network Protocol exclusively
Andrei Borzenkov [Thu, 7 May 2015 17:37:17 +0000 (20:37 +0300)] 
efinet: open Simple Network Protocol exclusively

EDK2 network stack is based on Managed Network Protocol which is layered
on top of Simple Management Protocol and does background polling. This
polling races with grub for received (and probably trasmitted) packets
which causes either serious slowdown or complete failure to load files.

Open SNP device exclusively.  This destroys all child MNP instances and
stops background polling.

Exclusive open cannot be done when enumerating cards, as it would destroy
PXE information we need to autoconfigure interface; and it cannot be done
during autoconfiguration as we need to do it for non-PXE boot as well. So
move SNP open to card ->open method and add matching ->close to clean up.

Based on patch from Mark Salter <msalter@redhat.com>

Also-By: Mark Salter <msalter@redhat.com>
Closes: 41731
10 years agoefinet: skip virtual IPv4 and IPv6 devices when enumerating cards
Andrei Borzenkov [Thu, 7 May 2015 17:37:17 +0000 (20:37 +0300)] 
efinet: skip virtual IPv4 and IPv6 devices when enumerating cards

EDK2 PXE driver creates two child devices - IPv4 and IPv6 - with
bound SNP instance. This means we get three cards for every physical
adapter when enumerating. Not only is this confusing, this may result
in grub ignoring packets that come in via the "wrong" card.

Example of device hierarchy is

 Ctrl[91] PciRoot(0x0)/Pci(0x3,0x0)
   Ctrl[95] PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)
     Ctrl[B4] PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)/IPv4(0.0.0.0)
     Ctrl[BC] PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000)

Skip PXE created virtual devices when enumerating cards. Make sure to
find real card when applying initial autoconfiguration during PXE boot,
this information is associated with one of child devices.

10 years agoefidisk: move device path helpers in core for efinet
Andrei Borzenkov [Thu, 7 May 2015 17:37:16 +0000 (20:37 +0300)] 
efidisk: move device path helpers in core for efinet

10 years agoconvert to, not from, CPU byte order in DNS receive function
Andrei Borzenkov [Thu, 7 May 2015 17:33:28 +0000 (20:33 +0300)] 
convert to, not from, CPU byte order in DNS receive function

10 years agoloader/linux: do not pad initrd with zeroes at the end
Andrei Borzenkov [Thu, 7 May 2015 17:24:24 +0000 (20:24 +0300)] 
loader/linux: do not pad initrd with zeroes at the end

Syslinux memdisk is using initrd image and needs to know uncompressed
size in advance. For gzip uncompressed size is at the end of compressed
stream. Grub padded each input file to 4 bytes at the end, which means
syslinux got wrong size.

Linux initramfs loader apparently does not care about trailing alignment.
So change code to align beginning of each file instead which atomatically
gives us the correct size for single file.

Reported-By: David Shaw <dshaw@jabberwocky.com>
10 years agoi386/relocator: Remove unused extern grub_relocator64_rip_addr
Daniel Kiper [Thu, 7 May 2015 16:00:47 +0000 (18:00 +0200)] 
i386/relocator: Remove unused extern grub_relocator64_rip_addr

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
10 years agogrub-install-common: Increase buf size to 8192 as modinfo.sh is bigger.
Vladimir Serbinenko [Thu, 7 May 2015 15:09:58 +0000 (17:09 +0200)] 
grub-install-common: Increase buf size to 8192 as modinfo.sh is bigger.

10 years agogrub-mkrescue: Recognize -output as an alias of --output.
Vladimir Serbinenko [Thu, 7 May 2015 14:34:34 +0000 (16:34 +0200)] 
grub-mkrescue: Recognize -output as an alias of --output.

This helps us to be in line with xorriso -as mkisofs.

Suggested by: Thomas Schmitt

10 years agolinux.c: Ensure that initrd is page-aligned.
Vladimir Serbinenko [Thu, 7 May 2015 14:23:39 +0000 (16:23 +0200)] 
linux.c: Ensure that initrd is page-aligned.

10 years agoRevert parts accidentally committed 2 commits ago.
Vladimir Serbinenko [Thu, 7 May 2015 14:21:34 +0000 (16:21 +0200)] 
Revert parts accidentally committed 2 commits ago.

10 years agofdt.h: Add grub_fdt_set_reg64 macro
Fu Wei [Thu, 7 May 2015 13:13:25 +0000 (15:13 +0200)] 
fdt.h: Add grub_fdt_set_reg64 macro

Signed-off-by: Fu Wei <fu.wei@linaro.org>
10 years agoarm64: Export useful functions from linux.c
Fu Wei [Thu, 7 May 2015 13:11:04 +0000 (15:11 +0200)] 
arm64: Export useful functions from linux.c

Signed-off-by: Fu Wei <fu.wei@linaro.org>
10 years agoRevert "efinet: memory leak on module removal"
Andrei Borzenkov [Mon, 4 May 2015 06:13:53 +0000 (09:13 +0300)] 
Revert "efinet: memory leak on module removal"

This reverts commits 47b2bee3ef0ea60fc3f5bfc37f3784e559385297
and 8d3c4544ffdd0289a4b0bdeb0cdc6355f801a4b3. It is not safe
to free allocated cards, dangling pointers main remain. Such
cleanup requires more changes in net core.

10 years agoefinet: cannot free const char * pointer
Andrei Borzenkov [Mon, 4 May 2015 05:39:29 +0000 (08:39 +0300)] 
efinet: cannot free const char * pointer

10 years agoefinet: memory leak on module removal
Andrei Borzenkov [Mon, 4 May 2015 05:08:57 +0000 (08:08 +0300)] 
efinet: memory leak on module removal

10 years agozfs: add missing NULL check and fix incorrect buffer overwrite
Andrei Borzenkov [Sun, 3 May 2015 15:55:13 +0000 (18:55 +0300)] 
zfs: add missing NULL check and fix incorrect buffer overwrite

grub_memset should zero out padding after data end. It is not clear
why it is needed at all - ZFS block is at least 512 bytes and power
of two, so it is always multiple of 16 bytes. This grub_memset
apparently never did anything.

10 years agozfs: com.delphix:embedded_data feature support
Toomas Soome [Thu, 16 Apr 2015 05:23:22 +0000 (08:23 +0300)] 
zfs: com.delphix:embedded_data feature support

10 years agozfs: com.delphix:hole_birth feature support
Toomas Soome [Thu, 16 Apr 2015 05:22:08 +0000 (08:22 +0300)] 
zfs: com.delphix:hole_birth feature support

In the past birth was always zero for holes. This feature started
to make use of birth for holes as well, so change code to test for
valid DVA address instead.

10 years agogrub-mkconfig: use $pkgdatadir in scripts
Andrei Borzenkov [Wed, 29 Apr 2015 16:18:54 +0000 (19:18 +0300)] 
grub-mkconfig: use $pkgdatadir in scripts

Otherwise scripts will source wrong grub-mkconfig_lib.

10 years agoRemove -V in grub-mkrescue.c
Vladimir Serbinenko [Fri, 24 Apr 2015 15:52:30 +0000 (17:52 +0200)] 
Remove -V in grub-mkrescue.c

It clashhes with -V which is alias to -volid.

10 years agogetroot: include sys/mkdev.h for makedev
Toomas Soome [Mon, 13 Apr 2015 16:52:28 +0000 (19:52 +0300)] 
getroot: include sys/mkdev.h for makedev

Solaris (like) systems need to include sys/mkdev.h for makedev() function.

10 years agocore/partmap: rename 'sun' to avoid clash with predefined symbol
Toomas Soome [Mon, 13 Apr 2015 16:49:15 +0000 (19:49 +0300)] 
core/partmap: rename 'sun' to avoid clash with predefined symbol

the symbol “sun” is defined macro in solaris derived systems, from
gcc -dM -E:

and therefore can not be used as name.

10 years agodocs/grub.texi: Fix spelling of cbfstool
Paul Menzel [Sat, 11 Apr 2015 19:40:50 +0000 (21:40 +0200)] 
docs/grub.texi: Fix spelling of cbfstool

10 years agocore: avoid NULL derefrence in grub_divmod64s
Andrei Borzenkov [Mon, 6 Apr 2015 16:25:02 +0000 (19:25 +0300)] 
core: avoid NULL derefrence in grub_divmod64s

It can be called with NULL for third argument.  grub_divmod32* for
now are called only from within wrappers, so skip check.

Reported-By: Michael Zimmermann <sigmaepsilon92@gmail.com>
10 years agodo not emit cryptomount without crypto UUID
Andrei Borzenkov [Sat, 28 Mar 2015 19:13:35 +0000 (22:13 +0300)] 
do not emit cryptomount without crypto UUID

10 years agogrub-core/loader/i386/xen.c: Initialized initrd_ctx so we don't free a random pointer...
Sarah Newman [Fri, 27 Mar 2015 19:56:43 +0000 (12:56 -0700)] 
grub-core/loader/i386/xen.c: Initialized initrd_ctx so we don't free a random pointer from the stack.

Signed-off-by: Sarah Newman <srn@prgmr.com>