Commit graph

9176 commits

Author SHA1 Message Date
Vladimir Serbinenko
db97faec91 genmoddep.awk: Add a test that we have no circular dependencies 2015-11-08 20:00:27 +01:00
Vladimir Serbinenko
7cc27aeda9 Makefile.core.def: Break circular dependency on arm64. 2015-11-08 18:47:53 +01:00
Vladimir Serbinenko
ae66efc63b autogen: Use cp instead of ln -s.
libgcrypt-grub shouldn't be modified directly anyway. With this patch
tarball without contrib can be unpacked on FAT and stay usable for
out-of-tree compile on full POSIX FS (compile on FAT not tested).
2015-11-08 18:45:57 +01:00
Andrei Borzenkov
c054020581 partmap_test: check that parted is available
Skip test if parted is unavailable instead of returning false failure.
2015-11-07 23:42:35 +03:00
grub-devel@iam.tj
c7f93a20c4 cryptodisk: teach grub_cryptodisk_insert() about partitions (bug #45889)
It is not possible to configure encrypted containers on multiple partitions of
the same disk; after the first one all subsequent fail with

disk/cryptodisk.c:978: already mounted as crypto0

Store partition offset in cryptomount descriptor to distinguish between them.
2015-11-07 18:52:59 +03:00
Andrey Borzenkov
bcf8c5814d doc: document config_directory and config_file variables 2015-11-07 17:03:38 +03:00
Andrei Borzenkov
dff8d0e3f5 unix/getroot: remove unused MAJOR definition
We use major() everywhere, these definitions just add to confusion.
2015-11-07 17:02:21 +03:00
Andrei Borzenkov
c1fbc26203 Add comments to code for commit d313218 2015-11-07 13:01:23 +03:00
Andrei Borzenkov
349a381df0 devmapper/getroot: use makedev instead of direct shift
Fixes device detection with large number of devices.

Reported by Tim Wallberg <twalberg@comcast.net>
2015-11-07 09:46:46 +03:00
Andrei Borzenkov
1018e91dce mkimage: zero fill alignment space
This did not cause real problem but is good for reproducible builds. I hit
it with recent bootinfoscript that displays embedded config; I was puzzled
by random garbage at the end.

Prezero memory buffer used to assemble core.img. This makes individual
memset redundant. Also ensure buffer is filled with zeroes in several other
places.

Also remove redundant zeroing code where we fill in the whole memory block
anyway.
2015-11-06 21:33:28 +03:00
Vladimir Serbinenko
cd6d79cda2 configure.ac: Explicitly add -mno-sse3 on x86. 2015-11-06 04:32:34 +01:00
Vladimir Serbinenko
5b7b4d9781 README: Remove dead link to the wiki 2015-11-06 04:31:23 +01:00
Andrei Borzenkov
33b1103e30 NEWS: mention powerpc64le support 2015-10-29 21:29:12 +03:00
Ignat Korchagin
43c8310244 tcp: Fix uninited mac address when accepting connection. 2015-10-29 16:30:28 +01:00
Fu Wei
83cb45e982 arm64: Add support for xen boot protocol. 2015-10-29 15:24:20 +01:00
Vladimir Serbinenko
4d0cb75538 arm64: Move FDT functions to separate module 2015-10-29 14:06:45 +01:00
Andrei Borzenkov
5fcde03bf1 efi: fix warnings with recent GCC
../../grub-core/term/efi/console.c:128:32: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
   if (key.unicode_char >= 0x20 && key.unicode_char <= 0x7f
2015-10-27 23:30:54 +03:00
Eric Snowberg
0b72543afd ofdisk: Fix devpath freeing logic. 2015-10-26 23:03:06 +01:00
Paulo Flabiano Smorigo
bf3df4070f Implement cross-endian ELF load for powerpc 2015-10-26 22:07:26 +01:00
Peter Jones
9e5f70174e Use EFI_SIMPLE_TEXT_INPUT_EX to support key combinations. 2015-10-25 16:36:28 +01:00
Andrei Borzenkov
a3645c1240 configure: find options to force endian on MIPS 2015-10-14 00:42:14 +02:00
Andrei Borzenkov
be25d92196 configure: force o32 ABI on MIPS
GRUB code expects O32 or N32. N32 is less tested than O32, so we prefer to
compile with O32. Some systems (e.g. GNU Guix) default to using newer
n64 or n32 ABI. Try to find suitable options to force o32.

For GCC this is simply -mabi=32. While clang supports this option as well,
o32 ABI is valid for MIPS target and n32/64 ABI are valid for MIPS64 target
only, so use "-target mips/mipsel -mabi=32".

Reported-By: Mark H Weaver <mhw@netris.org>
Also-By: Mark H Weaver <mhw@netris.org>
2015-10-14 00:39:15 +02:00
Andrei Borzenkov
a01ab69848 net: avoid closing NULL socket in DNS lookup
Refactor code so that we do not store NULL pointers in array
of in-flight DNS servers.

Reported-By: Josef Bacik <jbacik@fb.com>
2015-10-12 23:16:23 +03:00
Andrei Borzenkov
76197d9be6 install: --compress argument is not optional
Fixes crash if argument is not specified. Also use `|' to separate choices
in list of compression methods to align it with --core-compress.
2015-10-11 21:17:37 +03:00
Vladimir Serbinenko
cfabe05cc6 mips: Make setjmp code N32-compliant. 2015-10-11 13:20:26 +02:00
Vladimir Serbinenko
285540e448 mips: Make the assembly-code N32-compatible.
There are no $t4 or $t5 in N32 but there are $a4 and $a5.
2015-10-11 13:20:26 +02:00
Andrei Borzenkov
6e21195890 progress: avoid NULL dereference for net files
From original patch by dann frazier <dann.frazier@canonical.com>:

  grub_net_fs_open() saves off a copy of the file structure it gets passed and
  uses it to create a bufio structure. It then overwrites the passed in file
  structure with this new bufio structure. Since file->name doesn't get set
  until we return back to grub_file_open(), it means that only the bufio
  structure gets a valid file->name. The "real" file's name is left
  uninitialized. This leads to a crash when the progress module hook is called
  on it.

grub_net_fs_open() already saved copy of file name as ->net->name, so change
progress module to use it.

Also, grub_file_open may leave file->name as NULL if grub_strdup fails. Check
for it.

Also-By: dann frazier <dann.frazier@canonical.com>
2015-10-10 11:44:14 +03:00
Andrei Borzenkov
d31321835e file: ignore host disk in blocklist check
It cannot work anyway because host disk cannot be read. This fixes hostfs access
on native Windows build where filenames start with '\' or do not have initial
separator at all (d:\foo).

Issue was observed when running grub-fstest on Windows. On UNIX image name is
canonicalized to always start with `/' so this was not noticed.

This has side effect of allowing relative path names on host, but this already
was the case with `ls' command, so it just extends it to all commands.

Reported-By: Arch Stack <archstacker@gmail.com>
Also-By: Arch Stack <archstacker@gmail.com>
2015-10-10 10:02:20 +03:00
Vladimir Serbinenko
c2443e49bc mips/dl: Handle addend in RELA entries. 2015-10-09 23:32:06 +02:00
Vladimir Serbinenko
f59b83fce6 gfxmenu/model: Delete empty file. 2015-10-09 23:30:53 +02:00
Alexander Bluhm
f188a86064 ufs: Fix parameters to grub_memset.
len = 0 made simply no sense. Fix parameters to be in line with read.
2015-10-09 13:35:40 +02:00
Stanislav Kholmanskikh
ee67bcf31e ofnet: Do not set SUFFIX for sun4v network devices
sun4v vnet devices do not implement the support of duplex and speed
instance attributes. An attempt to open such a device with
the attributes will fail:

ok select net:speed=auto,duplex=auto
Unknown key 'speed'
Unknown key 'duplex'
Manual Configuration: Host IP, boot server and filename must be specified
WARNING: /virtual-devices@100/channel-devices@200/network@0: Can't open OBP standard TFTP package

Can't open device
ok

Therefore, let's not set SUFFIX for such devices.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
2015-10-07 20:00:52 +03:00
Eric Snowberg
8cb4c4edbe sparc64 - use correct drive name within grub_util_sparc_setup
Incorrect drive name was being passed into grub_util_sparc_setup,
causing the grub-install to fail.

Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
2015-10-07 19:51:57 +03:00
Andrei Borzenkov
c93d3e6947 cryptodisk: strip parenthesis from backing device name
Otherwise subsequent disk open fails.

Reported-By: Klemens Nanni <contact@autoboot.org>
2015-09-13 20:12:31 +03:00
Felix Zielcke
8e3d2c80ed disk/ldm, partmap/msdos.c: fix spelling error 2015-08-22 21:22:41 +02:00
Andrei Borzenkov
ba218c1c10 net: do not try to load protocol module via itself
Otherwise we get infinite recursion.

Closes: 45729
2015-08-13 20:20:39 +03:00
Josef Bacik
4fe8e6d4a1 efinet: handle get_status() on buggy firmware properly
The EFI spec indicates that get_status() should return the address of the buffer
we passed into transmit to indicate the the buffer was transmitted.  However we
have boxes where the firmware returns some arbitrary address instead, which
makes grub think that we've not sent anything.  So since we have the SNP stuff
opened in exclusive mode just assume any non-NULL txbuf means that our transmit
occurred properly.  This makes grub able to do its networking stuff properly on
our broken firmware.  Thanks,

cc: Peter Jones <pjones@redhat.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
2015-08-09 16:37:26 +03:00
Andrei Borzenkov
d7a85e69e0 linguas.sh: fix error when removing non-existing autogenerated files 2015-08-09 16:28:12 +03:00
Vladimir Serbinenko
72fc110d95 ahci: Ensure that bus mastering is set.
Fixes ahci_test failing on several platforms.
2015-07-28 01:51:14 +02:00
Vladimir Serbinenko
d3b464a7c0 archelp: Never pass NULL as mtime.
Moves complexity from fs code (NULL check) to common code (passing non-NULL).
2015-07-27 13:19:02 +02:00
Vladimir Serbinenko
5fb1e859f7 HFS: Convert to fshelp.
HFS doesn't handle "." and ".." properly. Convert it to fshelp to reuse the
logic.
2015-07-27 12:50:22 +02:00
Vladimir Serbinenko
bfb5b33e96 FAT: Convert to fshelp.
exFAT doesn't handle "." and ".." correctly, convert it to fshelp to
reuse the same logic.
2015-07-27 12:49:26 +02:00
Vladimir Serbinenko
d1d3a60b71 BFS: Convert to fshelp.
BFS doesn't handle ".." correctly, so convert it to fshelp to reuse the logic.
2015-07-27 12:48:38 +02:00
Vladimir Serbinenko
fa93b0e4f5 fshelp: Add handling of "." and ".." and grub_fshelp_find_file_lookup.
Recent tests have discovered that many of our filesystems have flawed
handling of "." and "..". Rather than attempting to fix it in filesystems
themselves, make the common code fshelp aware of "." and ".." and handle
them in this layer. Add grub_fshelp_find_file_lookup for easy conversion
of BFS, HFS and exFAT which have the same problem and don't use fshelp.
2015-07-27 12:45:35 +02:00
Vladimir Serbinenko
4622f4e1ee Switch procfs to use archelp.
This fixes handling of "." and "..".
2015-07-27 12:44:19 +02:00
Vladimir Serbinenko
a2721778e5 grub-install: Use a+ in fopen rather than r+.
r+ does not create a file if none exists.
2015-07-27 12:42:47 +02:00
Vladimir Serbinenko
368ecfc3a0 Add transform_data as a variant of data with substitutions.
This fixrs name mismatch for grub.chrp with
transform_program_name='s,grub,grub2,g'
2015-07-27 12:39:41 +02:00
Ignat Korchagin
d5847bf594 efi: fix GetVariable return status check in 81ca24a
GetVariable should return EFI_BUFFER_TOO_SMALL if given buffer of size
zero; commit incorrectly checked for EFI_SUCCESS.
2015-07-24 20:46:02 +03:00
Vladimir Serbinenko
333855c646 zfs_test: Skip dotdot in volume root test.
Given special semantics of ZFS it's far from clear what the expected
result is. Just skip it for now
2015-07-24 01:23:45 +02:00
Vladimir Serbinenko
900fca88ac xfs_test: Test both crc and non-crc filesystems. 2015-07-24 01:23:45 +02:00