]> git.proxmox.com Git - grub2.git/blob - ChangeLog
New upstream release candidate (2.04~rc1)
[grub2.git] / ChangeLog
1 2019-04-09 Vladimir Serbinenko <phcoder@gmail.com>
2
3 Release 2.04~rc1
4
5 2019-04-09 Vladimir Serbinenko <phcoder@gmail.com>
6
7 Change fs functions to add fs_ prefix
8 This avoid conflict with gnulib
9
10 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
11
12 2019-04-08 Vladimir Serbinenko <phcoder@google.com>
13
14 A workaround for clang problem assembling startup_raw.S
15 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
16
17 2019-04-04 Eric Snowberg <eric.snowberg@oracle.com>
18
19 ieee1275: NULL pointer dereference in grub_ieee1275_encode_devname()
20 Function grub_strndup() may return NULL, this is called from
21 function grub_ieee1275_get_devname() which is then called from
22 function grub_ieee1275_encode_devname() to set device. The device
23 variable could then be used with a NULL pointer.
24
25 Reviewed-by: Colin Watson <cjwatson@ubuntu.com>
26 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
27
28 2019-04-02 Daniel Kiper <daniel.kiper@oracle.com>
29
30 docs/grub-dev: Change comments rules
31 Current comments forms are annoying, so, some of them are disallowed
32 starting from now. New rules are more flexible and mostly aligned
33 with, e.g., Linux kernel comments rules.
34
35 Reviewed-by: Vladimir Serbinenko <phcoder@google.com>
36
37 2019-04-02 Andrew Jeddeloh <andrew.jeddeloh@coreos.com>
38
39 loader/i386/linux: Calculate the setup_header length
40 Previously the setup_header length was just assumed to be the size of the
41 linux_kernel_params struct. The linux x86 32-bit boot protocol says that the
42 end of the linux_i386_kernel_header is at 0x202 + the byte value at 0x201 in
43 the linux_i386_kernel_header. So, calculate the size of the header using the
44 end of the linux_i386_kernel_header, rather than assume it is the size of the
45 linux_kernel_params struct.
46
47 Additionally, add some required members to the linux_kernel_params
48 struct and align the content of linux_i386_kernel_header struct with
49 it. New members naming was taken directly from Linux kernel source.
50
51 linux_kernel_params and linux_i386_kernel_header structs require more
52 cleanup. However, this is not urgent, so, let's do this after release.
53 Just in case...
54
55 Reviewed-by: Vladimir Serbinenko <phcoder@google.com>
56 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
57
58 2019-04-02 Eric Snowberg <eric.snowberg@oracle.com>
59
60 efidisk: NULL pointer dereference in grub_efidisk_get_device_name()
61 Function grub_efi_find_last_device_path() may return NULL when called
62 from grub_efidisk_get_device_name().
63
64 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
65
66 2019-04-02 Eric Snowberg <eric.snowberg@oracle.com>
67
68 efidisk: NULL pointer dereference in is_child()
69 Function grub_efi_find_last_device() path may return NULL when called
70 from is_child().
71
72 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
73
74 2019-04-02 Eric Snowberg <eric.snowberg@oracle.com>
75
76 efidisk: Write to NULL pointer ldp
77 Function grub_efi_find_last_device_path() may return constant NULL when
78 called from find_parent_device().
79
80 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
81
82 2019-04-02 Vladimir Serbinenko <phcoder@google.com>
83
84 clang: Pair -Qn with -Qunused-arguments.
85 When assembling module wirh clang -Qn ends up on command line but later ignored
86 To avoid it breaking the compile, add -Qunused-arguments.
87
88 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
89
90 2019-03-28 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
91
92 ieee1275: Fix path reference in comment of sparc64 boot loader code
93 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
94
95 2019-03-28 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
96
97 ieee1275: Include a.out header in assembly of sparc64 boot loader
98 Recent versions of binutils dropped support for the a.out and COFF
99 formats on sparc64 targets. Since the boot loader on sparc64 is
100 supposed to be an a.out binary and the a.out header entries are
101 rather simple to calculate in our case, we just write the header
102 ourselves instead of relying on external tools to do that.
103
104 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
105
106 2019-03-26 Vladimir Serbinenko <phcoder@gmail.com>
107
108 Propagate GNU_PRINTF from gnulib vfprintf
109 gnulib now replaces vfprintf and hence its format becomes GNU_PRINTF format
110
111 This also fixes matching definitions to always use GNU format
112
113 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
114
115 2019-03-26 Vladimir Serbinenko <phcoder@gmail.com>
116
117 efi/tpm.c: Add missing casts
118 Without those casts we get a warning about implicit conversion of pointer
119 to integer.
120
121 2019-03-26 Vladimir Serbinenko <phcoder@gmail.com>
122
123 POTFILES: Don't include gnulib in grub.pot
124 They're translated as a separate project, so we
125 don't want to submit them again.
126
127 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
128
129 2019-03-26 Vladimir Serbinenko <phcoder@google.com>
130
131 configure.ac: Use nostdlib when checking for nostdinc
132 With clang nostdinc behaviour is influenced by nostdlib. Since we
133 always add nostdlib, add it in test as well
134
135 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
136
137 2019-03-25 Vladimir Serbinenko <phcoder@gmail.com>
138
139 efi/tpm.h: Fix hash_log_extend_event definition.
140 I didn't check the spec but pointer to address doesn't make much sense
141 and doesn't match the code.
142
143 Rename grub_disk members
144 Otherwise it horribly clashes with gnulib when it's
145 replacing open/write/read/close
146
147 grub-mkimagexx: Fix RISCV error message
148 Outputting a raw pointer doesn't match the format and is
149 also useless. Output offset instead.
150
151 kern/emu/misc.c: Don't include config-util.h when running as GRUB_BUILD
152
153 Support R_PPC_PLTREL24
154 It's emitted by clang 7. It's the same as R_PPC_REL24.
155
156 2019-03-20 Daniel Kiper <daniel.kiper@oracle.com>
157
158 sparc: Enable __clzsi2() and __clzdi2()
159 This patch is similiar to commit e795b9011 (RISC-V: Add libgcc helpers
160 for clz) but for SPARC target.
161
162 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
163
164 2019-03-20 Daniel Kiper <daniel.kiper@oracle.com>
165
166 mips: Enable __clzsi2()
167 This patch is similiar to commit e795b9011 (RISC-V: Add libgcc helpers
168 for clz) but for MIPS target.
169
170 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
171
172 2019-03-20 Daniel Kiper <daniel.kiper@oracle.com>
173
174 verifiers: MIPS fallout cleanup
175 MIPS fallout cleanup after commit 4d4a8c96e (verifiers: Add possibility
176 to verify kernel and modules command lines).
177
178 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
179
180 2019-03-20 Daniel Kiper <daniel.kiper@oracle.com>
181
182 verifiers: PowerPC fallout cleanup
183 PowerPC fallout cleanup after commit 4d4a8c96e (verifiers: Add possibility
184 to verify kernel and modules command lines) and ca0a4f689 (verifiers: File
185 type for fine-grained signature-verification controlling).
186
187 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
188
189 2019-03-20 Daniel Kiper <daniel.kiper@oracle.com>
190
191 verifiers: IA-64 fallout cleanup
192 IA-64 fallout cleanup after commit 4d4a8c96e (verifiers: Add possibility
193 to verify kernel and modules command lines).
194
195 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
196
197 2019-03-20 Colin Watson <cjwatson@ubuntu.com>
198
199 posix_wrap: Flesh out posix_wrap/limits.h a little more
200 In addition to what was already there, Gnulib's <intprops.h> needs SCHAR_MIN,
201 SCHAR_MAX, SHRT_MIN, INT_MIN, LONG_MIN, and LONG_MAX. Fixes build on CentOS 7.
202
203 Reported-by: "Chen, Farrah" <farrah.chen@intel.com>
204 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
205
206 2019-03-19 Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
207
208 xen: Look for Xen notes in section headers too
209 Mirror behaviour of ELF loader in libxc: first look for Xen notes in
210 PT_NOTE segment, then in SHT_NOTE section and only then fallback to
211 a section with __xen_guest name. This fixes loading PV kernels that
212 Xen note have outside of PT_NOTE. While this may be result of a buggy
213 linker script, loading such kernel directly works fine, so make it work
214 with GRUB too. Specifically, this applies to binaries built from Unikraft.
215
216 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
217
218 2019-03-19 Colin Watson <cjwatson@ubuntu.com>
219
220 getroot: Save/restore CWD more reliably on Unix
221 Various GRUB utilities fail if the current directory doesn't exist,
222 because grub_find_device() chdirs to a different directory and then
223 fails when trying to chdir back. Gnulib's save-cwd module uses fchdir()
224 instead when it can, avoiding this category of problem.
225
226 Fixes Debian bug #918700.
227
228 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
229
230 2019-03-12 Andrei Borzenkov <arvidjaar@gmail.com>
231
232 net/dhcp: Add explicit net_dhcp command
233 Mostly for cosmetic reasons, we add a "net_dhcp" command, which is (at the
234 moment) identical to the existing "net_bootp" command. Both actually trigger
235 a DHCP handshake now, and both should be able to deal with pure BOOTP servers.
236 We could think about dropping the DHCP options from the initial DISCOVER packet
237 when the user issues the net_bootp command, but it's unclear whether this is
238 really useful, as both protocols should be able to coexist.
239
240 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
241
242 2019-03-12 Andrei Borzenkov <arvidjaar@gmail.com>
243
244 net/dhcp: Actually send out DHCPv4 DISCOVER and REQUEST messages
245 Even though we were parsing some DHCP options sent by the server, so far
246 we are only using the BOOTP 2-way handshake, even when talking to a DHCP
247 server.
248
249 Change this by actually sending out DHCP DISCOVER packets instead of the
250 generic (mostly empty) BOOTP BOOTREQUEST packets.
251
252 A pure BOOTP server would ignore the extra DHCP options in the DISCOVER
253 packet and would just reply with a BOOTREPLY packet, which we also
254 handle in the code.
255
256 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
257
258 2019-03-12 Andrei Borzenkov <arvidjaar@gmail.com>
259
260 net/dhcp: Allow receiving DHCP OFFER and ACK packets
261 In respone to a BOOTREQUEST packet a BOOTP server would answer with a BOOTREPLY
262 packet, which ends the conversation for good. DHCP uses a 4-way handshake,
263 where the initial server respone is an OFFER, which has to be answered with
264 REQUEST by the client again, only to be completed by an ACKNOWLEDGE packet
265 from the server.
266
267 Teach the grub_net_process_dhcp() function to deal with OFFER packets,
268 and treat ACK packets the same es BOOTREPLY packets.
269
270 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
271
272 2019-03-12 Andrei Borzenkov <arvidjaar@gmail.com>
273
274 net/dhcp: Use DHCP options for name and bootfile
275 The BOOTP RFC describes the boot file name and the server name as being part
276 of the integral BOOTP data structure, with some limits on the size of them.
277 DHCP extends this by allowing them to be separate DHCP options, which is more
278 flexible.
279
280 Teach the code dealing with those fields to check for those DHCP options first
281 and use this information, if provided. We fall back to using the BOOTP
282 information if those options are not used.
283
284 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
285
286 2019-03-12 Andrei Borzenkov <arvidjaar@gmail.com>
287
288 net/dhcp: Introduce per-interface timeout
289 Currently we have a global timeout for all network cards in the BOOTP/DHCP
290 discovery process.
291
292 Make this timeout a per-interface one, so better accommodate the upcoming
293 4-way DHCP handshake and to also cover the lease time limit a DHCP offer
294 will come with.
295
296 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
297
298 2019-03-12 Andrei Borzenkov <arvidjaar@gmail.com>
299
300 net/dhcp: Make grub_net_process_dhcp() take an interface
301 Change the interface of the function dealing with incoming BOOTP packets
302 to take an interface instead of a card, to allow more fine per-interface
303 state (timeout, handshake state) later on.
304
305 Use the opportunity to clean up the code a bit.
306
307 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
308
309 2019-03-12 Andrei Borzenkov <arvidjaar@gmail.com>
310
311 net/dhcp: Refactor DHCP packet transmission into separate function
312 In contrast to BOOTP, DHCP uses a 4-way handshake, so requires to send
313 packets more often.
314
315 Refactor the generation and sending of the BOOTREQUEST packet into
316 a separate function, so that future code can more easily reuse this.
317
318 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
319
320 2019-03-12 Andrei Borzenkov <arvidjaar@gmail.com>
321
322 net/dhcp: Allow overloading legacy bootfile and name field
323 DHCP specifies a special dummy option OVERLOAD, to allow DHCP options to
324 spill over into the (legacy) BOOTFILE and SNAME fields.
325
326 Parse and handle this option properly.
327
328 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
329
330 2019-03-12 Andrei Borzenkov <arvidjaar@gmail.com>
331
332 net/dhcp: Replace parse_dhcp_vendor() with find_dhcp_option()
333 For proper DHCP support we will need to parse DHCP options from a packet
334 more often and at various places.
335
336 Refactor the option parsing into a new function, which will scan a packet to
337 find *a particular* option field. Use that new function in places where we
338 were dealing with DHCP options before.
339
340 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
341
342 2019-03-12 Andrei Borzenkov <arvidjaar@gmail.com>
343
344 net/dhcp: Remove dead code
345 The comment is right, the "giaddr" fields holds the IP address of the BOOTP
346 relay, not a general purpose router address. Just remove the commented code,
347 archeologists can find it in the git history.
348
349 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
350
351 2019-03-12 Jesús Diéguez Fernández <jesusdf@gmail.com>
352
353 msr: Add new MSR modules (rdmsr/wrmsr)
354 In order to be able to read from and write to model-specific registers,
355 two new modules are added. They are i386 specific, as the cpuid module.
356
357 rdmsr module registers the command rdmsr that allows reading from a MSR.
358 wrmsr module registers the command wrmsr that allows writing to a MSR.
359
360 wrmsr module is disabled if UEFI secure boot is enabled.
361
362 Please note that on SMP systems, interacting with a MSR that has a scope
363 per hardware thread, implies that the value only applies to the
364 particular cpu/core/thread that ran the command.
365
366 Also, if you specify a reserved or unimplemented MSR address, it will
367 cause a general protection exception (which is not currently being
368 handled) and the system will reboot.
369
370 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
371
372 2019-03-12 Jesús Diéguez Fernández <jesusdf@gmail.com>
373
374 asm: Replace "__asm__ __volatile__" with "asm volatile"
375 In order to maintain the coding style consistency, it was requested to
376 replace the methods that use "__asm__ __volatile__" with "asm volatile".
377
378 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
379
380 2019-03-12 Eric Snowberg <eric.snowberg@oracle.com>
381
382 sparc64: Add bios boot partition support
383 Add BIOS Boot Partition support for sparc64 platforms. This will work a
384 little different than x86. With GPT, both the OBP "load" and "boot" commands
385 are partition aware and neither command can see the partition table. Therefore
386 the entire boot-loader is stored within the BIOS Boot Partition and nothing
387 is stored within the bootstrap code area of MBR.
388
389 To use it, the end user will issue the boot command with the path pointing to
390 the BIOS Boot Partition.
391
392 For example with the disk below:
393
394 Model: Unknown (unknown)
395 Disk /dev/nvme1n1: 1600GB
396 Sector size (logical/physical): 512B/512B
397 Partition Table: gpt
398
399 Number Start End Size File system Name Flags
400 1 1049kB 1075MB 1074MB ext3
401 2 1075MB 1076MB 1049kB bios_grub
402 3 1076MB 1600GB 1599GB lvm
403
404 To boot grub2 from OBP, you would use:
405
406 boot /pci@302/pci@1/pci@0/pci@13/nvme@0/disk@1:b
407
408 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
409
410 2019-03-12 Eric Snowberg <eric.snowberg@oracle.com>
411
412 ieee1275: obdisk driver
413 Add a new disk driver called obdisk for IEEE1275 platforms. Currently
414 the only platform using this disk driver is SPARC, however other IEEE1275
415 platforms could start using it if they so choose. While the functionality
416 within the current IEEE1275 ofdisk driver may be suitable for PPC and x86, it
417 presented too many problems on SPARC hardware.
418
419 Within the old ofdisk, there is not a way to determine the true canonical
420 name for the disk. Within Open Boot, the same disk can have multiple names
421 but all reference the same disk. For example the same disk can be referenced
422 by its SAS WWN, using this form:
423
424 /pci@302/pci@2/pci@0/pci@17/LSI,sas@0/disk@w5000cca02f037d6d,0
425
426 It can also be referenced by its PHY identifier using this form:
427
428 /pci@302/pci@2/pci@0/pci@17/LSI,sas@0/disk@p0
429
430 It can also be referenced by its Target identifier using this form:
431
432 /pci@302/pci@2/pci@0/pci@17/LSI,sas@0/disk@0
433
434 Also, when the LUN=0, it is legal to omit the ,0 from the device name. So with
435 the disk above, before taking into account the device aliases, there are 6 ways
436 to reference the same disk.
437
438 Then it is possible to have 0 .. n device aliases all representing the same disk.
439 Within this new driver the true canonical name is determined using the the
440 IEEE1275 encode-unit and decode-unit commands when address_cells == 4. This
441 will determine the true single canonical name for the device so multiple ihandles
442 are not opened for the same device. This is what frequently happens with the old
443 ofdisk driver. With some devices when they are opened multiple times it causes
444 the entire system to hang.
445
446 Another problem solved with this driver is devices that do not have a device
447 alias can be booted and used within GRUB. Within the old ofdisk, this was not
448 possible, unless it was the original boot device. All devices behind a SAS
449 or SCSI parent can be found. Within the old ofdisk, finding these disks
450 relied on there being an alias defined. The alias requirement is not
451 necessary with this new driver. It can also find devices behind a parent
452 after they have been hot-plugged. This is something that is not possible
453 with the old ofdisk driver.
454
455 The old ofdisk driver also incorrectly assumes that the device pointing to by a
456 device alias is in its true canonical form. This assumption is never made with
457 this new driver.
458
459 Another issue solved with this driver is that it properly caches the ihandle
460 for all open devices. The old ofdisk tries to do this by caching the last
461 opened ihandle. However this does not work properly because the layer above
462 does not use a consistent device name for the same disk when calling into the
463 driver. This is because the upper layer uses the bootpath value returned within
464 /chosen, other times it uses the device alias, and other times it uses the
465 value within grub.cfg. It does not have a way to figure out that these devices
466 are the same disk. This is not a problem with this new driver.
467
468 Due to the way GRUB repeatedly opens and closes the same disk. Caching the
469 ihandle is important on SPARC. Without caching, some SAS devices can take
470 15 - 20 minutes to get to the GRUB menu. This ihandle caching is not possible
471 without correctly having the canonical disk name.
472
473 When available, this driver also tries to use the deblocker #blocks and
474 a way of determining the disk size.
475
476 Finally and probably most importantly, this new driver is also capable of
477 seeing all partitions on a GPT disk. With the old driver, the GPT
478 partition table can not be read and only the first partition on the disk
479 can be seen.
480
481 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
482
483 2019-03-12 Paul Menzel <pmenzel@molgen.mpg.de>
484
485 Makefile: Allow to set file systems modules for default_payload.elf
486 By default all file system modules are added to the GRUB coreboot
487 payload `default_payload.elf`. This makes the image quite big,
488 especially as often not all modules are needed.
489
490 Introduce the variable `FS_PAYLOAD_MODULES`, which can be used to
491 explicitly set file systems modules to be added.
492
493 $ make default_payload.elf
494 test -f default_payload.elf && rm default_payload.elf || true
495 pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o default_payload.elf --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu affs afs bfs btrfs cbfs cpio cpio_be exfat ext2 f2fs fat hfs hfsplus iso9660 jfs minix minix2 minix2_be minix3 minix3_be minix_be newc nilfs2 ntfs odc procfs reiserfs romfs sfs squash4 tar udf ufs1 ufs1_be ufs2 xfs zfs password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=./coreboot.cfg
496 $ ls -l default_payload.elf
497 -rw-rw---- 1 joey joey 1199568 Mar 6 13:58 default_payload.elf
498
499 $ make default_payload.elf FS_PAYLOAD_MODULES="" # ext2 already in `--modules`
500 test -f default_payload.elf && rm default_payload.elf || true
501 pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o default_payload.elf --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu password_pbkdf2 ' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=./coreboot.cfg
502 $ ls -l default_payload.elf
503 -rw-rw---- 1 joey joey 832976 Mar 7 12:13 default_payload.elf
504
505 So, the resulting payload size is around 370 kB smaller. (Adding it to
506 the CBFS, it will be compressed, so the effective size difference will
507 be smaller.)
508
509 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
510
511 2019-03-07 Vladimir Serbinenko <phcoder@gmail.com>
512
513 windows/platform.c: Fix compilation errors
514
515 2019-03-05 Colin Watson <cjwatson@ubuntu.com>
516
517 gnulib: Upgrade Gnulib and switch to bootstrap tool
518 Upgrade Gnulib files to 20190105.
519
520 It's much easier to maintain GRUB's use of portability support files
521 from Gnulib when the process is automatic and driven by a single
522 configuration file, rather than by maintainers occasionally running
523 gnulib-tool and committing the result. Removing these
524 automatically-copied files from revision control also removes the
525 temptation to hack the output in ways that are difficult for future
526 maintainers to follow. Gnulib includes a "bootstrap" program which is
527 designed for this.
528
529 The canonical way to bootstrap GRUB from revision control is now
530 "./bootstrap", but "./autogen.sh" is still useful if you just want to
531 generate the GRUB-specific parts of the build system.
532
533 GRUB now requires Autoconf >= 2.63 and Automake >= 1.11, in line with
534 Gnulib.
535
536 Gnulib source code is now placed in grub-core/lib/gnulib/ (which should
537 not be edited directly), and GRUB's patches are in
538 grub-core/lib/gnulib-patches/. I've added a few notes to the developer
539 manual on how to maintain this.
540
541 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
542
543 2019-03-05 Colin Watson <cjwatson@ubuntu.com>
544
545 syslinux: Fix syslinux_test in out-of-tree builds
546 syslinux_parse simplifies some filenames by removing things like ".."
547 segments, but the tests assumed that @abs_top_srcdir@ would be
548 untouched, which is not true in the case of out-of-tree builds where
549 @abs_top_srcdir@ may contain ".." segments.
550
551 Performing the substitution requires some awkwardness in Makefile.am due
552 to details of how config.status works.
553
554 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
555
556 2019-03-05 Colin Watson <cjwatson@ubuntu.com>
557
558 util: Detect more I/O errors
559 Many of GRUB's utilities don't check anywhere near all the possible
560 write errors. For example, if grub-install runs out of space when
561 copying a file, it won't notice. There were missing checks for the
562 return values of write, fflush, fsync, and close (or the equivalents on
563 other OSes), all of which must be checked.
564
565 I tried to be consistent with the existing logging practices of the
566 various hostdisk implementations, but they weren't entirely consistent
567 to start with so I used my judgement. The result at least looks
568 reasonable on GNU/Linux when I provoke a write error:
569
570 Installing for x86_64-efi platform.
571 grub-install: error: cannot copy `/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed' to `/boot/efi/EFI/debian/grubx64.efi': No space left on device.
572
573 There are more missing checks in other utilities, but this should fix
574 the most critical ones.
575
576 Fixes Debian bug #922741.
577
578 Reviewed-by: Steve McIntyre <93sam@debian.org>
579 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
580
581 2019-03-05 James Clarke <jrtc27@jrtc27.com>
582
583 osdep/freebsd: Fix partition calculation for EBR entries
584 For EBR partitions, "start" is the relative starting sector of the EBR
585 header itself, whereas "offset" is the relative starting byte of the
586 partition's contents, excluding the EBR header and any padding. Thus we
587 must use "offset", and divide by the sector size to convert to sectors.
588
589 Fixes Debian bug #923253.
590
591 Reviewed-by: Colin Watson <cjwatson@ubuntu.com>
592 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
593
594 2019-02-26 Steve McIntyre <93sam@debian.org>
595
596 grub-install: Check for arm-efi as a default target
597 Much like on x86, we can work out if the system is running on top of EFI
598 firmware. If so, return "arm-efi". If not, fall back to "arm-uboot" as
599 previously.
600
601 Split out the code to (maybe) load the efivar module and check for
602 /sys/firmware/efi into a common helper routine is_efi_system().
603
604 Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
605 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
606
607 2019-02-26 Daniel Kiper <daniel.kiper@oracle.com>
608
609 Revert "grub-install: Check for arm-efi as a default target"
610 This reverts commit 082fd84d525f8d6602f892160b77c0a948308a78.
611
612 Incorrect version of the patch was pushed into the git repo.
613
614 Reported-by: Leif Lindholm <leif.lindholm@linaro.org>
615
616 2019-02-25 Alexander Graf <agraf@suse.de>
617
618 travis: Add Travis CI config file
619 There is a really convenient service for open source project from Travis
620 CI: They allow for free CI testing using their infrastructure.
621
622 GRUB has had issues with broken builds for various targets for a long time
623 already. The main reason is a lack of CI to just do smoke tests on whether
624 all targets still at least compile.
625
626 This patch adds a Travis config file which builds (almost) all currently
627 available targets.
628
629 On top of that, this Travis config also runs a small execution test on the
630 x86_64-efi target.
631
632 All of this config file can easily be extended further on. It probably
633 makes sense to do something similar to the u-boot test infrastructure
634 that communicates with the payload properly. Going forward, we also will
635 want to do more QEMU runtime checks for other targets.
636
637 Currently, with this config alone, I already see about half of the available
638 targets as broken. So it's definitely desperately needed :).
639
640 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
641
642 2019-02-25 Steve McIntyre <93sam@debian.org>
643
644 grub-install: Check for arm-efi as a default target
645 Much like on x86, we can work out if the system is running on top
646 of EFI firmware. If so, return "arm-efi". If not, fall back to
647 "arm-uboot" as previously.
648
649 Heavily inspired by the existing code for x86.
650
651 Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
652 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
653
654 2019-02-25 Leif Lindholm <leif.lindholm@linaro.org>
655
656 arm64/efi: Fix grub_efi_get_ram_base()
657 grub_efi_get_ram_base() looks for the lowest available RAM address by
658 traversing the memory map, comparing lowest address found so far.
659 Due to a brain glitch, that "so far" was initialized to GRUB_UINT_MAX -
660 completely preventing boot on systems without RAM below 4GB.
661
662 Change the initial value to GRUB_EFI_MAX_USABLE_ADDRESS, as originally
663 intended.
664
665 Reported-by: Steve McIntyre <93sam@debian.org>
666 Tested-by: Steve McIntyre <93sam@debian.org>
667 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
668
669 2019-02-25 Paul Menzel <pmenzel@molgen.mpg.de>
670
671 normal/menu: Do not treat error values as key presses
672 Some terminals, like `grub-core/term/at_keyboard.c`, return `-1` in case
673 they are not ready yet.
674
675 if (! KEYBOARD_ISREADY (grub_inb (KEYBOARD_REG_STATUS)))
676 return -1;
677
678 Currently, that is treated as a key press, and the menu time-out is
679 cancelled/cleared. This is unwanted, as the boot is stopped and the user
680 manually has to select a menu entry. Therefore, adapt the condition to
681 require the key value also to be greater than 0.
682
683 `GRUB_TERM_NO_KEY` is defined as 0, so the condition could be collapsed
684 to greater or equal than (≥) 0, but the compiler will probably do that
685 for us anyway, so keep the cases separate for clarity.
686
687 This is tested with coreboot, the GRUB default payload, and the
688 configuration file `grub.cfg` below.
689
690 For GRUB:
691
692 $ ./autogen.sh
693 $ ./configure --with-platform=coreboot
694 $ make -j`nproc`
695 $ make default_payload.elf
696
697 For coreboot:
698
699 $ more grub.cfg
700 serial --unit 0 --speed 115200
701 set timeout=5
702
703 menuentry 'halt' {
704 halt
705 }
706 $ build/cbfstool build/coreboot.rom add-payload \
707 -f /dev/shm/grub/default_payload.elf -n fallback/payload -c lzma
708 $ build/cbfstool build/coreboot.rom add -f grub.cfg -n etc/grub.cfg -t raw
709 $ qemu-system-x86_64 --version
710 QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-2+b1)
711 Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers
712 $ qemu-system-x86_64 -M pc -bios build/coreboot.rom -serial stdio -nic none
713
714 Currently, the time-out is cancelled/cleared. With the commit, it is not.
715 With a small GRUB payload, this the problem is also reproducible on the
716 ASRock E350M1.
717
718 Link: http://lists.gnu.org/archive/html/grub-devel/2019-01/msg00037.html
719
720 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
721
722 2019-02-25 Alexander Graf <agraf@suse.de>
723
724 fdt: Treat device tree file type like ACPI
725 We now have signature check logic in grub which allows us to treat
726 files differently depending on their file type.
727
728 Treat a loaded device tree like an overlayed ACPI table.
729 Both describe hardware, so I suppose their threat level is the same.
730
731 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
732 Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
733
734 2019-02-25 Alexander Graf <agraf@suse.de>
735
736 RISC-V: Add to build system
737 This patch adds support for RISC-V to the grub build system. With this
738 patch, I can successfully build grub on RISC-V as a UEFI application.
739
740 Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
741 Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
742 Tested-by: Bin Meng <bmeng.cn@gmail.com>
743 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
744
745 2019-02-25 Alexander Graf <agraf@suse.de>
746
747 RISC-V: Add libgcc helpers for clz
748 Gcc may decide it wants to call helper functions to execute clz. Provide
749 them in our own copy of libgcc.
750
751 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
752
753 2019-02-25 Alexander Graf <agraf@suse.de>
754
755 RISC-V: Add auxiliary files
756 To support a new architecture we need to provide a few helper functions
757 for memory, cache, timer, etc support.
758
759 This patch adds the remainders of those. Some bits are still disabled,
760 as I couldn't guarantee that we're always running on models / in modes
761 where the respective hardware is available.
762
763 Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
764 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
765
766 2019-02-25 Alexander Graf <agraf@suse.de>
767
768 RISC-V: Add awareness for RISC-V reloations
769 This patch adds awareness of RISC-V relocations throughout the grub tools
770 as well as dynamic linkage and elf->PE relocation conversion support.
771
772 Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
773 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
774
775 2019-02-25 Alexander Graf <agraf@suse.de>
776
777 RISC-V: Add Linux load logic
778 We currently only support to run grub on RISC-V as UEFI payload. Ideally,
779 we also only want to support running Linux underneath as UEFI payload.
780
781 Prepare that with some Linux boot stub code. Once the arm64 target is
782 generalized, we can hook into that one and gain boot functionality.
783
784 Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
785 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
786
787 2019-02-25 Alexander Graf <agraf@suse.de>
788
789 RISC-V: Add early startup code
790 On entry, we need to save the system table pointer as well as our image
791 handle. Add an early startup file that saves them and then brings us
792 into our main function.
793
794 Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
795 Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
796 Tested-by: Bin Meng <bmeng.cn@gmail.com>
797 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
798
799 2019-02-25 Alexander Graf <agraf@suse.de>
800
801 RISC-V: Add setjmp implementation
802 This patch adds a 32/64 capable setjmp implementation for RISC-V.
803
804 Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
805 Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
806 Tested-by: Bin Meng <bmeng.cn@gmail.com>
807 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
808
809 2019-02-25 Alexander Graf <agraf@suse.de>
810
811 elf.h: Add RISC-V definitions
812 The RISC-V ABI document outlines ELF header structure and relocation
813 information. Pull the respective magic numbers into our elf header
814 so we can make use of them.
815
816 Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
817 Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
818 Tested-by: Bin Meng <bmeng.cn@gmail.com>
819 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
820
821 2019-02-25 Alexander Graf <agraf@suse.de>
822
823 PE: Add RISC-V definitions
824 The PE format defines magic numbers as well as relocation identifiers for
825 RISC-V. Add them to our include file, so we can make use of them.
826
827 Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
828 Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
829 Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
830 Tested-by: Bin Meng <bmeng.cn@gmail.com>
831 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
832
833 2019-02-25 Alexander Graf <agraf@suse.de>
834
835 efi: Rename armxx to arch
836 Some architectures want to boot Linux as plain UEFI binary. Today that
837 really only encompasses ARM and AArch64, but going forward more
838 architectures may adopt that model.
839
840 So rename our internal API accordingly.
841
842 Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
843 Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
844 Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
845 Tested-by: Bin Meng <bmeng.cn@gmail.com>
846 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
847
848 2019-02-06 Alexander Graf <agraf@suse.de>
849
850 mkimage: Clarify file alignment in efi case
851 There are a few spots in the PE generation code for EFI binaries that uses
852 the section alignment rather than file alignment, even though the alignment
853 is really only file bound.
854
855 Replace those cases with the file alignment constant instead.
856
857 Reported-by: Daniel Kiper <dkiper@net-space.pl>
858 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
859 Tested-by: Julien ROBIN <julien.robin28@free.fr>
860
861 2019-02-06 Alexander Graf <agraf@suse.de>
862
863 mkimage: Align efi sections on 4k boundary
864 There is UEFI firmware popping up in the wild now that implements stricter
865 permission checks using NX and write protect page table entry bits.
866
867 This means that firmware now may fail to load binaries if its individual
868 sections are not page aligned, as otherwise it can not ensure permission
869 boundaries.
870
871 So let's bump all efi section alignments up to 4k (EFI page size). That way
872 we will stay compatible going forward.
873
874 Unfortunately our internals can't deal very well with a mismatch of alignment
875 between the virtual and file offsets, so we have to also pad our target
876 binary a bit.
877
878 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
879 Tested-by: Julien ROBIN <julien.robin28@free.fr>
880
881 2019-02-06 Alexander Graf <agraf@suse.de>
882
883 mkimage: Use EFI32_HEADER_SIZE define in arm-efi case
884 The efi-arm case was defining its own header size calculation, even though it's
885 100% identical to the common EFI32_HEADER_SIZE definition.
886
887 So let's clean it up to use the common define.
888
889 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
890 Tested-by: Julien ROBIN <julien.robin28@free.fr>
891
892 2019-02-06 Guillaume GARDET <guillaume.gardet@arm.com>
893
894 arm: Move initrd upper to leave more space for kernel
895 This patch allows to have bigger kernels. If the kernel grows, then it will
896 overwrite the initrd when it is extracted.
897
898 Acked-by: Alexander Graf <agraf@suse.de>
899 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
900
901 2019-01-23 Leif Lindholm <leif.lindholm@linaro.org>
902
903 linux, efi, arm*, fdt: Break FDT extra allocation space out into a #define
904 A certain amount of dynamic space is required for the handover from
905 GRUB/Linux-EFI-stub. This entails things like initrd addresses,
906 address-cells entries and associated strings.
907
908 But move this into a proper centralised #define rather than live-code
909 it in the loader.
910
911 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
912
913 2019-01-22 Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
914
915 uboot: Add the missing disk write operation support
916 uboot_disk_write() is currently lacking the write support
917 to storage devices because, historically, those devices did not
918 implement block_write() in U-Boot.
919
920 The solution has been tested using a patched U-Boot loading
921 and booting GRUB in a QEMU vexpress-a9 environment.
922 The disk write operations were triggered with GRUB's save_env
923 command.
924
925 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
926
927 2019-01-21 Max Tottenham <mtottenh@akamai.com>
928
929 tpm: Fix bug in GRUB2 TPM module
930 The value of tpm_handle changes between successive calls to grub_tpm_handle_find(),
931 as instead of simply copying the stored pointer we end up taking the address of
932 said pointer when using the cached value of grub_tpm_handle.
933
934 This causes grub_efi_open_protocol() to return a nullptr in grub_tpm2_execute()
935 and grub_tpm2_log_event(). Said nullptr goes unchecked and
936 efi_call_5(tpm->hash_log_extend_event,...) ends up jumping to 0x0, Qemu crashes
937 once video ROM is reached at 0xb0000.
938
939 This patch seems to do the trick of fixing that bug, but we should also ensure
940 that all calls to grub_efi_open_protocol() are checked so that we don't start
941 executing low memory.
942
943 Reviewed-by: Matthew Garrett <mjg59@google.com>
944 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
945
946 2019-01-14 Colin Watson <cjwatson@ubuntu.com>
947
948 pgp: Fix emu build and tests after pgp module renaming
949 Commit b07feb8746c3bb845e3f0d33d37c0bded704d14d (verifiers: Rename
950 verify module to pgp module) renamed the "verify" module to "pgp", but
951 the GRUB_MOD_INIT and GRUB_MOD_FINI macros were left as "verify", which
952 broke the emu target build; and file_filter_test still referred to the
953 now non-existent "verify" module. Fix both of these.
954
955 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
956
957 2019-01-14 Peter Große <pegro@friiks.de>
958
959 grub-mkconfig/20_linux_xen: Support multiple early initrd images
960 Add support for multiple, shared, early initrd images. These early
961 images will be loaded in the order declared, and all will be loaded
962 before the initrd image.
963
964 While many classes of data can be provided by early images, the
965 immediate use case would be for distributions to provide CPU
966 microcode to mitigate the Meltdown and Spectre vulnerabilities.
967
968 Xen has also support to load microcode updates provided as additional
969 modules by the bootloader.
970
971 There are two environment variables provided for declaring the early
972 images.
973
974 * GRUB_EARLY_INITRD_LINUX_STOCK is for the distribution declare
975 images that are provided by the distribution or installed packages.
976 If undeclared, this will default to a set of common microcode image
977 names.
978
979 * GRUB_EARLY_INITRD_LINUX_CUSTOM is for user created images. User
980 images will be loaded after the stock images.
981
982 These separate configurations allow the distribution and user to
983 declare different image sets without clobbering each other.
984
985 This also makes a minor update to ensure that UUID partition labels
986 stay disabled when no initrd image is found, even if early images are
987 present.
988
989 This is basically a copy of a698240d "grub-mkconfig/10_linux: Support
990 multiple early initrd images" by Matthew S. Turnbull.
991
992 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
993
994 2019-01-14 Heinrich Schuchardt <xypron.glpk@gmx.de>
995
996 grub-core/loader/efi/fdt.c: Do not copy random memory
997 We should not try to copy any memory area which is outside of the original
998 fdt. If this extra memory is controlled by a hypervisor this might end
999 with a crash.
1000
1001 Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
1002 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1003
1004 2018-12-12 Matthew Garrett <matthewgarrett@google.com>
1005
1006 verifiers: Add TPM documentation
1007 Describe the behaviour of GRUB when the TPM module is in use.
1008
1009 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1010
1011 2018-12-12 Matthew Garrett <mjg59@google.com>
1012
1013 verifiers: Core TPM support
1014 Add support for performing basic TPM measurements. Right now this only
1015 supports extending PCRs statically and only on UEFI. In future we might
1016 want to have some sort of mechanism for choosing which events get logged
1017 to which PCRs, but this seems like a good default policy and we can wait
1018 to see whether anyone has a use case before adding more complexity.
1019
1020 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1021
1022 2018-12-12 Matthew Garrett <mjg59@google.com>
1023
1024 verifiers: Verify commands executed by grub
1025 Pass all commands executed by GRUB to the verifiers layer. Most verifiers will
1026 ignore this, but some (such as the TPM verifier) want to be able to measure and
1027 log each command executed in order to ensure that the boot state is as expected.
1028
1029 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1030
1031 2018-12-12 Juergen Gross <jgross@suse.com>
1032
1033 xen_pvh: Add support to configure
1034 Support platform i386/xen_pvh in configure.
1035
1036 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1037 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1038
1039 2018-12-12 Juergen Gross <jgross@suse.com>
1040
1041 xen_pvh: Support grub-install for xen_pvh
1042 Add xen_pvh support to grub-install.
1043
1044 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1045 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1046
1047 2018-12-12 Juergen Gross <jgross@suse.com>
1048
1049 xen_pvh: Support building a standalone image
1050 Support mkimage for xen_pvh.
1051
1052 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1053 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1054
1055 2018-12-12 Juergen Gross <jgross@suse.com>
1056
1057 xen: Use elfnote defines instead of plain numbers
1058 In order to avoid using plain integers for the ELF notes use the
1059 available Xen include instead.
1060
1061 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1062 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1063
1064 2018-12-12 Hans van Kranenburg <hans@knorrie.org>
1065
1066 grub-module-verifier: Ignore all_video for xen_pvh
1067 This solves the build failing with "Error: no symbol table and no
1068 .moddeps section"
1069
1070 Also see:
1071 - 6371e9c10433578bb236a8284ddb9ce9e201eb59
1072 - https://savannah.gnu.org/bugs/?49012
1073
1074 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1075 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1076
1077 2018-12-12 Juergen Gross <jgross@suse.com>
1078
1079 xen_pvh: Add build runes for grub-core
1080 Add the modifications to the build system needed to build a xen_pvh
1081 grub.
1082
1083 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1084 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1085
1086 2018-12-12 Juergen Gross <jgross@suse.com>
1087
1088 xen: Init memory regions for PVH
1089 Add all usable memory regions to grub memory management and add the
1090 needed mmap iterate code, which will be used by grub core (e.g.
1091 grub-core/lib/relocator.c or grub-core/mmap/mmap.c).
1092
1093 As we are running in 32-bit mode don't add memory above 4GB.
1094
1095 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1096 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1097
1098 2018-12-12 Juergen Gross <jgross@suse.com>
1099
1100 xen: Setup Xen specific data for PVH
1101 Initialize the needed Xen specific data. This is:
1102
1103 - the Xen start of day page containing the console and Xenstore ring
1104 page PFN and event channel
1105 - the grant table
1106 - the shared info page
1107
1108 Write back the possibly modified memory map to the hypervisor in case
1109 the guest is reading it from there again.
1110
1111 Set the RSDP address for the guest from the start_info page passed
1112 as boot parameter.
1113
1114 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1115 Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
1116 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1117
1118 2018-12-12 Juergen Gross <jgross@suse.com>
1119
1120 xen: Get memory map from hypervisor for PVH
1121 Retrieve the memory map from the hypervisor and normalize it to contain
1122 no overlapping entries and to be sorted by address.
1123
1124 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1125 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1126
1127 2018-12-12 Juergen Gross <jgross@suse.com>
1128
1129 xen: Setup hypercall page for PVH
1130 Add the needed code to setup the hypercall page for calling into the
1131 Xen hypervisor.
1132
1133 Import the XEN_HVM_DEBUGCONS_IOPORT define from Xen unstable into
1134 include/xen/arch-x86/xen.h
1135
1136 Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
1137 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1138 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1139
1140 2018-12-12 Juergen Gross <jgross@suse.com>
1141
1142 xen: Add PVH boot entry code
1143 Add the code for the Xen PVH mode boot entry.
1144
1145 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1146 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1147
1148 2018-12-12 Juergen Gross <jgross@suse.com>
1149
1150 xen: Add basic hooks for PVH in current code
1151 Add the hooks to current code needed for Xen PVH. They will be filled
1152 with code later when the related functionality is being added.
1153
1154 loader/i386/linux.c needs to include machine/kernel.h now as it needs
1155 to get GRUB_KERNEL_USE_RSDP_ADDR from there. This in turn requires to
1156 add an empty kernel.h header for some i386 platforms (efi, coreboot,
1157 ieee1275, xen) and for x86_64 efi.
1158
1159 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1160 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1161
1162 2018-12-12 Juergen Gross <jgross@suse.com>
1163
1164 xen: Add PVH specific defines to offset.h
1165 include/grub/offsets.h needs some defines for Xen PVH mode.
1166
1167 Add them. While at it line up the values in the surrounding lines to
1168 start at the same column.
1169
1170 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1171 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1172
1173 2018-12-12 Juergen Gross <jgross@suse.com>
1174
1175 xen: Modify grub_xen_ptr2mfn() for Xen PVH
1176 grub_xen_ptr2mfn() returns the machine frame number for a given pointer
1177 value. For Xen-PVH guests this is just the PFN. Add the PVH specific
1178 variant.
1179
1180 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1181 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1182
1183 2018-12-12 Juergen Gross <jgross@suse.com>
1184
1185 xen: Rearrange xen/init.c to prepare it for Xen PVH mode
1186 Rearrange grub-core/kern/xen/init.c to prepare adding PVH mode support
1187 to it. This includes putting some code under #ifdef GRUB_MACHINE_XEN
1188 as it will not be used when running as PVH.
1189
1190 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1191 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1192
1193 2018-12-12 Juergen Gross <jgross@suse.com>
1194
1195 xen: Add some dummy headers for PVH mode
1196 With Xen PVH mode adding a new machine type the machine related headers
1197 need to be present for the build to succeed. Most of the headers just
1198 need to include the related common i386 headers. Add those to the tree.
1199
1200 Note that xen_pvh/int.h needs to include pc/int_types.h instead of
1201 pc/int.h in order to avoid the definition of grub_bios_interrupt().
1202
1203 xen_pvh/memory.h needs to include coreboot/memory.h (like some other
1204 <machine>/memory.h do as well) as this contains just the needed stubs.
1205
1206 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1207 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1208
1209 2018-12-12 Juergen Gross <jgross@suse.com>
1210
1211 xen: Prepare common code for Xen PVH support
1212 Some common code needs to be special cased for Xen PVH mode. This hits
1213 mostly Xen PV mode specific areas.
1214
1215 Split include/grub/i386/pc/int_types.h off from
1216 include/grub/i386/pc/int.h to support including this file later from
1217 xen_pvh code without the grub_bios_interrupt definition.
1218
1219 Move definition of struct grub_e820_mmap_entry from
1220 grub-core/mmap/i386/pc/mmap.c to include/grub/i386/memory.h in order
1221 to make it usable from xen_pvh code.
1222
1223 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1224 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1225
1226 2018-12-12 Juergen Gross <jgross@suse.com>
1227
1228 xen: Carve out grant tab initialization into dedicated function
1229 Initialize the grant tab in a dedicated function. This will enable
1230 using it for PVH guests, too.
1231
1232 Call the new function from grub_machine_init() as this will later
1233 be common between Xen PV and Xen PVH mode.
1234
1235 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1236 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1237
1238 2018-12-12 Juergen Gross <jgross@suse.com>
1239
1240 loader/linux: Support passing RSDP address via boot params
1241 Xen PVH guests will have the RSDP at an arbitrary address. Support that
1242 by passing the RSDP address via the boot parameters to Linux.
1243
1244 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1245 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1246
1247 2018-12-12 Juergen Gross <jgross@suse.com>
1248
1249 xen: Add some Xen headers
1250 In order to support grub2 in Xen PVH environment some additional Xen
1251 headers are needed as grub2 will be started in PVH mode requiring to
1252 use several HVM hypercalls and structures.
1253
1254 Add the needed headers from Xen 4.10 being the first Xen version with
1255 full (not only experimental) PVH guest support.
1256
1257 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1258 Tested-by: Hans van Kranenburg <hans@knorrie.org>
1259
1260 2018-12-07 Daniel Kiper <daniel.kiper@oracle.com>
1261
1262 verifiers: ARM Xen fallout cleanup
1263 ARM Xen fallout cleanup after commit ca0a4f689 (verifiers: File type for
1264 fine-grained signature-verification controlling).
1265
1266 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
1267
1268 2018-12-07 Daniel Kiper <daniel.kiper@oracle.com>
1269
1270 verifiers: Xen fallout cleanup
1271 Xen fallout cleanup after commit ca0a4f689 (verifiers: File type for
1272 fine-grained signature-verification controlling).
1273
1274 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
1275
1276 2018-11-28 Eric Snowberg <eric.snowberg@oracle.com>
1277
1278 ofnet: Fix build regression in grub_ieee1275_parse_bootpath()
1279 The grub_ieee1275_parse_bootpath() function (commit a661a32, ofnet: Initialize
1280 structs in bootpath parser) introduces a build regression on SPARC:
1281
1282 cc1: warnings being treated as errors
1283 net/drivers/ieee1275/ofnet.c: In function 'grub_ieee1275_parse_bootpath':
1284 net/drivers/ieee1275/ofnet.c:156: error: missing initializer
1285 net/drivers/ieee1275/ofnet.c:156: error: (near initialization for 'client_addr.type')
1286 net/drivers/ieee1275/ofnet.c:156: error: missing initializer
1287 net/drivers/ieee1275/ofnet.c:156: error: (near initialization for 'gateway_addr.type')
1288 net/drivers/ieee1275/ofnet.c:156: error: missing initializer
1289 net/drivers/ieee1275/ofnet.c:156: error: (near initialization for 'subnet_mask.type')
1290 net/drivers/ieee1275/ofnet.c:157: error: missing initializer
1291 net/drivers/ieee1275/ofnet.c:157: error: (near initialization for 'hw_addr.type')
1292 make[3]: *** [net/drivers/ieee1275/ofnet_module-ofnet.o] Error 1
1293
1294 Initialize the entire structure.
1295
1296 More info can be found here:
1297 http://lists.gnu.org/archive/html/grub-devel/2018-03/msg00034.html
1298
1299 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1300
1301 2018-11-26 Nick Terrell <terrelln@fb.com>
1302
1303 btrfs: Add zstd support to grub btrfs
1304 - Adds zstd support to the btrfs module.
1305 - Adds a test case for btrfs zstd support.
1306 - Changes top_srcdir to srcdir in the btrfs module's lzo include
1307 following comments from Daniel Kiper about the zstd include.
1308
1309 Tested on Ubuntu-18.04 with a btrfs /boot partition with and without zstd
1310 compression. A test case was also added to the test suite that fails before
1311 the patch, and passes after.
1312
1313 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1314
1315 2018-11-26 Nick Terrell <terrelln@fb.com>
1316
1317 zstd: Import upstream zstd-1.3.6
1318 - Import zstd-1.3.6 from upstream
1319 - Add zstd's module.c file
1320 - Add the zstd module to Makefile.core.def
1321
1322 Import zstd-1.3.6 from upstream [1]. Only the files need for decompression
1323 are imported. I used the latest zstd release, which includes patches [2] to
1324 build cleanly in GRUB.
1325
1326 I included the script used to import zstd-1.3.6 below at the bottom of the
1327 commit message.
1328
1329 Upstream zstd commit hash: 4fa456d7f12f8b27bd3b2f5dfd4f46898cb31c24
1330 Upstream zstd commit name: Merge pull request #1354 from facebook/dev
1331
1332 Zstd requires some posix headers, which it gets from posix_wrap.
1333 This can be checked by inspecting the .Po files generated by automake,
1334 which contain the header dependencies. After building run the command
1335 `cat grub-core/lib/zstd/.deps-core/*.Po` to see the dependencies [3].
1336 The only OS dependencies are:
1337
1338 - stddef.h, which is already a dependency in posix_wrap, and used for size_t
1339 by lzo and xz.
1340 - stdarg.h, which comes from the grub/misc.h header, and we don't use in zstd.
1341
1342 All the types like uint64_t are typedefed to grub_uint64_t under the hood.
1343 The only exception is size_t, which comes from stddef.h. This is already the
1344 case for lzo and xz. I don't think there are any cross-compilation concerns,
1345 because cross-compilers provide their own system headers (and it would already
1346 be broken).
1347
1348 [1] https://github.com/facebook/zstd/releases/tag/v1.3.6
1349 [2] https://github.com/facebook/zstd/pull/1344
1350 [3] https://gist.github.com/terrelln/7a16b92f5a1b3aecf980f944b4a966c4
1351
1352 ```
1353
1354 curl -L -O https://github.com/facebook/zstd/releases/download/v1.3.6/zstd-1.3.6.tar.gz
1355 curl -L -O https://github.com/facebook/zstd/releases/download/v1.3.6/zstd-1.3.6.tar.gz.sha256
1356 sha256sum --check zstd-1.3.6.tar.gz.sha256
1357 tar xzf zstd-1.3.6.tar.gz
1358
1359 SRC_LIB="zstd-1.3.6/lib"
1360 DST_LIB="grub-core/lib/zstd"
1361 rm -rf $DST_LIB
1362 mkdir -p $DST_LIB
1363 cp $SRC_LIB/zstd.h $DST_LIB/
1364 cp $SRC_LIB/common/*.[hc] $DST_LIB/
1365 cp $SRC_LIB/decompress/*.[hc] $DST_LIB/
1366 rm $DST_LIB/{pool.[hc],threading.[hc]}
1367 rm -rf zstd-1.3.6*
1368 echo SUCCESS!
1369 ```
1370
1371 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1372
1373 2018-11-21 Michael Chang <mchang@suse.com>
1374
1375 verifiers: fix double close on pgp's sig file descriptor
1376 An error emerged as when I was testing the verifiers branch, so instead
1377 of putting it in pgp prefix, the verifiers is used to reflect what the
1378 patch is based on.
1379
1380 While running verify_detached, grub aborts with error.
1381
1382 verify_detached /@/.snapshots/1/snapshot/boot/grub/grub.cfg
1383 /@/.snapshots/1/snapshot/boot/grub/grub.cfg.sig
1384
1385 alloc magic is broken at 0x7beea660: 0
1386 Aborted. Press any key to exit.
1387
1388 The error is caused by sig file descriptor been closed twice, first time
1389 in grub_verify_signature() to which it is passed as parameter. Second in
1390 grub_cmd_verify_signature() or in whichever opens the sig file
1391 descriptor. The second close is not consider as bug to me either, as in
1392 common rule of what opens a file has to close it to avoid file
1393 descriptor leakage.
1394
1395 After all the design of grub_verify_signature() makes it difficult to keep
1396 a good trace on opened file descriptor from it's caller. Let's refine
1397 the application interface to accept file path rather than descriptor, in
1398 this way the caller doesn't have to care about closing the descriptor by
1399 delegating it to grub_verify_signature() with full tracing to opened
1400 file descriptor by itself.
1401
1402 Also making it clear that sig descriptor is not referenced in error
1403 returning path of grub_verify_signature_init(), so it can be closed
1404 directly by it's caller. This also makes delegating it to
1405 grub_pubkey_close() infeasible to help in relieving file descriptor
1406 leakage as it has to depend on uncertainty of ctxt fields in error
1407 returning path.
1408
1409 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1410
1411 2018-11-21 Lee Jones <lee.jones@linaro.org>
1412
1413 generic/blocklist: Fix implicit declaration of function grub_file_filter_disable_compression()
1414 grub_file_filter_disable_compression() no longer exists.
1415
1416 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1417
1418 2018-11-21 Lee Jones <lee.jones@linaro.org>
1419
1420 arm64/xen: Fix too few arguments to function grub_create_loader_cmdline()
1421 Without this fix, building xen_boot.c omits:
1422
1423 loader/arm64/xen_boot.c: In function ‘xen_boot_binary_load’:
1424 loader/arm64/xen_boot.c:370:7: error: too few arguments to function ‘grub_create_loader_cmdline’
1425 grub_create_loader_cmdline (argc - 1, argv + 1, binary->cmdline,
1426 ^~~~~~~~~~~~~~~~~~~~~~~~~~
1427 In file included from loader/arm64/xen_boot.c:36:0:
1428 ../include/grub/lib/cmdline.h:29:12: note: declared here
1429 grub_err_t grub_create_loader_cmdline (int argc, char *argv[], char *buf,
1430
1431 Reviewed-by: Julien Grall <julien.grall@arm.com>
1432 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1433
1434 2018-11-16 Leif Lindholm <leif.lindholm@linaro.org>
1435
1436 arm-uboot, ia64, sparc64: Fix up grub_file_open() calls
1437 The verifiers framework changed the grub_file_open() interface, breaking all
1438 non-x86 linux loaders. Add file types to the grub_file_open() calls to make
1439 them build again.
1440
1441 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1442
1443 2018-11-16 Leif Lindholm <leif.lindholm@linaro.org>
1444
1445 arm64/efi: Fix breakage caused by verifiers
1446 - add variable "err" (used but not defined),
1447 - add GRUB_FILE_TYPE_LINUX_KERNEL to grub_file_open() call.
1448
1449 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1450
1451 2018-11-16 Leif Lindholm <leif.lindholm@linaro.org>
1452
1453 grub-core/loader/efi/fdt.c: Fixup grub_file_open() call
1454 The verifiers framework changed the API of grub_file_open(), but did not
1455 fix up all users. Add the file type GRUB_FILE_TYPE_DEVICE_TREE_IMAGE
1456 to the "devicetree" command handler call.
1457
1458 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1459
1460 2018-11-16 Leif Lindholm <leif.lindholm@linaro.org>
1461
1462 include/grub/file.h: Add device tree file type
1463 The API change of grub_file_open() for adding verifiers did not include
1464 a type for device tree blobs. Add GRUB_FILE_TYPE_DEVICE_TREE_IMAGE to
1465 the grub_file_type enum.
1466
1467 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1468
1469 2018-11-16 Leif Lindholm <leif.lindholm@linaro.org>
1470
1471 include/grub/verify.h: Add include guard
1472 verify.h was added without include guards. This means compiling anything
1473 including both include/grub/verify.h and include/grub/lib/cmdline.h fails
1474 (at least grub-core/loader/arm64/linux.c.
1475
1476 Add the necessary include guard.
1477
1478 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1479
1480 2018-11-16 Matthew Daley <mattd@bugfuzz.com>
1481
1482 mkimage: Pad DTBs to target-specific pointer size
1483 Device tree (DTB) lengths are being padded to a multiple of 4 bytes
1484 rather than the target-specific pointer size. This causes objects
1485 following OBJ_TYPE_DTB objects to be incorrectly parsed during GRUB
1486 execution on arm64.
1487
1488 Fix by using ALIGN_ADDR(), not ALIGN_UP().
1489
1490 Signed-by-off: Matthew Daley <mattd@bugfuzz.com>
1491 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1492
1493 2018-11-09 Colin Watson <cjwatson@ubuntu.com>
1494
1495 Cope with / being on a ZFS root dataset
1496 If / is on the root dataset in a ZFS pool, then ${bootfs} will be set to
1497 "/" (whereas if it is on a non-root dataset, there will be no trailing
1498 slash). Passing "root=ZFS=${rpool}/" will fail to boot, but
1499 "root=ZFS=${rpool}" works fine, so strip the trailing slash.
1500
1501 Fixes: https://savannah.gnu.org/bugs/?52746
1502
1503 Tested-by: Fejes József <jozsef.fejes@gmail.com>
1504 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1505
1506 2018-11-09 Paul Menzel <pmenzel@molgen.mpg.de>
1507
1508 unix/platform: Initialize variable to fix grub-install on UEFI system
1509 On a UEFI system, were no boot entry *grub* is present, currently,
1510 `grub-install` fails with an error.
1511
1512 $ efibootmgr
1513 BootCurrent: 0000
1514 Timeout: 0 seconds
1515 BootOrder: 0001,0006,0003,0004,0005
1516 Boot0001 Diskette Drive
1517 Boot0003* USB Storage Device
1518 Boot0004* CD/DVD/CD-RW Drive
1519 Boot0005 Onboard NIC
1520 Boot0006* WDC WD2500AAKX-75U6AA0
1521 $ sudo grub-install /dev/sda
1522 Installing for x86_64-efi platform.
1523 grub-install: error: efibootmgr failed to register the boot entry: Unknown error 22020.
1524
1525 The error code is always different, and the error message (incorrectly)
1526 points to efibootmgr.
1527
1528 But, the error is in GRUB’s function
1529 `grub_install_remove_efi_entries_by_distributor()`, where the variable
1530 `rc` for the return value, is uninitialized and never set, when no boot
1531 entry for the distributor is found.
1532
1533 The content of that uninitialized variable is then returned as the error
1534 code of efibootmgr.
1535
1536 Set the variable to 0, so that success is returned, when no entry needs
1537 to be deleted.
1538
1539 Tested on Dell OptiPlex 7010 with firmware A28.
1540
1541 $ sudo ./grub-install /dev/sda
1542 Installing for x86_64-efi platform.
1543 Installation finished. No error reported.
1544
1545 [1]: https://github.com/rhboot/efibootmgr/issues/100
1546
1547 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1548
1549 2018-11-09 Daniel Kiper <daniel.kiper@oracle.com>
1550
1551 efi: Add EFI shim lock verifier
1552 This module provides shim lock verification for various kernels
1553 if UEFI secure boot is enabled on a machine.
1554
1555 It is recommended to put this module into GRUB2 standalone image
1556 (avoid putting iorw and memrw modules into it; they are disallowed
1557 if UEFI secure boot is enabled). However, it is also possible to use
1558 it as a normal module. Though such configurations are more fragile
1559 and less secure due to various limitations.
1560
1561 If the module is loaded and UEFI secure boot is enabled then:
1562 - module itself cannot be unloaded (persistent module),
1563 - the iorw and memrw modules cannot be loaded,
1564 - if the iorw and memrw modules are loaded then
1565 machine boot is disabled,
1566 - GRUB2 defers modules and ACPI tables verification to
1567 other verifiers.
1568
1569 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
1570
1571 2018-11-09 Daniel Kiper <daniel.kiper@oracle.com>
1572
1573 dl: Add support for persistent modules
1574 This type of modules cannot be unloaded. This is useful if a given
1575 functionality, e.g. UEFI secure boot shim signature verification, should
1576 not be disabled if it was enabled at some point in time. Somebody may
1577 say that we can use standalone GRUB2 here. That is true. However, the
1578 code is not so big nor complicated hence it make sense to support
1579 modularized configs too.
1580
1581 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
1582
1583 2018-11-09 Vladimir Serbinenko <phcoder@gmail.com>
1584
1585 verifiers: Add the documentation
1586 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
1587
1588 2018-11-09 Daniel Kiper <daniel.kiper@oracle.com>
1589
1590 verifiers: Rename verify module to pgp module
1591 Just for clarity. No functional change.
1592
1593 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
1594
1595 2018-11-09 Daniel Kiper <daniel.kiper@oracle.com>
1596
1597 verifiers: Add possibility to defer verification to other verifiers
1598 This way if a verifier requires verification of a given file it can defer task
1599 to another verifier (another authority) if it is not able to do it itself. E.g.
1600 shim_lock verifier, posted as a subsequent patch, is able to verify only PE
1601 files. This means that it is not able to verify any of GRUB2 modules which have
1602 to be trusted on UEFI systems with secure boot enabled. So, it can defer
1603 verification to other verifier, e.g. PGP one.
1604
1605 I silently assume that other verifiers are trusted and will do good job for us.
1606 Or at least they will not do any harm.
1607
1608 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
1609
1610 2018-11-09 Vladimir Serbinenko <phcoder@gmail.com>
1611
1612 verifiers: Add possibility to verify kernel and modules command lines
1613 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
1614
1615 2018-11-09 Vladimir Serbinenko <phcoder@gmail.com>
1616
1617 verifiers: Framework core
1618 Verifiers framework provides core file verification functionality which
1619 can be used by various security mechanisms, e.g., UEFI secure boot, TPM,
1620 PGP signature verification, etc.
1621
1622 The patch contains PGP code changes and probably they should be extracted
1623 to separate patch for the sake of clarity.
1624
1625 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
1626
1627 2018-11-09 Vladimir Serbinenko <phcoder@gmail.com>
1628
1629 verifiers: File type for fine-grained signature-verification controlling
1630 Let's provide file type info to the I/O layer. This way verifiers
1631 framework and its users will be able to differentiate files and verify
1632 only required ones.
1633
1634 This is preparatory patch.
1635
1636 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
1637
1638 2018-11-09 Daniel Kiper <daniel.kiper@oracle.com>
1639
1640 bufio: Use grub_size_t instead of plain int for size
1641 Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
1642
1643 2018-10-31 Goffredo Baroncelli <kreijack@inwind.it>
1644
1645 btrfs: Add RAID 6 recovery for a btrfs filesystem
1646 Add the RAID 6 recovery, in order to use a RAID 6 filesystem even if some
1647 disks (up to two) are missing. This code use the md RAID 6 code already
1648 present in grub.
1649
1650 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1651
1652 2018-10-31 Goffredo Baroncelli <kreijack@inwind.it>
1653
1654 btrfs: Make more generic the code for RAID 6 rebuilding
1655 The original code which handles the recovery of a RAID 6 disks array
1656 assumes that all reads are multiple of 1 << GRUB_DISK_SECTOR_BITS and it
1657 assumes that all the I/O is done via the struct grub_diskfilter_segment.
1658 This is not true for the btrfs code. In order to reuse the native
1659 grub_raid6_recover() code, it is modified to not call
1660 grub_diskfilter_read_node() directly, but to call an handler passed
1661 as an argument.
1662
1663 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1664
1665 2018-10-31 Goffredo Baroncelli <kreijack@inwind.it>
1666
1667 btrfs: Add support for recovery for a RAID 5 btrfs profiles
1668 Add support for recovery for a RAID 5 btrfs profile. In addition
1669 it is added some code as preparatory work for RAID 6 recovery code.
1670
1671 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1672
1673 2018-10-31 Goffredo Baroncelli <kreijack@inwind.it>
1674
1675 btrfs: Refactor the code that read from disk
1676 Move the code in charge to read the data from disk into a separate
1677 function. This helps to separate the error handling logic (which
1678 depends on the different raid profiles) from the read from disk
1679 logic. Refactoring this code increases the general readability too.
1680
1681 This is a preparatory patch, to help the adding of the RAID 5/6 recovery code.
1682
1683 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1684
1685 2018-10-31 Goffredo Baroncelli <kreijack@inwind.it>
1686
1687 btrfs: Move logging code in grub_btrfs_read_logical()
1688 A portion of the logging code is moved outside of internal for(;;). The part
1689 that is left inside is the one which depends on the internal for(;;) index.
1690
1691 This is a preparatory patch. The next one will refactor the code inside
1692 the for(;;) into an another function.
1693
1694 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1695
1696 2018-10-31 Goffredo Baroncelli <kreijack@inwind.it>
1697
1698 btrfs: Avoid a rescan for a device which was already not found
1699 Currently read from missing device triggers rescan. However, it is never
1700 recorded that the device is missing. So, each read of a missing device
1701 triggers rescan again and again. This behavior causes a lot of unneeded
1702 rescans leading to huge slowdowns.
1703
1704 This patch fixes above mentioned issue. Information about missing devices
1705 is stored in the data->devices_attached[] array as NULL value in dev
1706 member. Rescan is triggered only if no information is found for a given
1707 device. This means that only first time read triggers rescan.
1708
1709 The patch drops premature return. This way data->devices_attached[] is
1710 filled even when a given device is missing.
1711
1712 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1713
1714 2018-10-31 Goffredo Baroncelli <kreijack@inwind.it>
1715
1716 btrfs: Move the error logging from find_device() to its caller
1717 The caller knows better if this error is fatal or not, i.e. another disk is
1718 available or not.
1719
1720 This is a preparatory patch.
1721
1722 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1723
1724 2018-10-31 Goffredo Baroncelli <kreijack@inwind.it>
1725
1726 btrfs: Add helper to check the btrfs header
1727 This helper is used in a few places to help the debugging. As
1728 conservative approach the error is only logged.
1729 This does not impact the error handling.
1730
1731 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1732
1733 2018-10-31 Goffredo Baroncelli <kreijack@inwind.it>
1734
1735 btrfs: Add support for reading a filesystem with a RAID 5 or RAID 6 profile
1736 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1737
1738 2018-09-27 Michael Chang <mchang@suse.com>
1739
1740 msdos: Fix overflow in converting partition start and length into 512B blocks
1741 When booting from NVME SSD with 4k sector size, it fails with the message.
1742
1743 error: attempt to read or write outside of partition.
1744
1745 This patch fixes the problem by fixing overflow in converting partition start
1746 and length into 512B blocks.
1747
1748 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1749
1750 2018-09-27 Mihai Moldovan <ionic@ionic.de>
1751
1752 osdep/linux: Convert partition start to disk sector length
1753 When reading data off a disk, sector values are based on the disk sector
1754 length.
1755
1756 Within grub_util_fd_open_device(), the start of the partition was taken
1757 directly from grub's partition information structure, which uses the
1758 internal sector length (currently 512b), but never transformed to the
1759 disk's sector length.
1760
1761 Subsequent calculations were all wrong for devices that have a diverging
1762 sector length and the functions eventually skipped to the wrong stream
1763 location, reading invalid data.
1764
1765 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1766
1767 2018-09-27 Adam Williamson <awilliam@redhat.com>
1768
1769 python: Use AM_PATH_PYTHON to determine interpreter for gentpl.py
1770 gentpl.py is python2/3-agnostic, but there's no way to cause it
1771 to be run with any interpreter other than 'python', it's just
1772 hard-coded into Makefile.common that way. Adjust that to use
1773 AM_PATH_PYTHON (provided by automake) to find an interpreter
1774 and run gentpl.py with that instead. This makes grub buildable
1775 when `python` does not exist (but rather `python3` or `python2`
1776 or `python2.7`, etc.) Minimum version is set to 2.6 as this is
1777 the first version with `__future__.print_function` available.
1778
1779 Note, AM_PATH_PYTHON respects the PYTHON environment variable
1780 and will treat its value as the *only* candidate for a valid
1781 interpreter if it is set - when PYTHON is set, AM_PATH_PYTHON
1782 will not try to find any alternative interpreter, it will only
1783 check whether the interpreter set as the value of PYTHON meets
1784 the requirements and use it if so or fail if not. This means
1785 that when using grub's `autogen.sh`, as it too uses the value
1786 of the PYTHON environment variable (and if it is not set, just
1787 sets it to 'python') you cannot rely on AM_PATH_PYTHON
1788 interpreter discovery. If your desired Python interpreter is
1789 not just 'python', you must set the PYTHON environment variable,
1790 e.g. 'PYTHON=/usr/local/bin/python3 ./autogen.sh'. The specified
1791 interpreter will then be used both by autogen.sh itself and by
1792 the autotools-driven build scripts.
1793
1794 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1795
1796 2018-09-27 Colin Watson <cjwatson@ubuntu.com>
1797
1798 build: Use pkg-config to find FreeType
1799 pkg-config is apparently preferred over freetype-config these days (see
1800 the BUGS section of freetype-config(1)). pkg-config support was added
1801 to FreeType in version 2.1.5, which was released in 2003, so it should
1802 comfortably be available everywhere by now.
1803
1804 We no longer need to explicitly substitute FREETYPE_CFLAGS and
1805 FREETYPE_LIBS, since PKG_CHECK_MODULES does that automatically.
1806
1807 Fixes Debian bug #887721.
1808
1809 Reported-by: Hugh McMaster <hugh.mcmaster@outlook.com>
1810 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1811
1812 2018-09-27 Colin Watson <cjwatson@ubuntu.com>
1813
1814 build: Capitalise *freetype_* variables
1815 Using FREETYPE_CFLAGS and FREETYPE_LIBS is more in line with the naming
1816 scheme used by pkg-config macros.
1817
1818 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1819
1820 2018-09-13 Julian Andres Klode <julian.klode@canonical.com>
1821
1822 ofnet: Initialize structs in bootpath parser
1823 Code later on checks if variables inside the struct are
1824 0 to see if they have been set, like if there were addresses
1825 in the bootpath.
1826
1827 The variables were not initialized however, so the check
1828 might succeed with uninitialized data, and a new interface
1829 with random addresses and the same name is added. This causes
1830 $net_default_mac to point to the random one, so, for example,
1831 using that variable to load per-mac config files fails.
1832
1833 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1785859
1834
1835 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1836
1837 2018-09-13 dann frazier <dann.frazier@canonical.com>
1838
1839 grub-reboot: Warn when "for the next boot only" promise cannot be kept
1840 The "for the next boot only" property of grub-reboot is dependent upon
1841 GRUB being able to clear the next_entry variable in the environment
1842 block. However, GRUB cannot write to devices using the diskfilter
1843 and lvm abstractions.
1844
1845 Ref: https://lists.gnu.org/archive/html/grub-devel/2009-12/msg00276.html
1846 Ref: https://bugs.launchpad.net/bugs/788298
1847
1848 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1849
1850 2018-09-13 Cao jin <caoj.fnst@cn.fujitsu.com>
1851
1852 relocator16: Comments update
1853 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1854
1855 2018-09-13 Paul Menzel <pmenzel@molgen.mpg.de>
1856
1857 ahci: Increase time-out from 10 s to 32 s
1858 This is a cryptographically signed message in MIME format.
1859
1860 Date: Thu, 9 Aug 2018 07:27:35 +0200
1861
1862 Currently, the GRUB payload for coreboot does not detect the Western
1863 Digital hard disk WDC WD20EARS-60M AB51 connected to the ASRock E350M1,
1864 as that takes over ten seconds to spin up.
1865
1866 ```
1867 disk/ahci.c:533: port 0, err: 0
1868 disk/ahci.c:539: port 0, err: 0
1869 disk/ahci.c:543: port 0, err: 0
1870 disk/ahci.c:549: port 0, offset: 120, tfd:80, CMD: 6016
1871 disk/ahci.c:552: port 0, err: 0
1872 disk/ahci.c:563: port 0, offset: 120, tfd:80, CMD: 6016
1873 disk/ahci.c:566: port: 0, err: 0
1874 disk/ahci.c:593: port 0 is busy
1875 disk/ahci.c:621: cleaning up failed devs
1876 ```
1877
1878 GRUB detects the drive, when either unloading the module *ahci*, and
1879 then loading it again, or when doing a warm reset.
1880
1881 As the ten second time-out is too short, increase it to 32 seconds,
1882 used by SeaBIOS. which detects the drive successfully.
1883
1884 The AHCI driver in libpayload uses 30 seconds, and that time-out was
1885 added in commit 354066e1 (libpayload: ahci: Increase timeout for
1886 signature reading) with the description below.
1887
1888 > We can't read the drives signature before it's ready, i.e. spun up.
1889 > So set the timeout to the standard 30s. Also put a notice on the
1890 > console, so the user knows why the signature reading failed.
1891
1892 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1893
1894 2018-09-13 Cao jin <caoj.fnst@cn.fujitsu.com>
1895
1896 linux16: Code cleanup
1897 1. move relocator related code more close to each other
1898 2. use variable "len" since it has correct assignment, and keep coding
1899 style with upper code
1900
1901 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1902
1903 2018-09-13 Colin Watson <cjwatson@ubuntu.com>
1904
1905 tests: Fix qemu options for UHCI test
1906 qemu 2.12 removed the -usbdevice option. Use a more modern spelling
1907 instead, in line with other USB-related tests.
1908
1909 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1910
1911 2018-09-13 Colin Watson <cjwatson@ubuntu.com>
1912
1913 tests: Disable sercon in SeaBIOS
1914 SeaBIOS 1.11.0 added support for VGA emulation over a serial port, which
1915 interferes with grub-shell. Turn it off.
1916
1917 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1918
1919 2018-09-12 Peter Jones <pjones@redhat.com>
1920
1921 grub-module-verifier: Report the filename or modname in errors
1922 Make it so that when grub-module-verifier complains of an issue, it tells you
1923 which module the issue was with.
1924
1925 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1926
1927 2018-09-12 Peter Jones <pjones@redhat.com>
1928
1929 configure: Fix an 8 year old typo
1930 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1931
1932 2018-09-12 Leif Lindholm <leif.lindholm@linaro.org>
1933
1934 loader/multiboot_mbi2: Use central copy of grub_efi_find_mmap_size()
1935 Delete local copy of function to determine required buffer size for the
1936 UEFI memory map, use helper in kern/efi/mm.c.
1937
1938 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1939
1940 2018-09-12 Leif Lindholm <leif.lindholm@linaro.org>
1941
1942 loader/ia64/linux: Use central copy of grub_efi_find_mmap_size()
1943 Delete local copy of function to determine required buffer size for the
1944 UEFI memory map, use helper in kern/efi/mm.c.
1945
1946 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1947
1948 2018-09-12 Leif Lindholm <leif.lindholm@linaro.org>
1949
1950 loader/i386/linux: Use central copy of grub_efi_find_mmap_size()
1951 Delete local copy of function to determine required buffer size for the
1952 UEFI memory map, use helper in kern/efi/mm.c.
1953
1954 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1955
1956 2018-07-25 Leif Lindholm <leif.lindholm@linaro.org>
1957
1958 i386: Don't include lib/i386/reset.c in EFI builds
1959 Commit 0ba90a7f0178 ("efi: Move grub_reboot() into kernel") broke
1960 the build on i386-efi - genmoddep.awk bails out with message
1961 grub_reboot in reboot is duplicated in kernel
1962 This is because both lib/i386/reset.c and kern/efi/efi.c now provide
1963 this function.
1964
1965 Rather than explicitly list each i386 platform variant in
1966 Makefile.core.def, include the contents of lib/i386/reset.c only when
1967 GRUB_MACHINE_EFI is not set.
1968
1969 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1970
1971 2018-07-25 Leif Lindholm <leif.lindholm@linaro.org>
1972
1973 efi: Restrict arm/arm64 linux loader initrd placement
1974 The 32-bit arm Linux kernel is built as a zImage, which self-decompresses
1975 down to near start of RAM. In order for an initrd/initramfs to be
1976 accessible, it needs to be placed within the first ~768MB of RAM.
1977 The initrd loader built into the kernel EFI stub restricts this down to
1978 512MB for simplicity - so enable the same restriction in grub.
1979
1980 For arm64, the requirement is within a 1GB aligned 32GB window also
1981 covering the (runtime) kernel image. Since the EFI stub loader itself
1982 will attempt to relocate to near start of RAM, force initrd to be loaded
1983 completely within the first 32GB of RAM.
1984
1985 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1986
1987 2018-07-25 Leif Lindholm <leif.lindholm@linaro.org>
1988
1989 arm: Delete unused efi support from loader/arm
1990 The 32-bit arm efi port now shares the 64-bit linux loader, so delete
1991 the now unused bits from the 32-bit linux loader.
1992
1993 This in turn leaves the grub-core/kern/arm/efi/misc.c unused, so
1994 delete that too.
1995
1996 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
1997
1998 2018-07-25 Leif Lindholm <leif.lindholm@linaro.org>
1999
2000 arm/efi: Switch to arm64 linux loader
2001 The arm64 and arm linux kernel EFI-stub support presents pretty much
2002 identical interfaces, so the same linux loader source can be used for
2003 both architectures.
2004
2005 Switch 32-bit ARM UEFI platforms over to the existing EFI-stub aware
2006 loader initially developed for arm64.
2007
2008 This *WILL* stop non-efistub Linux kernels from booting on arm-efi.
2009
2010 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2011
2012 2018-07-25 Leif Lindholm <leif.lindholm@linaro.org>
2013
2014 arm64/linux/loader: Rename functions and macros and move to common headers
2015 In preparation for using the linux loader for 32-bit and 64-bit platforms,
2016 rename grub_arm64*/GRUB_ARM64* to grub_armxx*/GRUB_ARMXX*.
2017
2018 Move prototypes for now-common functions to efi/efi.h.
2019
2020 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2021
2022 2018-07-25 Leif Lindholm <leif.lindholm@linaro.org>
2023
2024 efi: Add grub_efi_get_ram_base() function for arm64
2025 Since ARM platforms do not have a common memory map, add a helper
2026 function that finds the lowest address region with the EFI_MEMORY_WB
2027 attribute set in the UEFI memory map.
2028
2029 Required for the arm64 efi linux loader to restrict the initrd
2030 location to where it will be accessible by the kernel at runtime.
2031
2032 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2033
2034 2018-07-25 Leif Lindholm <leif.lindholm@linaro.org>
2035
2036 efi: Add central copy of grub_efi_find_mmap_size
2037 There are several implementations of this function in the tree.
2038 Add a central version in grub-core/efi/mm.c.
2039
2040 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2041
2042 2018-07-25 Arindam Nath <arindam.nath@amd.com>
2043
2044 i386/linux: Add support for ext_lfb_base
2045 The EFI Graphics Output Protocol can return a 64-bit
2046 linear frame buffer address in some firmware/BIOS
2047 implementations. We currently only store the lower
2048 32-bits in the lfb_base. This will eventually be
2049 passed to Linux kernel and the efifb driver will
2050 incorrectly interpret the framebuffer address as
2051 32-bit address.
2052
2053 The Linux kernel has already added support to handle
2054 64-bit linear framebuffer address in the efifb driver
2055 since quite some time now.
2056
2057 This patch adds the support for 64-bit linear frame
2058 buffer address in GRUB to address the above mentioned
2059 scenario.
2060
2061 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2062
2063 2018-07-11 Leif Lindholm <leif.lindholm@linaro.org>
2064
2065 commands/file: Use definitions from arm64/linux.h
2066 Clean up code for matching IS_ARM64 slightly by making use of struct
2067 linux_arm64_kernel_header and GRUB_LINUX_ARM64_MAGIC_SIGNATURE.
2068
2069 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2070
2071 2018-07-11 Leif Lindholm <leif.lindholm@linaro.org>
2072
2073 commands/file: Use definitions from arm/linux.h
2074 Clean up code for matching IS_ARM slightly by making use of struct
2075 linux_arm_kernel_header and GRUB_LINUX_ARM_MAGIC_SIGNATURE.
2076
2077 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2078
2079 2018-07-11 Hans de Goede <hdegoede@redhat.com>
2080
2081 efi/console: Fix the "enter" key not working on x86 tablets
2082 Most 8" or 7" x86 Windows 10 tablets come with volume up/down buttons and
2083 a power-button. In their UEFI these are almost always mapped to arrow
2084 up/down and enter.
2085
2086 Pressing the volume buttons (sometimes by accident) will stop the
2087 menu countdown, but the power-button / "enter" key was not being recognized
2088 as enter, so the user would be stuck at the grub menu.
2089
2090 The problem is that these tablets send scan_code 13 or 0x0d for the
2091 power-button, which officialy maps to the F3 key. They also set
2092 unicode_char to 0x0d.
2093
2094 This commit recognizes the special case of both scan_code and unicode_char
2095 being set to 0x0d and treats this as an enter key press.
2096
2097 This fixes things getting stuck at the grub-menu and allows the user
2098 to choice a grub-menu entry using the buttons on the tablet.
2099
2100 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2101
2102 2018-07-11 Cao jin <caoj.fnst@cn.fujitsu.com>
2103
2104 grub-setup: Debug message cleanup
2105 Variable "root" is initialized after root device probing and is null in
2106 current place, so, drop it.
2107
2108 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2109
2110 2018-07-02 Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
2111
2112 multiboot_elfxx.c: Fix compilation by fixing undeclared variable
2113 Without that fix we have:
2114 In file included from ../../include/grub/command.h:25:0,
2115 from ../../grub-core/loader/multiboot.c:30:
2116 ../../grub-core/loader/multiboot_elfxx.c: In function 'grub_multiboot_load_elf64':
2117 ../../grub-core/loader/multiboot_elfxx.c:130:28: error: 'relocatable' undeclared (first use in this function)
2118 "load_base_addr=0x%x\n", relocatable,
2119
2120 This happens due to mistake in the commit 14ec665
2121 (mbi: Use per segment a separate relocator chunk).
2122
2123 So, let's fix it.
2124
2125 2018-06-23 Leif Lindholm <leif.lindholm@linaro.org>
2126
2127 efi/fdt: Set address/size cells to 2 for empty tree
2128 When booting an arm* system on UEFI with an empty device tree (currently
2129 only when hardware description comes from ACPI), we don't currently set
2130 default to 1 cell (32 bits).
2131
2132 Set both of these properties, to 2 cells (64 bits), to resolve issues
2133 with kexec on some platforms.
2134
2135 This change corresponds with linux kernel commit ae8a442dfdc4
2136 ("efi/libstub/arm*: Set default address and size cells values for an empty dtb")
2137 and ensures booting through grub does not behave differently from booting
2138 the stub loader directly.
2139
2140 See also https://patchwork.kernel.org/patch/9561201/
2141
2142 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2143
2144 2018-06-23 Leif Lindholm <leif.lindholm@linaro.org>
2145
2146 fdt: Move prop_entry_size to fdt.h
2147 To be able to resuse the prop_entry_size macro, move it to
2148 <grub/fdt.h> and rename it grub_fdt_prop_entry_size.
2149
2150 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2151
2152 2018-06-23 Will Thompson <wjt@endlessm.com>
2153
2154 grub-fs-tester: Fix losetup race
2155 If something else on the system is using loopback devices, then the
2156 device that's free at the call to `losetup -f` may not be free in the
2157 following call to try to use it. Instead, find and use the first free
2158 loopback device in a single call to losetup.
2159
2160 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2161
2162 2018-06-23 Alexander Boettcher <alexander.boettcher@genode-labs.com>
2163
2164 mbi: Use per segment a separate relocator chunk
2165 Instead of setting up a all comprising relocator chunk for all segments,
2166 use per segment a separate relocator chunk.
2167
2168 Currently, if the ELF is non-relocatable, a single relocator chunk will
2169 comprise memory (between the segments) which gets overridden by the relst()
2170 invocation of the movers code in grub_relocator16/32/64_boot().
2171
2172 The overridden memory may contain reserved ranges like VGA memory or ACPI
2173 tables, which may lead to crashes or at least to strange boot behaviour.
2174
2175 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2176
2177 2018-06-05 Daniel Kiper <daniel.kiper@oracle.com>
2178
2179 templates: Add missing "]"
2180 Commit 51be337 (templates: Update grub script template files)
2181 lacked one "]", so, add it.
2182
2183 Reported-by: Philip <philm@manjaro.org>
2184
2185 2018-05-29 Daniel Kiper <daniel.kiper@oracle.com>
2186
2187 xfs: Accept filesystem with sparse inodes
2188 The sparse inode metadata format became a mkfs.xfs default in
2189 xfsprogs-4.16.0, and such filesystems are now rejected by grub as
2190 containing an incompatible feature.
2191
2192 In essence, this feature allows xfs to allocate inodes into fragmented
2193 freespace. (Without this feature, if xfs could not allocate contiguous
2194 space for 64 new inodes, inode creation would fail.)
2195
2196 In practice, the disk format change is restricted to the inode btree,
2197 which as far as I can tell is not used by grub. If all you're doing
2198 today is parsing a directory, reading an inode number, and converting
2199 that inode number to a disk location, then ignoring this feature
2200 should be fine, so I've added it to XFS_SB_FEAT_INCOMPAT_SUPPORTED
2201
2202 I did some brief testing of this patch by hacking up the regression
2203 tests to completely fragment freespace on the test xfs filesystem, and
2204 then write a large-ish number of inodes to consume any existing
2205 contiguous 64-inode chunk. This way any files the grub tests add and
2206 traverse would be in such a fragmented inode allocation. Tests passed,
2207 but I'm not sure how to cleanly integrate that into the test harness.
2208
2209 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2210 Tested-by: Chris Murphy <lists@colorremedies.com>
2211
2212 2018-05-29 Oleg Solovyov <mcpain@altlinux.org>
2213
2214 grub-probe: Don't skip /dev/mapper/dm-* devices
2215 This patch ensures that grub-probe will find the root device placed in
2216 /dev/mapper/dm-[0-9]+-.* e.g. device named /dev/mapper/dm-0-luks will be
2217 found and grub.cfg will be updated properly, enabling the system to boot.
2218
2219 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2220
2221 2018-05-08 Michael Chang <mchang@suse.com>
2222
2223 bufio: Round up block size to power of 2
2224 Rounding up the bufio->block_size to meet power of 2 to facilitate next_buf
2225 calculation in grub_bufio_read().
2226
2227 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2228
2229 2018-04-23 Nicholas Vinson <nvinson234@gmail.com>
2230
2231 templates: Update grub script template files
2232 Update grub-mkconfig.in and 10_linux.in to support grub-probe's new
2233 partuuid target. Update grub.texi documentation. The following table
2234 shows how GRUB_DISABLE_LINUX_UUID, GRUB_DISABLE_LINUX_PARTUUID, and
2235 initramfs detection interact:
2236
2237 Initramfs GRUB_DISABLE_LINUX_PARTUUID GRUB_DISABLE_LINUX_UUID Linux Root
2238 detected Set Set ID Method
2239
2240 false false false part UUID
2241 false false true part UUID
2242 false true false dev name
2243 false true true dev name
2244 true false false fs UUID
2245 true false true part UUID
2246 true true false fs UUID
2247 true true true dev name
2248
2249 Note: GRUB_DISABLE_LINUX_PARTUUID and GRUB_DISABLE_LINUX_UUID equate to
2250 'false' when unset or set to any value other than 'true'.
2251 GRUB_DISABLE_LINUX_PARTUUID defaults to 'true'.
2252
2253 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2254
2255 2018-04-23 Nicholas Vinson <nvinson234@gmail.com>
2256
2257 grub-probe: Add PARTUUID detection support
2258 Add PARTUUID detection support grub-probe for MBR and GPT partition schemes.
2259
2260 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2261
2262 2018-04-23 Nicholas Vinson <nvinson234@gmail.com>
2263
2264 disk: Update grub_gpt_partentry
2265 Rename grub_gpt_part_type to grub_gpt_part_guid and update grub_gpt_partentry
2266 to use this type for both the partition type GUID string and the partition GUID
2267 string entries. This change ensures that the two GUID fields are handled more
2268 consistently and helps to simplify the changes needed to add Linux partition
2269 GUID support.
2270
2271 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2272
2273 2018-04-23 Nicholas Vinson <nvinson234@gmail.com>
2274
2275 grub-probe: Centralize GUID prints
2276 Define print_gpt_guid(), so there is a central function for printing
2277 GUID strings. This change is a precursor for later patches which rely
2278 on this logic.
2279
2280 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2281
2282 2018-04-23 Olaf Hering <olaf@aepfle.de>
2283
2284 grub-install: Locale depends on nls
2285 With --disable-nls no locales exist.
2286
2287 Avoid runtime error by moving code that copies locales into its own
2288 function. Return early in case nls was disabled. That way the compiler
2289 will throw away unreachable code, no need to put preprocessor
2290 conditionals everywhere to avoid warnings about unused code.
2291
2292 Fix memleak by freeing srcf and dstf.
2293 Convert tabs to spaces in moved code.
2294
2295 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2296
2297 2018-04-23 Cao jin <caoj.fnst@cn.fujitsu.com>
2298
2299 diskboot: Trivial correction on stale comments
2300 diskboot.img now is loaded at 0x8000 and is jumped to with 0:0x8000.
2301
2302 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2303
2304 2018-04-10 Jaegeuk Kim <jaegeuk@kernel.org>
2305
2306 fs: Add F2FS support
2307 "F2FS (Flash-Friendly File System) is flash-friendly file system which was merged
2308 into Linux kernel v3.8 in 2013.
2309
2310 The motive for F2FS was to build a file system that from the start, takes into
2311 account the characteristics of NAND flash memory-based storage devices (such as
2312 solid-state disks, eMMC, and SD cards).
2313
2314 F2FS was designed on a basis of a log-structured file system approach, which
2315 remedies some known issues of the older log structured file systems, such as
2316 the snowball effect of wandering trees and high cleaning overhead. In addition,
2317 since a NAND-based storage device shows different characteristics according to
2318 its internal geometry or flash memory management scheme (such as the Flash
2319 Translation Layer or FTL), it supports various parameters not only for
2320 configuring on-disk layout, but also for selecting allocation and cleaning
2321 algorithm.", quote by https://en.wikipedia.org/wiki/F2FS.
2322
2323 The source codes for F2FS are available from:
2324
2325 http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs.git
2326 http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git
2327
2328 This patch has been integrated in OpenMandriva Lx 3.
2329 https://www.openmandriva.org/
2330
2331 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2332
2333 2018-04-04 Michael Chang <mchang@suse.com>
2334
2335 Fix packed-not-aligned error on GCC 8
2336 When building with GCC 8, there are several errors regarding packed-not-aligned.
2337
2338 ./include/grub/gpt_partition.h:79:1: error: alignment 1 of ‘struct grub_gpt_partentry’ is less than 8 [-Werror=packed-not-aligned]
2339
2340 This patch fixes the build error by cleaning up the ambiguity of placing
2341 aligned structure in a packed one. In "struct grub_btrfs_time" and "struct
2342 grub_gpt_part_type", the aligned attribute seems to be superfluous, and also
2343 has to be packed, to ensure the structure is bit-to-bit mapped to the format
2344 laid on disk. I think we could blame to copy and paste error here for the
2345 mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as
2346 the name suggests. :)
2347
2348 Tested-by: Michael Chang <mchang@suse.com>
2349 Tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
2350 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2351
2352 2018-04-04 mike.travis@hpe.com <mike.travis@hpe.com>
2353
2354 efi/uga: Fix PCIe LER when GRUB2 accesses non-enabled MMIO data from VGA
2355 A GPU inserted into a PCIe I/O slot disappears during system startup.
2356 The problem centers around GRUB and a specific VGA init function in
2357 efi_uga.c. This causes an LER (Link Error Recorvery) because the MMIO
2358 memory has not been enabled before attempting access.
2359
2360 The fix is to add the same coding used in other VGA drivers, specifically
2361 to add a check to insure that it is indeed a VGA controller. And then
2362 enable the MMIO address space with the specific bits.
2363
2364 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2365
2366 2018-03-26 Eric Snowberg <eric.snowberg@oracle.com>
2367
2368 ieee1275: NULL pointer dereference in grub_machine_get_bootlocation()
2369 Read from NULL pointer canon in function grub_machine_get_bootlocation().
2370 Function grub_ieee1275_canonicalise_devname() may return NULL.
2371
2372 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2373
2374 2018-03-14 Eric Snowberg <eric.snowberg@oracle.com>
2375
2376 ieee1275: split up grub_machine_get_bootlocation
2377 Split up some of the functionality in grub_machine_get_bootlocation into
2378 grub_ieee1275_get_boot_dev. This will allow for code reuse in a follow on
2379 patch.
2380
2381 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2382
2383 2018-03-14 C. Masloch <pushbx@38.de>
2384
2385 chainloader: patch in BPB's sectors_per_track and num_heads
2386 These fields must reflect the ROM-BIOS's geometry for CHS-based
2387 loaders to correctly load their next stage. Most loaders do not
2388 query the ROM-BIOS (Int13.08), relying on the BPB fields to hold
2389 the correct values already.
2390
2391 Tested with lDebug booted in qemu via grub2's
2392 FreeDOS direct loading support, refer to
2393 https://bitbucket.org/ecm/ldosboot + https://bitbucket.org/ecm/ldebug
2394 (For this test, lDebug's iniload.asm must be assembled with
2395 -D_QUERY_GEOMETRY=0 to leave the BPB values provided by grub.)
2396
2397 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2398
2399 2018-03-14 Matthew S. Turnbull <sparky@bluefang-logic.com>
2400
2401 grub-mkconfig/10_linux: Support multiple early initrd images
2402 Add support for multiple, shared, early initrd images. These early
2403 images will be loaded in the order declared, and all will be loaded
2404 before the initrd image.
2405
2406 While many classes of data can be provided by early images, the
2407 immediate use case would be for distributions to provide CPU
2408 microcode to mitigate the Meltdown and Spectre vulnerabilities.
2409
2410 There are two environment variables provided for declaring the early
2411 images.
2412
2413 * GRUB_EARLY_INITRD_LINUX_STOCK is for the distribution declare
2414 images that are provided by the distribution or installed packages.
2415 If undeclared, this will default to a set of common microcode image
2416 names.
2417
2418 * GRUB_EARLY_INITRD_LINUX_CUSTOM is for user created images. User
2419 images will be loaded after the stock images.
2420
2421 These separate configurations allow the distribution and user to
2422 declare different image sets without clobbering each other.
2423
2424 This also makes a minor update to ensure that UUID partition labels
2425 stay disabled when no initrd image is found, even if early images are
2426 present.
2427
2428 This is a continuation of a previous patch published by Christian
2429 Hesse in 2016:
2430 http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00025.html
2431
2432 Down stream Gentoo bug:
2433 https://bugs.gentoo.org/645088
2434
2435 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2436
2437 2018-03-07 Eric Snowberg <eric.snowberg@oracle.com>
2438
2439 mkimage: fix build regression in grub_mkimage_load_image
2440 The grub_mkimage_load_image function (commit 7542af6, mkimage: refactor a bunch
2441 of section data into a struct.) introduces a build regression on SPARC:
2442
2443 cc1: warnings being treated as errors
2444 In file included from util/grub-mkimage32.c:23:
2445 util/grub-mkimagexx.c: In function 'grub_mkimage_load_image32':
2446 util/grub-mkimagexx.c:1968: error: missing initializer
2447 util/grub-mkimagexx.c:1968: error: (near initialization for 'smd.sections')
2448 make[2]: *** [util/grub_mkimage-grub-mkimage32.o] Error 1
2449
2450 Initialize the entire section_metadata structure.
2451
2452 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2453
2454 2018-03-05 dann frazier <dann.frazier@canonical.com>
2455
2456 Revert "Keep the native terminal active when enabling gfxterm"
2457 This can cause an issue where GRUB is trying to display both a text and
2458 graphical menu on the display at the same time, resulting in a flickering
2459 effect when e.g. scrolling quickly through a menu (LP: #1752767).
2460
2461 Revert for now while we look for a better solution for the original issue.
2462
2463 This reverts commit 52ef7b23f528ce844716661d586497a177e80d5b.
2464
2465 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2466
2467 2018-03-05 Eric Snowberg <eric.snowberg@oracle.com>
2468
2469 sparc64: #blocks64 disk node method
2470 Return the 64bit number of blocks of storage associated with the device or
2471 instance. Where a "block" is a unit of storage consisting of the number of
2472 bytes returned by the package's "block-size" method. If the size cannot be
2473 determined, or if the number of blocks exceeds the range return -1.
2474
2475 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2476
2477 2018-03-05 Eric Snowberg <eric.snowberg@oracle.com>
2478
2479 sparc64: #blocks disk node method
2480 Return the number of blocks of storage associated with the device or
2481 instance. Where a "block" is a unit of storage consisting of the number
2482 of bytes returned by the package's "block-size" method. If the size cannot
2483 be determined, the #blocks method returns the maximum unsigned integer
2484 (which, because of Open Firmware's assumption of two's complement arithmetic,
2485 is equivalent to the signed number -1). If the number of blocks exceeds
2486 the range of an unsigned number, return 0 to alert the caller to try
2487 the #blocks64 command.
2488
2489 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2490
2491 2018-03-05 Eric Snowberg <eric.snowberg@oracle.com>
2492
2493 ieee1275: block-size deblocker support method
2494 IEEE Std 1275-1994 Standard for Boot (Initialization Configuration)
2495 Firmware: Core Requirements and Practices
2496
2497 3.8.3 deblocker support package
2498
2499 Any package that uses the "deblocker" support package must define
2500 the following method, which the deblocker uses as a low-level
2501 interface to the device
2502
2503 block-size ( -- block-len ) Return "granularity" for accesses to this
2504 device.
2505
2506 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2507
2508 2018-03-05 Daniel Kiper <daniel.kiper@oracle.com>
2509
2510 ieee1275: no-data-command bus specific method
2511 IEEE 1275-1994 Standard for Boot (Initialization Configuration)
2512 Firmware: Core Requirements and Practices
2513
2514 E.3.2.2 Bus-specific methods for bus nodes
2515
2516 A package implementing the scsi-2 device type shall implement the
2517 following bus-specific method:
2518
2519 no-data-command ( cmd-addr -- error? )
2520 Executes a simple SCSI command, automatically retrying under
2521 certain conditions. cmd-addr is the address of a 6-byte command buffer
2522 containing an SCSI command that does not have a data transfer phase.
2523 Executes the command, retrying indefinitely with the same retry criteria
2524 as retry-command.
2525
2526 error? is nonzero if an error occurred, zero otherwise.
2527 NOTE no-data-command is a convenience function. It provides
2528 no capabilities that are not present in retry-command, but for
2529 those commands that meet its restrictions, it is easier to use.
2530
2531 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2532
2533 2018-03-05 Eric Snowberg <eric.snowberg@oracle.com>
2534
2535 ieee1275: set-address bus specific method
2536 IEEE 1275-1994 Standard for Boot (Initialization Configuration)
2537 Firmware: Core Requirements and Practices
2538 E.3.2.2 Bus-specific methods for bus nodes
2539
2540 A package implementing the scsi-2 device type shall implement the
2541 following bus-specific method:
2542
2543 set-address ( unit# target# -- )
2544 Sets the SCSI target number (0x0..0xf) and unit number (0..7) to which
2545 subsequent commands apply.
2546
2547 This function is for devices with #address-cells == 2
2548
2549 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2550
2551 2018-03-05 Eric Snowberg <eric.snowberg@oracle.com>
2552
2553 ieee1275: encode-unit command for 4 addr cell devs
2554 Convert physical address to text unit-string.
2555
2556 Convert phys.lo ... phys-high, the numerical representation, to unit-string,
2557 the text string representation of a physical address within the address
2558 space defined by this device node. The number of cells in the list
2559 phys.lo ... phys.hi is determined by the value of the #address-cells property
2560 of this node.
2561
2562 This function is for devices with #address-cells == 4
2563
2564 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2565
2566 2018-03-05 Eric Snowberg <eric.snowberg@oracle.com>
2567
2568 ieee1275: decode-unit command for 4 addr cell devs
2569 decode-unit ( addr len -- phys.lo ... phys.hi )
2570
2571 Convert text unit-string to physical address.
2572
2573 Convert unit-string, the text string representation, to phys.lo ... phys.hi,
2574 the numerical representation of a physical address within the address space
2575 defined by this device node. The number of cells in the list
2576 phys.lo ... phys.hi is determined by the value of the #address-cells
2577 property of this node.
2578
2579 This function is for devices with #address-cells == 4
2580
2581 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2582
2583 2018-03-05 Eric Snowberg <eric.snowberg@oracle.com>
2584
2585 sparc64: Limit nvme of_path_of_nvme to just SPARC
2586 Limit NVMe of_path_of_nvme to just SPARC hardware for now. It has been
2587 found that non-Open Firmware hardware platforms can some how access
2588 this function.
2589
2590 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2591
2592 2018-03-05 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
2593
2594 ieee1275: Fix crash in of_path_of_nvme when of_path is empty
2595 The of_path_of_nvme function (commit 2391d57, ieee1275: add nvme
2596 support within ofpath) introduced a functional regression:
2597
2598 On systems which are not based on Open Firmware but have at
2599 least one NVME device, find_obppath will return NULL and thus
2600 trying to append the disk name to of_path will result in a
2601 crash.
2602
2603 The proper behavior of of_path_of_nvme is, however, to just
2604 return NULL in such cases, like other users of find_obppath,
2605 such as of_path_of_scsi.
2606
2607 Reviewed-by: Eric Snowberg <eric.snowberg@oracle.com>
2608 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2609
2610 2018-03-05 Peter Jones <pjones@redhat.com>
2611
2612 .mod files: Strip annobin annotations and .eh_frame, and their relocations
2613 This way debuginfo built from the .module will still include this
2614 information, but the final result won't have the data we don't actually
2615 need in the modules, either on-disk, loaded at runtime, or in prebuilt
2616 images.
2617
2618 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2619
2620 2018-03-05 Peter Jones <pjones@redhat.com>
2621
2622 mkimage: avoid copying relocations for sections that won't be copied.
2623 Some versions of gcc include a plugin called "annobin", and in some
2624 build systems this is enabled by default. This plugin creates special
2625 ELF note sections to track which ABI-breaking features are used by a
2626 binary, as well as a series of relocations to annotate where.
2627
2628 If grub is compiled with this feature, then when grub-mkimage translates
2629 the binary to another file format which does not strongly associate
2630 relocation data with sections (i.e. when platform is *-efi), these
2631 relocations appear to be against the .text section rather than the
2632 original note section. When the binary is loaded by the PE runtime
2633 loader, hilarity ensues.
2634
2635 This issue is not necessarily limited to the annobin, but could arise
2636 any time there are relocations in sections that are not represented in
2637 grub-mkimage's output.
2638
2639 This patch seeks to avoid this issue by only including relocations that
2640 refer to sections which will be included in the final binary.
2641
2642 As an aside, this should also obviate the need to avoid -funwind-tables,
2643 -fasynchronous-unwind-tables, and any sections similar to .eh_frame in
2644 the future. I've tested it on x86-64-efi with the following gcc command
2645 line options (as recorded by -grecord-gcc-flags), but I still need to
2646 test the result on some other platforms that have been problematic in
2647 the past (especially ARM Aarch64) before I feel comfortable making
2648 changes to the configure.ac bits:
2649
2650 GNU C11 7.2.1 20180116 (Red Hat 7.2.1-7) -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -msoft-float -mno-stack-arg-probe -mcmodel=large -mno-red-zone -m64 -mtune=generic -march=x86-64 -g3 -Os -freg-struct-return -fno-stack-protector -ffreestanding -funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing -fstack-clash-protection -fno-ident -fplugin=annobin
2651
2652 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2653
2654 2018-03-05 Peter Jones <pjones@redhat.com>
2655
2656 mkimage: refactor a bunch of section data into a struct.
2657 This basically moves a bunch of the section information we pass around a
2658 lot into a struct, and passes a pointer to a single one of those
2659 instead.
2660
2661 This shouldn't change the binary file output or the "grub-mkimage -v"
2662 output in any way.
2663
2664 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2665
2666 2018-03-05 Peter Jones <pjones@redhat.com>
2667
2668 mkimage: make locate_sections() set up vaddresses as well.
2669 This puts both kinds of address initialization at the same place, and also lets
2670 us iterate through the section list one time fewer.
2671
2672 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2673
2674 2018-03-05 Peter Jones <pjones@redhat.com>
2675
2676 mkimage: rename a couple of things to be less confusing later.
2677 This renames some things:
2678
2679 - the "strtab" and "strtab_section" in relocate_symbols are changed to "symtab"
2680 instead, so as to be less confusing when "strtab" is moved to a struct in a
2681 later patch.
2682
2683 - The places where we pass section_vaddresses to functions are changed to also
2684 be called section_vaddresses"inside those functions, so I get less confused
2685 when I put addresses and vaddresses in a struct in a later patch.
2686
2687 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2688
2689 2018-03-05 Peter Jones <pjones@redhat.com>
2690
2691 mkimage: make it easier to run syntax checkers on grub-mkimagexx.c
2692 This makes it so you can treat grub-mkimagexx.c as a file you can build
2693 directly, so syntax checkers like vim's "syntastic" plugin, which uses
2694 "gcc -x c -fsyntax-only" to build it, will work.
2695
2696 One still has to do whatever setup is required to make it pick the right
2697 include dirs, which -W options we use, etc., but this makes it so you
2698 can do the checking on the file you're editing, rather than on a
2699 different file.
2700
2701 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2702
2703 2018-03-05 Peter Jones <pjones@redhat.com>
2704
2705 aout.h: Fix missing include.
2706 grub_aout_load() has a grub_file_t parameter, and depending on what order
2707 includes land in, it's sometimes not defined. This patch explicitly adds
2708 file.h to aout.h so that it will always be defined.
2709
2710 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2711
2712 2018-02-26 Joakim Bech <joakim.bech@linaro.org>
2713
2714 ieee1275: fix build regression in of_path_of_nvme
2715 The of_path_of_nvme function (commit 2391d57, ieee1275: add nvme
2716 support within ofpath) introduced a build regression:
2717 grub-core/osdep/linux/ofpath.c:365:21: error: comparison between pointer
2718 and zero character constant [-Werror=pointer-compare]
2719 if ((digit_string != '\0') && (*part_end == 'p'))
2720
2721 Update digit_string to compare against the char instead of the pointer.
2722
2723 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2724
2725 2018-02-23 Leif Lindholm <leif.lindholm@linaro.org>
2726
2727 arm: make linux.h safe to include for non-native builds
2728 <grub/machine/loader.h> (for machine arm/efi) and
2729 <grub/machine/kernel.h> (for machine arm/coreboot) will not always
2730 resolve (and will likely not be valid to) if pulled in when building
2731 non-native commands, such as host tools or the "file" command.
2732 So explicitly include them with their expanded pathnames.
2733
2734 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2735
2736 2018-02-23 Leif Lindholm <leif.lindholm@linaro.org>
2737
2738 arm: switch linux loader to linux_arm_kernel_header struct
2739 Use kernel header struct and magic definition to align (and coexist) with
2740 i386/arm64 ports.
2741
2742 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2743
2744 2018-02-23 Leif Lindholm <leif.lindholm@linaro.org>
2745
2746 arm64: align linux kernel magic macro naming with i386
2747 Change GRUB_ARM64_LINUX_MAGIC to GRUB_LINUX_ARM64_MAGIC_SIGNATURE.
2748
2749 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2750
2751 2018-02-23 Leif Lindholm <leif.lindholm@linaro.org>
2752
2753 arm64: align linux kernel header struct naming with i386
2754 Rename struct grub_arm64_linux_kernel_header -> linux_arm64_kernel_header.
2755
2756 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2757
2758 2018-02-23 Leif Lindholm <leif.lindholm@linaro.org>
2759
2760 i386: make struct linux_kernel_header architecture specific
2761 struct linux_kernel_header -> struct linux_i386_kernel_header
2762
2763 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2764
2765 2018-02-23 Leif Lindholm <leif.lindholm@linaro.org>
2766
2767 make GRUB_LINUX_MAGIC_SIGNATURE architecture-specific
2768 Rename GRUB_LINUX_MAGIC_SIGNATURE GRUB_LINUX_I386_MAGIC_SIGNATURE,
2769 to be usable in code that supports more than one image type.
2770
2771 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2772
2773 2018-02-23 Leif Lindholm <leif.lindholm@linaro.org>
2774
2775 Make arch-specific linux.h include guards architecture unique
2776 Replace uses of GRUB_LINUX_MACHINE_HEADER and GRUB_LINUX_CPU_HEADER
2777 with GRUB_<arch>_LINUX_HEADER include guards to prevent issues when
2778 including more than one of them.
2779
2780 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2781
2782 2018-02-23 Leif Lindholm <leif.lindholm@linaro.org>
2783
2784 arm64/efi: move EFI_PAGE definitions to efi/memory.h
2785 The EFI page definitions and macros are generic and should not be confined
2786 to arm64 headers - so move to efi/memory.h.
2787 Also add EFI_PAGE_SIZE macro.
2788
2789 Update loader sources to reflect new header location.
2790
2791 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2792
2793 2018-02-23 Colin Watson <cjwatson@ubuntu.com>
2794
2795 libgcrypt: Import replacement CRC operations
2796 The CRC implementation imported from libgcrypt 1.5.3 is arguably
2797 non-free, due to being encumbered by the restrictive Internet Society
2798 licence on RFCs (see e.g. https://wiki.debian.org/NonFreeIETFDocuments).
2799 Fortunately, libgcrypt has since replaced it with a version that is both
2800 reportedly better-optimised and doesn't suffer from this encumbrance.
2801
2802 The ideal solution would be to update to a new version of libgcrypt, and
2803 I spent some time trying to do that. However, util/import_gcry.py
2804 requires complex modifications to cope with the new version, and I
2805 stalled part-way through; furthermore, GRUB's libgcrypt tree already
2806 contains some backports of upstream changes. Rather than allowing the
2807 perfect to be the enemy of the good, I think it's best to backport this
2808 single change to at least sort out the licensing situation. Doing so
2809 won't make things any harder for a future wholesale upgrade.
2810
2811 This commit is mostly a straightforward backport of
2812 https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=06e122baa3321483a47bbf82fd2a4540becfa0c9,
2813 but I also imported bufhelp.h from libgcrypt 1.7.0 (newer versions
2814 required further changes elsewhere).
2815
2816 I've tested that "hashsum -h crc32" still produces correct output for a
2817 variety of files on both i386-pc and x86_64-emu targets.
2818
2819 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2820
2821 2018-02-23 Eric Snowberg <eric.snowberg@oracle.com>
2822
2823 ieee1275: add nvme support within ofpath
2824 Add NVMe support within ofpath.
2825
2826 The Open Firmware text representation for a NVMe device contains the
2827 Namespace ID. An invalid namespace ID is one whose value is zero or whose
2828 value is greater than the value reported by the Number of Namespaces (NN)
2829 field in the Identify Controller data structure. At the moment only a
2830 single Namespace is supported, therefore the value is currently hard coded
2831 to one.
2832
2833 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2834
2835 2018-02-23 Daniel Kiper <daniel.kiper@oracle.com>
2836
2837 chainloader: Fix wrong break condition (must be AND not, OR)
2838 The definition of bpb's num_total_sectors_16 and num_total_sectors_32
2839 is that either the 16-bit field is non-zero and is used (in which case
2840 eg mkfs.fat sets the 32-bit field to zero), or it is zero and the
2841 32-bit field is used. Therefore, a BPB is invalid only if *both*
2842 fields are zero; having one field as zero and the other as non-zero is
2843 the case to be expected. (Indeed, according to Microsoft's specification
2844 one of the fields *must* be zero, and the other non-zero.)
2845
2846 This affects all users of grub_chainloader_patch_bpb which are in
2847 chainloader.c, freedos.c, and ntldr.c
2848
2849 Some descriptions of the semantics of these two fields:
2850
2851 https://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html
2852
2853 The old 2-byte fields "total number of sectors" and "number of
2854 sectors per FAT" are now zero; this information is now found in
2855 the new 4-byte fields.
2856
2857 (Here given in the FAT32 EBPB section but the total sectors 16/32 bit
2858 fields semantic is true of FAT12 and FAT16 too.)
2859
2860 https://wiki.osdev.org/FAT#BPB_.28BIOS_Parameter_Block.29
2861
2862 19 | 2 | The total sectors in the logical volume. If this value is 0,
2863 it means there are more than 65535 sectors in the volume, and the actual
2864 count is stored in "Large Sectors (bytes 32-35).
2865
2866 32 | 4 | Large amount of sector on media. This field is set if there
2867 are more than 65535 sectors in the volume.
2868
2869 (Doesn't specify what the "large" field is set to when unused, but as
2870 mentioned mkfs.fat sets it to zero then.)
2871
2872 https://technet.microsoft.com/en-us/library/cc976796.aspx
2873
2874 0x13 | WORD | 0x0000 |
2875 Small Sectors . The number of sectors on the volume represented in 16
2876 bits (< 65,536). For volumes larger than 65,536 sectors, this field
2877 has a value of zero and the Large Sectors field is used instead.
2878
2879 0x20 | DWORD | 0x01F03E00 |
2880 Large Sectors . If the value of the Small Sectors field is zero, this
2881 field contains the total number of sectors in the FAT16 volume. If the
2882 value of the Small Sectors field is not zero, the value of this field
2883 is zero.
2884
2885 https://staff.washington.edu/dittrich/misc/fatgen103.pdf page 10
2886
2887 BPB_TotSec16 | 19 | 2 |
2888 This field is the old 16-bit total count of sectors on the volume.
2889 This count includes the count of all sectors in all four regions of the
2890 volume. This field can be 0; if it is 0, then BPB_TotSec32 must be
2891 non-zero. For FAT32 volumes, this field must be 0. For FAT12 and
2892 FAT16 volumes, this field contains the sector count, and
2893 BPB_TotSec32 is 0 if the total sector count “fits” (is less than
2894 0x10000).
2895
2896 BPB_TotSec32 | 32 | 4 |
2897 This field is the new 32-bit total count of sectors on the volume.
2898 This count includes the count of all sectors in all four regions of the
2899 volume. This field can be 0; if it is 0, then BPB_TotSec16 must be
2900 non-zero. For FAT32 volumes, this field must be non-zero. For
2901 FAT12/FAT16 volumes, this field contains the sector count if
2902 BPB_TotSec16 is 0 (count is greater than or equal to 0x10000).
2903
2904 (This specifies that an unused BPB_TotSec32 field is set to zero.)
2905
2906 By the way fix offsets in include/grub/fat.h.
2907
2908 Tested with lDebug booted in qemu via grub2's
2909 FreeDOS direct loading support, refer to
2910 https://bitbucket.org/ecm/ldosboot + https://bitbucket.org/ecm/ldebug
2911
2912 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2913
2914 2018-02-23 H.J. Lu <hjl.tools@gmail.com>
2915
2916 x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32
2917 Starting from binutils commit bd7ab16b4537788ad53521c45469a1bdae84ad4a:
2918
2919 https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bd7ab16b4537788ad53521c45469a1bdae84ad4a
2920
2921 x86-64 assembler generates R_X86_64_PLT32, instead of R_X86_64_PC32, for
2922 32-bit PC-relative branches. Grub2 should treat R_X86_64_PLT32 as
2923 R_X86_64_PC32.
2924
2925 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2926
2927 2018-02-14 Steve McIntyre <steve@einval.com>
2928
2929 Make grub-install check for errors from efibootmgr
2930 Code is currently ignoring errors from efibootmgr, giving users
2931 clearly bogus output like:
2932
2933 Setting up grub-efi-amd64 (2.02~beta3-4) ...
2934 Installing for x86_64-efi platform.
2935 Could not delete variable: No space left on device
2936 Could not prepare Boot variable: No space left on device
2937 Installation finished. No error reported.
2938
2939 and then potentially unbootable systems. If efibootmgr fails, grub-install
2940 should know that and report it!
2941
2942 We've been using similar patch in Debian now for some time, with no ill effects.
2943
2944 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2945
2946 2018-02-14 Eric Snowberg <eric.snowberg@oracle.com>
2947
2948 sparc64: fix OF path names for sun4v systems
2949 Fix the Open Firmware (OF) path property for sun4v SPARC systems.
2950 These platforms do not have a /sas/ within their path. Over time
2951 different OF addressing schemes have been supported. There
2952 is no generic addressing scheme that works across every HBA.
2953
2954 It looks that this functionality will not work if you try to cross-install
2955 SPARC GRUB2 binary using e.g. x86 grub-install. By default it should work.
2956 However, we will also have other issues here, like lack of access to OF
2957 firmware/paths, which make such configs unusable anyway. So, let's leave
2958 this patch as is for time being. If somebody cares then he/she should fix
2959 the issue(s) at some point.
2960
2961 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2962
2963 2018-02-14 Eric Snowberg <eric.snowberg@oracle.com>
2964
2965 sparc64: Add blocklist GPT support for SPARC
2966 Add block-list GPT support for SPARC. The OBP "load" and "boot" methods
2967 are partition aware and neither command can see the partition table. Also
2968 neither command can address the entire physical disk. When the install
2969 happens, grub generates the block-list entries based on the beginning of the
2970 physical disk, not the beginning of the partition. This patch fixes the
2971 block-list entries so they match what OBP expects during boot for a GPT disk.
2972
2973 T5 and above now supports GPT as well as VTOC.
2974
2975 This patch has been tested on T5-2 and newer SPARC systems.
2976
2977 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2978
2979 2018-01-29 Stefan Fritsch <fritsch@genua.de>
2980
2981 ahci: Improve error handling
2982 Check the error bits in the interrupt status register. According to the
2983 AHCI 1.2 spec, "Interrupt sources that are disabled (‘0’) are still
2984 reflected in the status registers.", so this should work even though
2985 grub uses polling
2986
2987 This fixes the following problem on a Fujitsu E744 laptop:
2988
2989 Sometimes there is a very long delay (up to several minutes) when
2990 booting from hard disk. It seems accessing the DVD drive (which has no
2991 disk inserted) sometimes fails with some errors, which leads to each
2992 access being stalled until the 20s timeout triggers. This seems to
2993 happen when grub is trying to read filesystem/partition data.
2994
2995 The problem is that the command_issue bit that is checked in the loop is
2996 only reset if the "HBA receives a FIS which clears the BSY, DRQ, and ERR
2997 bits for the command", but the ERR bit is never cleared. Therefore
2998 command_issue is never reset and grub waits for the timeout.
2999
3000 The relevant bit in our case is the Task File Error Status (TFES), which
3001 is equivalent to the ERR bit 0 in tfd. But this patch also checks
3002 the other error bits except for the "Interface non-fatal error status"
3003 bit.
3004
3005 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3006
3007 2018-01-29 dann frazier <dann.frazier@canonical.com>
3008
3009 Keep the native terminal active when enabling gfxterm
3010 grub-mkconfig will set GRUB_TERMINAL_OUTPUT to "gfxterm" unless the user
3011 has overridden it. On EFI systems, this will stop output from going to the
3012 default "console" terminal. When the EFI fw console is configured to output to
3013 both serial and video, this will cause GRUB to only display on video - while
3014 continuing to accept input from both video and serial.
3015
3016 Instead of switching from "console" to "gfxterm", let's output to both.
3017
3018 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3019
3020 2017-12-06 Julien Grall <julien.grall@linaro.org>
3021
3022 arm64/xen: Add missing #address-cells and #size-cells properties
3023 The properties #address-cells and #size-cells are used to know the
3024 number of cells for ranges provided by "regs". If they don't exist, the
3025 value are resp. 2 and 1.
3026
3027 Currently, when multiboot nodes are created it is assumed that #address-cells
3028 and #size-cells are exactly 2. However, they are never set by GRUB and
3029 will result to later failure when the device-tree is generated by GRUB
3030 or contain different values.
3031
3032 To prevent this failure, create the both properties in the chosen nodes.
3033
3034 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3035
3036 2017-12-06 Jordan Glover <Golden_Miller83@protonmail.ch>
3037
3038 grub-mkconfig: Fix detecting .sig files as system images
3039 grub-mkconfig detects detached RSA signatures for kernel images used for
3040 signature checking as valid images and adds them to grub.cfg as separate
3041 menu entries. This patch adds .sig extension to common blacklist.
3042
3043 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3044
3045 2017-12-06 Eric Snowberg <eric.snowberg@oracle.com>
3046
3047 ieee1275: Fix segfault in grub-ofpathname
3048 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3049
3050 2017-11-28 Eric Snowberg <eric.snowberg@oracle.com>
3051
3052 grub-install: Fix memory leak
3053 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3054
3055 2017-11-24 Eric Snowberg <eric.snowberg@oracle.com>
3056
3057 ls: prevent double open
3058 Prevent a double open. This can cause problems with some ieee1275
3059 devices, causing the system to hang. The double open can occur
3060 as follows:
3061
3062 grub_ls_list_files (char *dirname, int longlist, int all, int human)
3063 dev = grub_device_open (device_name);
3064 dev remains open while:
3065 grub_normal_print_device_info (device_name);
3066 dev = grub_device_open (name);
3067
3068 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3069
3070 2017-10-06 David E. Box <david.e.box@linux.intel.com>
3071
3072 tsc: Change default tsc calibration method to pmtimer on EFI systems
3073 On efi systems, make pmtimer based tsc calibration the default over the
3074 pit. This prevents Grub from hanging on Intel SoC systems that power gate
3075 the pit.
3076
3077 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3078
3079 2017-09-07 Alexander Graf <agraf@suse.de>
3080
3081 efi: Free malloc regions on exit
3082 When we exit grub, we don't free all the memory that we allocated earlier
3083 for our heap region. This can cause problems with setups where you try
3084 to descend the boot order using "exit" entries, such as PXE -> HD boot
3085 scenarios.
3086
3087 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3088
3089 2017-09-07 Alexander Graf <agraf@suse.de>
3090
3091 efi: Move grub_reboot() into kernel
3092 The reboot function calls machine_fini() and then reboots the system.
3093 Currently it lives in lib/ which means it gets compiled into the
3094 reboot module which lives on the heap.
3095
3096 In a following patch, I want to free the heap on machine_fini()
3097 though, so we would free the memory that the code is running in. That
3098 obviously breaks with smarter UEFI implementations.
3099
3100 So this patch moves it into the core. That way we ensure that all
3101 code running after machine_fini() in the UEFI case is running from
3102 memory that got allocated (and gets deallocated) by the UEFI core.
3103
3104 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3105
3106 2017-09-07 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
3107
3108 Use grub-file to figure out whether multiboot2 should be used for Xen.gz
3109 The multiboot2 is much more preferable than multiboot. Especiall
3110 if booting under EFI where multiboot does not have the functionality
3111 to pass ImageHandler.
3112
3113 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3114
3115 2017-09-07 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
3116
3117 Fix util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
3118 Commit d33045ce7ffcb7c1e4a60c14d5ca64b36e3c5abe introduced
3119 the support for this, but it does not work under x86 (as it stops
3120 20_linux_xen from running).
3121
3122 The 20_linux_xen is run under a shell and any exits from within it:
3123
3124 (For example on x86):
3125 + /usr/bin/grub2-file --is-arm64-efi /boot/xen-4.9.0.gz
3126 [root@tst063 grub]# echo $?
3127 1
3128
3129 will result in 20_linux_xen exiting without continuing
3130 and also causing grub2-mkconfig to stop processing.
3131
3132 As in:
3133
3134 [root@tst063 grub]# ./grub-mkconfig | tail
3135 Generating grub configuration file ...
3136 Found linux image: /boot/vmlinuz-4.13.0-0.rc5.git1.1.fc27.x86_64
3137 Found initrd image: /boot/initramfs-4.13.0-0.rc5.git1.1.fc27.x86_64.img
3138 Found linux image: /boot/vmlinuz-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2
3139 Found initrd image: /boot/initramfs-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2.img
3140 echo 'Loading Linux 0-rescue-ec082ee24aea41b9b16aca52a6d10cc2 ...'
3141 linux /vmlinuz-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2 root=/dev/mapper/fedora_tst063-root ro single
3142 echo 'Loading initial ramdisk ...'
3143 initrd /initramfs-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2.img
3144 }
3145 }
3146
3147 ### END /usr/local/etc/grub.d/10_linux ###
3148
3149 ### BEGIN /usr/local/etc/grub.d/20_linux_xen ###
3150
3151 root@tst063 grub]#
3152
3153 And no more.
3154
3155 This patch wraps the invocation of grub-file to be a in subshell
3156 and to process the return value in a conditional. That fixes
3157 the issue.
3158
3159 RH-BZ 1486002: grub2-mkconfig does not work if xen.gz is installed.
3160
3161 CC: Fu Wei <fu.wei@linaro.org>
3162 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3163
3164 2017-09-07 Vladimir Serbinenko <phcoder@gmail.com>
3165
3166 Fix compilation for x86_64-efi.
3167
3168 2017-09-05 Vladimir Serbinenko <phcoder@gmail.com>
3169
3170 Add a file missing in multiboot2 commit.
3171
3172 2017-08-30 Vladimir Serbinenko <phcoder@google.com>
3173
3174 gzio: fix unaligned access
3175
3176 grub-fs-tester: Fix bashism
3177
3178 2017-08-30 Vladimir Serbinenko <phcoder@gmail.com>
3179
3180 Regenerate checksum.h with newer unifont.
3181 Old link is broken. New unifont is
3182 http://ftp.de.debian.org/debian/pool/main/u/unifont/xfonts-unifont_9.0.06-2_all.deb
3183
3184 printf_unit_test: Disable Wformat-truncation on GCC >= 7
3185 We intentionally pass NULL as argument to format, hence disable the warning.
3186
3187 qemu, coreboot, multiboot: Change linking address to 0x9000.
3188 It's common for distros to use a defective ld which links at 0x9000. Instead
3189 of fighting it, just move link target to 0x9000.
3190
3191 2017-08-30 Stefan Fritsch <sf@sfritsch.de>
3192
3193 Implement checksum verification for gunzip
3194 This implements the crc32 check for the gzip format. Support for zlib's
3195 adler checksum is not included, yet.
3196
3197 2017-08-30 Vladimir Serbinenko <phcoder@gmail.com>
3198
3199 xfs: Don't attempt to iterate over empty directory.
3200 Reported by: Tuomas Tynkkynen
3201
3202 2017-08-30 Patrick Steinhardt <ps@pks.im>
3203
3204 unix exec: avoid atexit handlers when child exits
3205 The `grub_util_exec_redirect_all` helper function can be used to
3206 spawn an executable and redirect its output to some files. After calling
3207 `fork()`, the parent will wait for the child to terminate with
3208 `waitpid()` while the child prepares its file descriptors, environment
3209 and finally calls `execvp()`. If something in the children's setup
3210 fails, it will stop by calling `exit(127)`.
3211
3212 Calling `exit()` will cause any function registered via `atexit()` to be
3213 executed, which is usually the wrong thing to do in a child. And
3214 actually, one can easily observe faulty behaviour on musl-based systems
3215 without modprobe(8) installed: executing `grub-install --help` will call
3216 `grub_util_exec_redirect_all` with "modprobe", which obviously fails if
3217 modprobe(8) is not installed. Due to the child now exiting and invoking
3218 the `atexit()` handlers, it will clean up some data structures of the
3219 parent and cause it to be deadlocked in the `waitpid()` syscall.
3220
3221 The issue can easily be fixed by calling `_exit(127)` instead, which is
3222 especially designed to be called when the atexit-handlers should not be
3223 executed.
3224
3225 2017-08-30 Vladimir Serbinenko <phcoder@gmail.com>
3226
3227 arc: Do not create spurious variable grub_arc_memory_type_t.
3228
3229 2017-08-14 Xuan Guo <nbdd0121>
3230
3231 Set have_exec to y on cygwin so we have grub_mkrescue.
3232
3233 2017-08-14 Vladimir Serbinenko <phcoder@gmail.com>
3234
3235 enforcing fixup
3236
3237 multiboot fixup
3238
3239 linux fixup
3240
3241 yylex: Explicilty cast fprintf to void.
3242 It's needed to avoid warning on recent GCC.
3243
3244 genmoddep: Check that no modules provide the same symbol.
3245 The semantics of 2 modules providing the same symbol are undefined. So
3246 ensure that it doesn't happen.
3247
3248 Fix symbols appearing in several modules in linux*.
3249 If same symbol is provided by 2 modules its semantics are undefined.
3250 Avoid this by depending rather than double-including files.
3251
3252 2017-08-14 Vladimir Serbinenko <phcoder@gmail.com>
3253
3254 multiboot: disentangle multiboot and multiboot2.
3255 Previously we had multiboot and multiboot2 declaring the same symbols.
3256 This can potentially lead to aliasing and strange behaviours when e.g.
3257 module instead of module2 is used with multiboot2.
3258
3259 Bug: #51137
3260
3261 2017-08-14 Vladimir Serbinenko <phcoder@gmail.com>
3262
3263 hdparm: Depend on hexdump rather than having a second copy of hexdump.
3264
3265 grub.texi: Fix typo
3266 Reported by: Ori Avtalion <saltyhorse>
3267
3268 2017-08-07 Pete Batard <pete@akeo.ie>
3269
3270 io: add a GRUB_GZ prefix to gzio specific defines
3271 * This is done to avoid a conflict with a PACKED define in the EDK2
3272
3273 core: use GRUB_TERM_ definitions when handling term characters
3274 * Also use hex value for GRUB_TERM_ESC as '\e' is not in the C standard and is not understood by some compilers
3275
3276 2017-08-07 Leif Lindholm <leif.lindholm@linaro.org>
3277
3278 efi: change heap allocation type to GRUB_EFI_LOADER_CODE
3279 With upcoming changes to EDK2, allocations of type EFI_LOADER_DATA may
3280 not return regions with execute ability. Since modules are loaded onto
3281 the heap, change the heap allocation type to GRUB_EFI_LOADER_CODE in
3282 order to permit execution on systems with this feature enabled.
3283
3284 Closes: 50420
3285
3286 2017-08-07 Leif Lindholm <leif.lindholm@linaro.org>
3287
3288 arm64 linux loader: improve type portability
3289 In preparation for turning this into a common loader for 32-bit and 64-bit
3290 platforms, ensure the code will compile cleanly for either.
3291
3292 2017-08-07 Leif Lindholm <leif.lindholm@linaro.org>
3293
3294 efi: Add GRUB_PE32_MAGIC definition
3295 Add a generic GRUB_PE32_MAGIC definition for the PE 'MZ' tag and delete
3296 the existing one in arm64/linux.h.
3297
3298 Update arm64 Linux loader to use this new definition.
3299
3300 2017-08-07 Leif Lindholm <leif.lindholm@linaro.org>
3301
3302 efi: move fdt helper library
3303 There is nothing ARM64 (or even ARM) specific about the efi fdt helper
3304 library, which is used for locating or overriding a firmware-provided
3305 devicetree in a UEFI system - so move it to loader/efi for reuse.
3306
3307 Move the fdtload.h include file to grub/efi and update path to
3308 efi/fdtload.h in source code referring to it.
3309
3310 2017-08-07 Vladimir Serbinenko <phcoder@gmail.com>
3311
3312 Remove grub_efi_allocate_pages.
3313 grub_efi_allocate_pages Essentially does 2 unrelated things:
3314 * Allocate at fixed address.
3315 * Allocate at any address.
3316
3317 To switch between 2 different functions it uses address == 0 as magic
3318 value which is wrong as 0 is a perfectly valid fixed adress to allocate at.
3319
3320 2017-08-07 Leif Lindholm <leif.lindholm@linaro.org>
3321
3322 efi: refactor grub_efi_allocate_pages
3323 Expose a new function, grub_efi_allocate_pages_real(), making it possible
3324 to specify allocation type and memory type as supported by the UEFI
3325 AllocatePages boot service.
3326
3327 Make grub_efi_allocate_pages() a consumer of the new function,
3328 maintaining its old functionality.
3329
3330 Also delete some left-around #if 1/#else blocks in the affected
3331 functions.
3332
3333 2017-08-07 Vladimir Serbinenko <phcoder@gmail.com>
3334
3335 Fail if xorriso failed.
3336 If xorriso failed most likely we didn't generate a meaningful image.
3337
3338 mkrescue: Check xorriso presence before doing anything else.
3339 mkrescue can't do anything useful without xorriso, so abort early if it's
3340 not available.
3341
3342 2017-08-07 Pali Rohár <pali.rohar@gmail.com>
3343
3344 * grub-core/fs/udf.c: Add support for UUID
3345 Use same algorithm as in libblkid from util-linux v2.30.
3346
3347 1. Take first 16 bytes from UTF-8 encoded string of VolumeSetIdentifier
3348 2. If all bytes are hexadecimal digits, convert to lowercase and use as UUID
3349 3. If first 8 bytes are not all hexadecimal digits, convert those 8 bytes
3350 to their hexadecimal representation, resulting in 16 bytes for UUID
3351 4. Otherwise, compose UUID from two parts:
3352 1. part: converted first 8 bytes (which are hexadecimal digits) to lowercase
3353 2. part: encoded following 4 bytes to their hexadecimal representation (16 bytes)
3354
3355 So UUID would always have 16 hexadecimal digits in lowercase variant.
3356
3357 According to UDF specification, first 16 Unicode characters of
3358 VolumeSetIdentifier should be unique value and first 8 should be
3359 hexadecimal characters.
3360
3361 In most cases all 16 characters are hexadecimal, but e.g. MS Windows
3362 format.exe set only first 8 as hexadecimal and remaining as fixed
3363 (non-unique) which violates specification.
3364
3365 2017-08-07 Pali Rohár <pali.rohar@gmail.com>
3366
3367 udf: Fix reading label, lvd.ident is dstring
3368 UDF dstring has stored length in the last byte of buffer. Therefore last
3369 byte is not part of recorded characters. And empty string in dstring is
3370 encoded as empty buffer, including first byte (compression id).
3371
3372 2017-08-07 Pete Batard <pete@akeo.ie>
3373
3374 zfs: remove size_t typedef and use grub_size_t instead
3375 * Prevents some toolchains from issuing a warning on size_t redef.
3376
3377 2017-08-03 Rob Clark <rclark@redhat.com>
3378
3379 Fix a segfault in lsefi
3380 when protocols_per_handle returns error, we can't use the pointers we
3381 passed to it, and that includes trusting num_protocols.
3382
3383 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3384
3385 2017-07-10 Vladimir Serbinenko <phcoder@gmail.com>
3386
3387 fdt: silence clang warning.
3388
3389 2017-07-09 Vladimir Serbinenko <phcoder@gmail.com>
3390
3391 arm-efi: Fix compilation
3392
3393 2017-07-09 AppChecker <appchecker>
3394
3395 crypto: Fix use after free.
3396 Reported by: AppChecker
3397 Transformed to patch by: Satish Govindarajan
3398
3399 2017-07-09 Vladimir Serbinenko <phcoder@gmail.com>
3400
3401 ehci: Fix compilation on i386
3402
3403 2017-07-09 phcoder <phcoder@sid.debian.laptop.phnet>
3404
3405 cache: Fix compilation for ppc, sparc and arm64
3406
3407 ehci: Fix compilation for amd64
3408
3409 2017-06-29 Eric Biggers <ebiggers@google.com>
3410
3411 Allow GRUB to mount ext2/3/4 filesystems that have the encryption feature.
3412 On such a filesystem, inodes may have EXT4_ENCRYPT_FLAG set.
3413 For a regular file, this means its contents are encrypted; for a
3414 directory, this means the filenames in its directory entries are
3415 encrypted; and for a symlink, this means its target is encrypted. Since
3416 GRUB cannot decrypt encrypted contents or filenames, just issue an error
3417 if it would need to do so. This is sufficient to allow unencrypted boot
3418 files to co-exist with encrypted files elsewhere on the filesystem.
3419
3420 (Note that encrypted regular files and symlinks will not normally be
3421 encountered outside an encrypted directory; however, it's possible via
3422 hard links, so they still need to be handled.)
3423
3424 Tested by booting from an ext4 /boot partition on which I had run
3425 'tune2fs -O encrypt'. I also verified that the expected error messages
3426 are printed when trying to access encrypted directories, files, and
3427 symlinks from the GRUB command line. Also ran 'sudo ./grub-fs-tester
3428 ext4_encrypt'; note that this requires e2fsprogs v1.43+ and Linux v4.1+.
3429
3430 2017-05-29 Eric Snowberg <eric.snowberg@oracle.com>
3431
3432 sparc64: Don't use devspec to determine the OBP path
3433 Don't use devspec to determine the OBP path on SPARC hardware. Within all
3434 versions of Linux on SPARC, the devspec returns one of three values:
3435 "none", "vnet-port", or "vdisk". Unlike on PPC, none of these values
3436 are useful in determining the OBP path.
3437
3438 Before this patch grub-ofpathname always returned the wrong value
3439 for a virtual disk. For example:
3440
3441 % grub-ofpathname /dev/vdiskc2
3442 vdisk/disk@2:b
3443
3444 After this patch it now returns the correct value:
3445
3446 % grub-ofpathname /dev/vdiskc2
3447 /virtual-devices@100/channel-devices@200/disk@2:b
3448
3449 Orabug: 24459765
3450
3451 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3452
3453 2017-05-18 Fu Wei <fu.wei@linaro.org>
3454
3455 arm64: Update the introduction of Xen boot commands in docs/grub.texi
3456 delete: xen_linux, xen_initrd, xen_xsm
3457 add: xen_module
3458
3459 This update bases on
3460 commit 0edd750e50698854068358ea53528100a9192902
3461 Author: Vladimir Serbinenko <phcoder@gmail.com>
3462 Date: Fri Jan 22 10:18:47 2016 +0100
3463
3464 xen_boot: Remove obsolete module type distinctions.
3465
3466 Also bases on the module loading mechanism of Xen code:
3467 488c2a8 docs/arm64: clarify the documention for loading XSM support
3468 67831c4 docs/arm64: update the documentation for loading XSM support
3469 ca32012 xen/arm64: check XSM Magic from the second unknown module.
3470
3471 Reviewed-by: Julien Grall <julien.grall@arm.com>
3472 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3473
3474 2017-05-18 Fu Wei <fu.wei@linaro.org>
3475
3476 util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
3477 This patch adds the support of xen_boot command for aarch64:
3478 xen_hypervisor
3479 xen_module
3480 These two commands are only for aarch64, since it has its own protocol and
3481 commands to boot xen hypervisor and Dom0, but not multiboot.
3482
3483 For other architectures, they are still using multiboot and module
3484 commands.
3485
3486 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3487
3488 2017-05-18 Fu Wei <fu.wei@linaro.org>
3489
3490 arm64: Add "--nounzip" option support in xen_module command
3491 This patch adds "--nounzip" option support in order to
3492 be compatible with the module command of multiboot on other architecture,
3493 by this way we can simplify grub-mkconfig support code.
3494
3495 This patch also allow us to use zip compressed module(like Linux kernel
3496 for Dom0).
3497
3498 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3499
3500 2017-05-18 Julien Grall <julien.grall@linaro.org>
3501
3502 arm64/xen_boot: Fix Xen boot using GRUB2 on AARCH64
3503 Xen is currently crashing because of malformed compatible property for
3504 the boot module. This is because the property string is not
3505 null-terminated as requested by the ePAR spec.
3506
3507 Tested-by: Fu Wei <fu.wei@linaro.org>
3508 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3509
3510 2017-05-18 Eric Snowberg <eric.snowberg@oracle.com>
3511
3512 sparc64: Close cdboot ihandle
3513 The ihandle is left open with a cd-core image. This will cause a delay
3514 booting grub from a virtual cdrom in a LDOM. It will also cause problems
3515 as Linux boots, since it expects the ihandle to be closed during init.
3516
3517 Orabug: 25911275
3518
3519 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
3520
3521 2017-05-09 Vladimir Serbinenko <phcoder@gmail.com>
3522
3523 at_keyboard: Fix falco chromebook case.
3524 EC is slow, so we need few delays for it to toggle the bits correctly.
3525
3526 Command to enable clock and keyboard were not sent.
3527
3528 2017-05-09 Julius Werner <jwerner@chromium.org>
3529
3530 coreboot: Changed cbmemc to support updated console format from coreboot.
3531
3532 2017-05-09 Vladimir Serbinenko <phcoder@gmail.com>
3533
3534 Missing parts of previous commit
3535
3536 arm_coreboot: Add Chromebook keyboard driver.
3537
3538 rk3288_spi: Add SPI driver
3539
3540 fdtbus: Add ability to send/receive messages on parent busses.
3541
3542 Fix bug on FDT nodes with compatible property
3543
3544 2017-05-08 Vladimir Serbinenko <phcoder@gmail.com>
3545
3546 arm_coreboot: Support EHCI.
3547
3548 ehci: Split core code from PCI part.
3549 On ARM often EHCI is present without PCI and just declared in device
3550 tree. So splitcore from PCI part.
3551
3552 arm_coreboot: Support DMA.
3553 This is needed to support USB and some other busses.
3554
3555 arm_coreboot: Support loading linux images.
3556
3557 arm_coreboot: Support grub-mkstandalone.
3558
3559 arm_coreboot: Support keyboard for vexpress.
3560
3561 at_keyboard: Split protocol from controller code.
3562 On vexpress controller is different but protocol is the same, so reuse the
3563 code.
3564
3565 arm-coreboot: Export FDT routines.
3566 We need to use them from modules as well.
3567
3568 arm-coreboot: Support for vexpress timer.
3569
3570 Add support for device-tree-based drivers.
3571
3572 arm-coreboot: Start new port.
3573
3574 Rename uboot/datetime to dummy/datetime.
3575 It's just a stub and is not UBoot-specific.
3576
3577 Rename uboot/halt.c to dummy/halt.c.
3578 It's not U-Boot specific and it's a stub.
3579
3580 coreboot: Split parts that are platform-independent.
3581 We currently assume that coreboot is always i386, it's no longer the case,
3582 so split i386-coreboot parts from generic coreboot code.
3583
3584 Refactor arm-uboot code to make it genereic.
3585 arm-coreboot startup code can be very similar to arm-uboot but current code has
3586 U-Boot specific references. So split U-Boot part from generic part.
3587
3588 mkimage: Pass layout to mkimage_generate_elfXX rather than some fields.
3589 This allows easier extension of this function without having too long of
3590 arguments list.
3591
3592 2017-05-03 Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
3593
3594 Add Virtual LAN support.
3595 This patch adds support for virtual LAN (VLAN) tagging. VLAN tagging allows
3596 multiple VLANs in a bridged network to share the same physical network link
3597 but maintain isolation:
3598
3599 http://en.wikipedia.org/wiki/IEEE_802.1Q
3600
3601 * grub-core/net/ethernet.c: Add check, get, and set vlan tag id.
3602 * grub-core/net/drivers/ieee1275/ofnet.c: Get vlan tag id from bootargs.
3603 * grub-core/net/arp.c: Add check.
3604 * grub-core/net/ip.c: Likewise.
3605 * include/grub/net/arp.h: Add vlantag attribute.
3606 * include/grub/net/ip.h: Likewise.
3607
3608 2017-05-03 Vladimir Serbinenko <phcoder@gmail.com>
3609
3610 strtoull: Fix behaviour on chars between '9' and 'a'.
3611 Reported by: Aaron Miller <aaronmiller@fb.com>
3612
3613 Add strtoull test.
3614
3615 Fix shebang for termux.
3616 Termux doesn't have a /bin/sh. So we needto use $SHELL.
3617 Keep /bin/sh as much as possible.
3618
3619 Add termux path to dict.
3620
3621 po: Use @SHELL@ rather than /bin/sh.
3622 /bin/sh might not exist.
3623
3624 Use $(SHELL) rather than /bin/sh.
3625 /bin/sh doesn't exist under termux.
3626
3627 Support lseek64.
3628 Android doesn't have 64-bit off_t, so use off64_t instead.
3629
3630 Don't retrieve fstime when it's not useful.
3631
3632 support busybox date.
3633 Busybox date doesn't understand weekdays in -d input,
3634 so strip them beforehand.
3635
3636 fs-tester: make sh-compatible
3637
3638 Remove bashisms from tests.
3639 Those tests don't actually need bash. Just use common shebang.
3640
3641 Bump version to 2.03
3642
3643 2017-04-25 Vladimir Serbinenko <phcoder@gmail.com>
3644
3645 Increase version to 2.02.
3646
3647 2017-04-12 Vladimir Serbinenko <phcoder@gmail.com>
3648
3649 Fix remaining cases of gcc 7 fallthrough warning.
3650 They are all intended, so just add the relevant comment.
3651
3652 2017-04-04 Andrei Borzenkov <arvidjaar@gmail.com>
3653
3654 Add gnulib-fix-gcc7-fallthrough.diff
3655 As long as the code is not upstream, add it as explicit patch for the
3656 case of gnulib refresh.
3657
3658 2017-04-04 Andrei Borzenkov <arvidjaar@gmail.com>
3659
3660 i386, x86_64, ppc: fix switch fallthrough cases with GCC7
3661 In util/getroot and efidisk slightly modify exitsing comment to mostly
3662 retain it but still make GCC7 compliant with respect to fall through
3663 annotation.
3664
3665 In grub-core/lib/xzembed/xz_dec_lzma2.c it adds same comments as
3666 upstream.
3667
3668 In grub-core/tests/setjmp_tets.c declare functions as "noreturn" to
3669 suppress GCC7 warning.
3670
3671 In grub-core/gnulib/regexec.c use new __attribute__, because existing
3672 annotation is not recognized by GCC7 parser (which requires that comment
3673 immediately precedes case statement).
3674
3675 Otherwise add FALLTHROUGH comment.
3676
3677 Closes: 50598
3678
3679 2017-04-04 Andrei Borzenkov <arvidjaar@gmail.com>
3680
3681 btrfs: avoid "used uninitialized" error with GCC7
3682 sblock was local and so considered new variable on every loop
3683 iteration.
3684
3685 Closes: 50597
3686
3687 2017-04-02 Andrei Borzenkov <arvidjaar@gmail.com>
3688
3689 acpi: add missing efi_call wrapper to acpi command
3690 Fixed loading of ACPI tables on EFI (side effect was apparent memory
3691 corruption ranging from unpredictable behavior to system reset).
3692
3693 Reported by Nando Eva <nando4eva@ymail.com>
3694
3695 2017-03-15 Vladimir Serbinenko <phcoder@gmail.com>
3696
3697 Increment version to GRUB 2.02~rc2.
3698
3699 Use core2duo for bootcheck test on 64-bit EFI.
3700 Obviously pentium2 can't run efi64.
3701
3702 2017-03-14 Andrei Borzenkov <arvidjaar@gmail.com>
3703
3704 efi: skip iPXE block device.
3705 iPXE adds Simple File System Protocol to loaded image handle, as side
3706 effect it also adds Block IO protocol (according to comments, to work
3707 around some bugs in EDK2). GRUB assumes that every device with Block IO
3708 is disk and skips network initialization entirely. But iPXE Block IO
3709 implementation is just a stub which always fails for every operation
3710 so cannot be used. Attempt to detect and skip such devices.
3711
3712 We are using media ID which iPXE sets to "iPXE" and block IO size in
3713 hope that no real device would announce 1B block ...
3714
3715 Closes: 50518
3716
3717 2017-03-05 phcoder <phcoder@gmail.com>
3718
3719 xen: Fix wrong register in relocator.
3720 This fixes chainloading of some GRUB variants.
3721
3722 2017-02-27 Vladimir Serbinenko <phcoder@gmail.com>
3723
3724 video_fb: Fix blue collor if using unoptimized blitter.
3725 when unmapping the color what matters is the mode of source, not target.
3726
3727 legacy_initrd: Strip any additional arguments to initrd.
3728
3729 2017-02-26 Andrei Borzenkov <arvidjaar@gmail.com>
3730
3731 grub-fs-tester: improve squash4 tests
3732 1. Make sure files are not multiple of block size. This will ensure tail packing
3733 for squash4 and may also trigger more codes paths in other filesystems.
3734
3735 2. Call mksquashfs with -always-use-fragments to force tail packing.
3736
3737 2017-02-25 Andrei Borzenkov <arvidjaar@gmail.com>
3738
3739 efi: strip off final NULL from File Path in grub_efi_get_filename
3740 UEFI 2.6 9.3.6.4 File Path Media Device Path says that Path Name is
3741 "A NULL-terminated Path string including directory and file names".
3742
3743 Strip final NULL from Path Name in each File Path node when constructing
3744 full path. To be on safe side, strip all of them.
3745
3746 Fixes failure chainloading grub from grub, when loaded grub truncates
3747 image path and does not find its grub.cfg.
3748
3749 https://bugzilla.opensuse.org/show_bug.cgi?id=1026344
3750
3751 This was triggered by commit ce95549cc54b5d6f494608a7c390dba3aab4fba7;
3752 before it we built Path Name without trailing NULL, and apparently all
3753 other bootloaders use single File Path node, thus not exposing this bug.
3754
3755 2017-02-24 Andrei Borzenkov <arvidjaar@gmail.com>
3756
3757 squash4: fix handling of fragments and sparse files
3758 1. Do not assume block list and fragment are mutually exclusive. Squash
3759 can pack file tail as fragment (unless -no-fragments is specified); so
3760 check read offset and read either from block list or from fragments as
3761 appropriate.
3762
3763 2. Support sparse files with zero blocks.
3764
3765 3. Fix fragment read - frag.offset is absolute fragment position,
3766 not offset relative to ino.chunk.
3767
3768 Reported and tested by Carlo Caione <carlo@endlessm.com>
3769
3770 2017-02-22 Vladimir Serbinenko <phcoder@gmail.com>
3771
3772 Whitelist sparc64-ieee1275 as having no video modules.
3773 ieee1275_fb is not built on sparc64 due to virtual address issues.
3774
3775 2017-02-12 Andrei Borzenkov <arvidjaar@gmail.com>
3776
3777 script: fix double free in lexer
3778 yylex_destroy() already frees scanner.
3779
3780 Found by: Coverity scan.
3781 CID: 176636
3782
3783 2017-02-07 Vladimir Serbinenko <phcoder@gmail.com>
3784
3785 xen: Fix parsing of XZ kernel.
3786 In case of xz, the uncompressed size is appended to xz data which confuses
3787 our xz decompressor. Trim it.
3788
3789 2017-02-07 Vladimir Serbinenko <phcoder@gmail.com>
3790
3791 xen: Fix handling of GRUB chainloading.
3792 In case of GRUB we put remapper after domain pages and not at 0x0.
3793 In this case we use max_addr to put remapper. Unfortunately we increment
3794 max_addr as well in this case resulting in virt mapping mapping page
3795 at old max_addr and trying to boot using new max_addr.
3796
3797 Closes 46014.
3798
3799 2017-02-04 Vladimir Serbinenko <phcoder@gmail.com>
3800
3801 linguas: Don't skip ko.po.
3802 Translation project doesn't require copyright disclaimers. They're independant
3803 from us. They're responsible for their copyright story.
3804
3805 2017-02-03 Vladimir Serbinenko <phcoder@gmail.com>
3806
3807 Fix truncated checksum.h.
3808
3809 Regenerate checksums.h
3810 Screenshots contain version, so we need new checksums.
3811
3812 Release 2.02-rc1.
3813
3814 Fix mingw compilation.
3815
3816 2017-02-03 Daniel Kahn Gillmor <dkg@fifthhorseman.net>
3817
3818 documentation: Clarify documentation for special environment variable "default".
3819 The current documentation for the special environment variable
3820 "default" is confusing and unclear. This patch attempts to clean it
3821 up.
3822
3823 In particular, the current documentation refers to the "number or
3824 title", but then in the example it gives, the menu entries and
3825 submenus all have numbers *in* their title; furthermore, there is no
3826 example given about how to choose the number, or any indication about
3827 whether counting is zero-indexed or 1-indexed.
3828
3829 Having a cleaner example and presenting all variants (numeric, title,
3830 and id) should make it clearer to the user.
3831
3832 2017-02-03 Vladimir Serbinenko <phcoder@gmail.com>
3833
3834 Avoid causing kernel oops in nilfs2 test.
3835 1024-byte and 2048-byte blocks don't really work with some kernels, skip
3836 them as we don't want any oops'es.
3837
3838 btrfs: Shorten label by one character.
3839 mkfs.btrfs imposes a slightly lower limit than would be possible in btrfs.
3840
3841 2017-02-02 Vladimir Serbinenko <phcoder@gmail.com>
3842
3843 grub-fs-tester: Fix mkudffs invocation.
3844 With current invocation order of arguments is wrong and path is hardcoded.
3845
3846 grub-fs-tester: Fix fat test.
3847 mkfs.vfat ignores -S when invoked on a disk, including loopback device,
3848 so do an mkfs on underlying image.
3849
3850 2017-02-02 Daniel Kiper <daniel.kiper@oracle.com>
3851
3852 i386/relocator: Align stack in grub_relocator64_efi relocator
3853 Unified Extensible Firmware Interface Specification, Version 2.6,
3854 section 2.3.4, x64 Platforms, boot services, says among others:
3855 The stack must be 16-byte aligned. So, do it. Otherwise OS may
3856 boot only by chance as it happens right now.
3857
3858 2017-02-02 Vladimir Serbinenko <phcoder@gmail.com>
3859
3860 i386-ieee1275: Add missing bootcheck target.
3861
3862 bootcheck-linux-i386: Use -cpu pentium2.
3863 Most modern kernels are compiled for i686, so use -cpu pentium2
3864 to avoid spurious failures.
3865
3866 Use -fPIC with arm64 with clang.
3867 Currently it doesn't work either way but with -fPIC it should work once
3868 clang bug is fixed.
3869
3870 INSTALL: Fix mention of thumb-clang.
3871
3872 Fix thumb compilation with clang.
3873 According to EABI only STT_FUNC has convention of lowest bit indicating
3874 execution mode. R_THM_{JUMP,CALL}* relocations are assumed to be pointing
3875 to thumb mode unless they use STT_FUNC.
3876
3877 2017-02-01 Vladimir Serbinenko <phcoder@gmail.com>
3878
3879 Add missing strtoull_test.c
3880 It was forgotten in my local directory.
3881
3882 arm64: Add support for GOT and PCREL32 relocations.
3883
3884 mkimage: Fix memory leak.
3885
3886 arm/arm64: Fix improper use of start address.
3887 It was used instead of loading address of current section or of entire buffer.
3888
3889 ia64: Fix iterator for relocation entries.
3890 Don't assume relocation entry size and use sh_entsize properly.
3891
3892 arm: Fix trampoline generation.
3893 We used the wrong pointer in this case. It worked only by accident.
3894
3895 Fix bootcheck-related files compilation.
3896 We need -static as otherwise linker will set interpreter field and ld.so
3897 is not available on our initrd's.
3898 Strip all sections we don't need on binary tests.
3899
3900 2017-01-31 Vladimir Serbinenko <phcoder@gmail.com>
3901
3902 Regenerate checksum.h.
3903 Screenshots checked.
3904 Using unifont from http://ftp.us.debian.org/debian/pool/main/u/unifont/xfonts-unifont_7.0.06-1_all.deb.
3905
3906 grub-mkfont: Remove leftover debug statement.
3907
3908 charset: Trim away RLM and LRM.
3909 They are not visible but would otherwise end up as [LRM] or [RLM] squares
3910 with some fonts.
3911
3912 gfxterm: Fix clearing of cursor.
3913 If ascent is bigger than height - 2, then we draw over character box but then
3914 to clear cursor we only draw over character box. So trim ascent if necessarry.
3915
3916 ia64: Add support for R_IA64_GPREL64I.
3917 Recent GCC generates those relocations, so we need to support them.
3918
3919 2017-01-30 Vladimir Serbinenko <phcoder@gmail.com>
3920
3921 grub-module-verifier: Add mips to all_video whitelist.
3922 On MIPS video is compiled-in. So all_video is empty. Whitelist it.
3923
3924 Fix -nopie/-nopie check.
3925 We don't use lgcc_s but missing lgcc_s or another library cause test to fail.
3926 So use -nostdlib.
3927 We need to use -Werror to avoid warning-generated case to be accepted.
3928 Clang uses -nopie rather than -no-pie. Check both and use whichever one works.
3929 Additionally android clang passes -pie to the linker even though it doesn't
3930 define __PIE__. So if compilation without no-pie logic fails add -nopie/-no-pie
3931 even if __PIE__ is not defined.
3932
3933 grub-module-verifier: Ignore all_video emptiness on xen.
3934 It's intentional that it's empty when no video modules
3935 are available.
3936
3937 2017-01-28 Vladimir Serbinenko <phcoder@gmail.com>
3938
3939 Support arm clang 3.8 amd later.
3940 clang 3.8 and later doesn't support -mllvm -use-arm-movt=0
3941 whereas older clang doesn't know -mno-movt. So use
3942 -mno-movt whenever possible and fallback to mllvm variant.
3943
3944 2017-01-27 Carlo Caione <carlo@endlessm.com>
3945
3946 exfat: Support files over 4GiB
3947 file size in grub_fat_data was 32-bit on exfat.
3948
3949 2017-01-27 Vladimir Serbinenko <phcoder@gmail.com>
3950
3951 Ensure that grub_reboot doesn't return on emu.
3952 Use grub_fatal if longjmp fails.
3953
3954 grub_reboot is marked as noreturn so return would cause
3955 a crash.
3956
3957 2017-01-27 Vladimir Serbinenko <phcoder@gmail.com>
3958
3959 grub-shell: skip font copying when no font is available.
3960
3961 Don't use -mlong-calls on arm.
3962 We don't really need it and it's flaky and creates
3963 bogus symbols with clang.
3964
3965 configure: Disable movw/movt with clang.
3966 Those relocations are not compatible with PE and also
3967 not compatible with custom uboot relocator.
3968 Disable them.
3969
3970 grub-fs-tester: Delete directory once we're done.
3971
3972 grub-fs-tester: Accomodate for slower systems.
3973 fstime can be more different with xz squashfs.
3974 Allow difference up to 3 seconds.
3975 This code is ugly now but rewriting it now is not on the
3976 table.
3977
3978 grub-fs-tester: Accomodate for testing in proot containers.
3979 proot creates hidden files with .proot prefix and name
3980 derived from real file name. So decrease file name length
3981 and path depth. For some reason depth 85 also results in
3982 undeleteable directory, so use 84 instead of 85.
3983
3984 2017-01-24 Andrei Borzenkov <arvidjaar@gmail.com>
3985
3986 osdep/linux: handle autofs entries in /proc/self/mountinfo
3987 These entries have placeholder for device name and so are useless for our
3988 purpose. grub failed with something like
3989
3990 grub-install: error: failed to get canonical path of `systemd-1'.
3991
3992 When we see autofs entry, record it (to keep parent-child relationship) but
3993 continue to look for real mount. If it is found, we process it as usual. If
3994 only autofs entry exists, attempt to trigger mount by opening mount point
3995 and retry. Mount point itself is then kept open to avoid timeout.
3996
3997 Recent systemd is by default using automount for /boot/efi so this should
3998 become more popular problem on EFI systems.
3999
4000 Closes: 49942
4001
4002 2017-01-08 Andrei Borzenkov <arvidjaar@gmail.com>
4003
4004 linux: fix "vga=XX deprecated" warning for text mode
4005 Arguments were in reverse order which resulted in
4006
4007 text is deprecated. Use set gfxpayload=vga=0 before linux command instead.
4008
4009 2016-12-22 Andrei Borzenkov <arvidjaar@gmail.com>
4010
4011 configure: fix check for sys/sysmacros.h under glibc 2.25+
4012 glibc 2.25 still includes sys/sysmacros.h in sys/types.h but also emits
4013 deprecation warning. So test for sys/types.h succeeds in configure but later
4014 compilation fails because we use -Werror by default.
4015
4016 While this is fixed in current autoconf GIT, we really cannot force everyone
4017 to use bleeding edge (that is not even released right now). So run test under
4018 -Werror as well to force proper detection.
4019
4020 This should have no impact on autoconf 2.70+ as AC_HEADER_MAJOR in this version
4021 simply checks for header existence.
4022
4023 Reported and tested by Khem Raj <raj.khem@gmail.com>
4024
4025 2016-12-22 Michael Chang <mchang@suse.com>
4026
4027 Fix fwpath in efi netboot
4028 The path returned by grub_efi_net_config has already been stripped for the
4029 directory part extracted from cached bootp packet. We should just return the
4030 result to avoild it be stripped again.
4031
4032 It fixed the problem that grub.efi as NBP image always looking for grub.cfg and
4033 platform directory in upper folder rather than current one it gets loaded while
4034 $prefix is empty. The behavior is inconsistent with other architecture and how
4035 we would expect empty $prefix going to be in general.
4036
4037 The only exception to the general rule of empty $prefix is that when loaded
4038 from platform directory itself, the platform part is stripped thus upper folder
4039 is used for looking up files. It meets the case for how grub-mknetdir lay out
4040 the files under tftp root directory, but also hide away this issue to be
4041 identified as it appears to be just works.
4042
4043 Also fix possible memory leak by moving grub_efi_get_filename() call after
4044 grub_efi_net_config().
4045
4046 2016-12-15 Andrei Borzenkov <arvidjaar@gmail.com>
4047
4048 efi: properly terminate filepath with NULL in chainloader
4049 EFI File Path Media Device Path is defined as NULL terminated string;
4050 but chainloader built file paths without final NULL. This caused error
4051 with Secure Boot and Linux Foundation PreLoader on Acer with InsydeH20 BIOS.
4052 Apparently firmware failed verification with EFI_INVALID_PARAMETER which is
4053 considered fatal error by PreLoader.
4054
4055 Reported and tested by Giovanni Santini <itachi.sama.amaterasu@gmail.com>
4056
4057 2016-12-14 Magnus Granberg <zorry@gentoo.org>
4058
4059 configure: add check for -no-pie if the compiler default to -fPIE
4060 When Grub is compile with gcc 6.1 that have --enable-defult-pie set.
4061 It fail with.
4062 -ffreestanding -m32 -Wl,-melf_i386 -Wl,--build-id=none -nostdlib -Wl,-N -Wl,-r,-d -
4063 o trig.module trig_module-trigtables.o
4064 grep 'MARKER' gcry_whirlpool.marker.new > gcry_whirlpool.marker; rm -f
4065 gcry_whirlpool.marker.new
4066 /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: -r and -
4067 shared may not be used together
4068 collect2: error: ld returned 1 exit status
4069 Makefile:26993: recipe for target 'trig.module' failed
4070
4071 Check that compiler supports -no-pie and add it to linker flags.
4072
4073 2016-12-14 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
4074
4075 ofnet: implement the receive buffer
4076 get_card_packet() from ofnet.c allocates a netbuff based on the device's MTU:
4077
4078 nb = grub_netbuff_alloc (dev->mtu + 64 + 2);
4079
4080 In the case when the MTU is large, and the received packet is
4081 relatively small, this leads to allocation of significantly more memory,
4082 than it's required. An example could be transmission of TFTP packets
4083 with 0x400 blksize via a network card with 0x10000 MTU.
4084
4085 This patch implements a per-card receive buffer in a way similar to efinet.c,
4086 and makes get_card_packet() allocate a netbuff of the received data size.
4087
4088 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4089
4090 2016-12-14 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
4091
4092 ofnet: move the allocation of the transmit buffer into a function
4093 In the current code search_net_devices() uses the "alloc-mem" command
4094 from the IEEE1275 User Interface for allocation of the transmit buffer
4095 for the case when GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN is set.
4096
4097 I don't have hardware where this flag is set to verify if this
4098 workaround is still needed. However, further changes to ofnet will
4099 require to execute this workaround one more time. Therefore, to
4100 avoid possible duplication of code I'm moving this piece of
4101 code into a function.
4102
4103 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4104
4105 2016-11-24 Alexander Graf <agraf@suse.de>
4106
4107 efi: Move fdt helper into own file
4108 We only support FDT files with EFI on arm and arm64 systems, not
4109 on x86. So move the helper that finds a prepopulated FDT UUID
4110 into its own file and only build it for architectures where it
4111 also gets called.
4112
4113 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4114
4115 2016-11-22 Andrei Borzenkov <arvidjaar@gmail.com>
4116
4117 NEWS updates
4118
4119 2016-11-22 Andrei Borzenkov <arvidjaar@gmail.com>
4120
4121 bootp: export next server IP as environment variable
4122 Network boot autoconfiguration sets default server to next server IP
4123 (siaddr) from BOOTP/DHCP reply, but manual configuration using net_bootp
4124 exports only server name. Unfortunately semantic of server name is not
4125 clearly defined. BOOTP RFC 951 defines it only for client request, and
4126 DHCP RFC 1541 only mentions it, without any implied usage. It looks like
4127 this field is mostly empty in server replies.
4128
4129 Export next server IP as net_<interface>_next_server variable. This allows
4130 grub configuration script to set $root/$prefix based on information obtained
4131 by net_bootp.
4132
4133 Reported and tested by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
4134 Cc: nikunj@linux.vnet.ibm.com
4135
4136 v2: change variable name to net_<interface>_next_server as discussed on the list
4137
4138 2016-11-22 Aaro Koskinen <aaro.koskinen@iki.fi>
4139
4140 configure.ac: don't require build time grub-mkfont on powerpc-ieee1275
4141 Don't require build time grub-mkfont on powerpc-ieee1275.
4142
4143 2016-11-14 Dirk Mueller <dmueller@suse.com>
4144
4145 grub-mknetdir: Add support for ARM64 EFI
4146
4147 2016-11-12 Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
4148
4149 .gitignore: Add grub-core/build-grub-module-verifier
4150
4151 2016-11-10 Alexander Graf <agraf@suse.de>
4152
4153 arm efi: Use fdt from firmware when available
4154 If EFI is nice enough to pass us an FDT using configuration tables on 32bit
4155 ARM, we should really try and make use of it.
4156
4157 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4158
4159 2016-11-10 Alexander Graf <agraf@suse.de>
4160
4161 arm64: Move firmware fdt search into global function
4162 Searching for a device tree that EFI passes to us via configuration tables
4163 is nothing architecture specific. Move it into generic code.
4164
4165 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4166
4167 2016-11-05 Corey Hickey <bugfood-ml@fatooh.org>
4168
4169 fix detection of non-LUKS CRYPT
4170 grub_util_get_dm_abstraction() does a string comparison of insufficient
4171 length. When using a UUID such as "CRYPT-PLAIN-sda6_crypt", the function
4172 returns GRUB_DEV_ABSTRACTION_LUKS.
4173
4174 This results in the error:
4175 ./grub-probe: error: disk `cryptouuid/sda6_crypt' not found.
4176
4177 This appears to be a copy/paste error introduced in:
4178 a10e7a5a8918bea6e2632055129fa9b516fe965a
4179
4180 The bug was (apparently) latent until revealed by:
4181 3bca85b4184f74995a7cc2791e432173fde26d34
4182
4183 2016-10-27 Juergen Gross <jgross@suse.com>
4184
4185 xen: add capability to load p2m list outside of kernel mapping
4186 Modern pvops linux kernels support a p2m list not covered by the
4187 kernel mapping. This capability is flagged by an elf-note specifying
4188 the virtual address the kernel is expecting the p2m list to be mapped
4189 to.
4190
4191 In case the elf-note is set by the kernel don't place the p2m list
4192 into the kernel mapping, but map it to the given address. This will
4193 allow to support domains with larger memory, as the kernel mapping is
4194 limited to 2GB and a domain with huge memory in the TB range will have
4195 a p2m list larger than this.
4196
4197 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4198
4199 2016-10-27 Juergen Gross <jgross@suse.com>
4200
4201 xen: modify page table construction
4202 Modify the page table construction to allow multiple virtual regions
4203 to be mapped. This is done as preparation for removing the p2m list
4204 from the initial kernel mapping in order to support huge pv domains.
4205
4206 This allows a cleaner approach for mapping the relocator page by
4207 using this capability.
4208
4209 The interface to the assembler level of the relocator has to be changed
4210 in order to be able to process multiple page table areas.
4211
4212 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4213
4214 2016-10-27 Juergen Gross <jgross@suse.com>
4215
4216 xen: add capability to load initrd outside of initial mapping
4217 Modern pvops linux kernels support an initrd not covered by the initial
4218 mapping. This capability is flagged by an elf-note.
4219
4220 In case the elf-note is set by the kernel don't place the initrd into
4221 the initial mapping. This will allow to load larger initrds and/or
4222 support domains with larger memory, as the initial mapping is limited
4223 to 2GB and it is containing the p2m list.
4224
4225 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4226
4227 2016-10-27 Juergen Gross <jgross@suse.com>
4228
4229 xen: factor out allocation of page tables into separate function
4230 Do the allocation of page tables in a separate function. This will
4231 allow to do the allocation at different times of the boot preparations
4232 depending on the features the kernel is supporting.
4233
4234 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4235
4236 2016-10-27 Juergen Gross <jgross@suse.com>
4237
4238 xen: factor out allocation of special pages into separate function
4239 Do the allocation of special pages (start info, console and xenbus
4240 ring buffers) in a separate function. This will allow to do the
4241 allocation at different times of the boot preparations depending on
4242 the features the kernel is supporting.
4243
4244 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4245
4246 2016-10-27 Juergen Gross <jgross@suse.com>
4247
4248 xen: factor out p2m list allocation into separate function
4249 Do the p2m list allocation of the to be loaded kernel in a separate
4250 function. This will allow doing the p2m list allocation at different
4251 times of the boot preparations depending on the features the kernel
4252 is supporting.
4253
4254 While at this remove superfluous setting of first_p2m_pfn and
4255 nr_p2m_frames as those are needed only in case of the p2m list not
4256 being mapped by the initial kernel mapping.
4257
4258 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4259
4260 2016-10-27 Juergen Gross <jgross@suse.com>
4261
4262 xen: synchronize xen header
4263 Get actual version of include/xen/xen.h from the Xen repository in
4264 order to be able to use constants defined there.
4265
4266 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4267
4268 2016-10-27 Juergen Gross <jgross@suse.com>
4269
4270 xen: add elfnote.h to avoid using numbers instead of constants
4271 Various features and parameters of a pv-kernel are specified via
4272 elf notes in the kernel image. Those notes are part of the interface
4273 between the Xen hypervisor and the kernel.
4274
4275 Instead of using num,bers in the code when interpreting the elf notes
4276 make use of the header supplied by Xen for that purpose.
4277
4278 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4279
4280 2016-10-27 Juergen Gross <jgross@suse.com>
4281
4282 xen: reduce number of global variables in xen loader
4283 The loader for xen paravirtualized environment is using lots of global
4284 variables. Reduce the number by making them either local or by putting
4285 them into a single state structure.
4286
4287 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4288
4289 2016-10-27 Juergen Gross <jgross@suse.com>
4290
4291 xen: avoid memleaks on error
4292 When loading a Xen pv-kernel avoid memory leaks in case of errors.
4293
4294 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4295
4296 2016-10-27 Juergen Gross <jgross@suse.com>
4297
4298 xen: make xen loader callable multiple times
4299 The loader for xen paravirtualized environment isn't callable multiple
4300 times as it won't free any memory in case of failure.
4301
4302 Call grub_relocator_unload() as other modules do it before allocating
4303 a new relocator or when unloading the module.
4304
4305 Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
4306
4307 2016-10-27 Daniel Kiper <daniel.kiper@oracle.com>
4308
4309 multiboot2: Add support for relocatable images
4310 Currently multiboot2 protocol loads image exactly at address specified in
4311 ELF or multiboot2 header. This solution works quite well on legacy BIOS
4312 platforms. It is possible because memory regions are placed at predictable
4313 addresses (though I was not able to find any spec which says that it is
4314 strong requirement, so, it looks that it is just a goodwill of hardware
4315 designers). However, EFI platforms are more volatile. Even if required
4316 memory regions live at specific addresses then they are sometimes simply
4317 not free (e.g. used by boot/runtime services on Dell PowerEdge R820 and
4318 OVMF). This means that you are not able to just set up final image
4319 destination on build time. You have to provide method to relocate image
4320 contents to real load address which is usually different than load address
4321 specified in ELF and multiboot2 headers.
4322
4323 This patch provides all needed machinery to do self relocation in image code.
4324 First of all GRUB2 reads min_addr (min. load addr), max_addr (max. load addr),
4325 align (required image alignment), preference (it says which memory regions are
4326 preferred by image, e.g. none, low, high) from multiboot_header_tag_relocatable
4327 header tag contained in binary (at this stage load addresses from multiboot2
4328 and/or ELF headers are ignored). Later loader tries to fulfill request (not only
4329 that one) and if it succeeds then it informs image about real load address via
4330 multiboot_tag_load_base_addr tag. At this stage GRUB2 role is finished. Starting
4331 from now executable must cope with relocations itself using whole static and
4332 dynamic knowledge provided by boot loader.
4333
4334 This patch does not provide functionality which could do relocations using
4335 ELF relocation data. However, I was asked by Konrad Rzeszutek Wilk and Vladimir
4336 'phcoder' Serbinenko to investigate that thing. It looks that relevant machinery
4337 could be added to existing code (including this patch) without huge effort.
4338 Additionally, ELF relocation could live in parallel with self relocation provided
4339 by this patch. However, during research I realized that first of all we should
4340 establish the details how ELF relocatable image should look like and how it should
4341 be build. At least to build proper test/example files.
4342
4343 So, this patch just provides support for self relocatable images. If ELF file
4344 with relocs is loaded then GRUB2 complains loudly and ignores it. Support for
4345 such files will be added later.
4346
4347 This patch was tested with Xen image which uses that functionality. However, this Xen
4348 feature is still under development and new patchset will be released in about 2-3 weeks.
4349
4350 Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
4351
4352 2016-10-27 Daniel Kiper <daniel.kiper@oracle.com>
4353
4354 multiboot2: Do not pass memory maps to image if EFI boot services are enabled
4355 If image requested EFI boot services then skip multiboot2 memory maps.
4356 Main reason for not providing maps is because they will likely be
4357 invalid. We do a few allocations after filling them, e.g. for relocator
4358 needs. Usually we do not care as we would have finished boot services.
4359 If we keep boot services then it is easier/safer to not provide maps.
4360 However, if image needs memory maps and they are not provided by bootloader
4361 then it should get itself just before ExitBootServices() call.
4362
4363 Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
4364 Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
4365
4366 2016-10-27 Daniel Kiper <daniel.kiper@oracle.com>
4367
4368 multiboot2: Add tags used to pass ImageHandle to loaded image
4369 Add tags used to pass ImageHandle to loaded image if requested.
4370 It is used by at least ExitBootServices() function.
4371
4372 Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
4373 Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
4374
4375 2016-10-27 Daniel Kiper <daniel.kiper@oracle.com>
4376
4377 i386/relocator: Add grub_relocator64_efi relocator
4378 Add grub_relocator64_efi relocator. It will be used on EFI 64-bit platforms
4379 when multiboot2 compatible image requests MULTIBOOT_TAG_TYPE_EFI_BS. Relocator
4380 will set lower parts of %rax and %rbx accordingly to multiboot2 specification.
4381 On the other hand processor mode, just before jumping into loaded image, will
4382 be set accordingly to Unified Extensible Firmware Interface Specification,
4383 Version 2.4 Errata B, section 2.3.4, x64 Platforms, boot services. This way
4384 loaded image will be able to use EFI boot services without any issues.
4385
4386 Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
4387 Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
4388
4389 2016-10-18 Sakar Arora <Sakar.Arora@nxp.com>
4390
4391 net/ip: Fix limit_time calculation in freeing old fragments
4392 limit_time underflows when current time is less than 90000ms.
4393 This causes packet fragments received during this time, i.e.,
4394 till 90000ms pass since timer init, to be rejected.
4395
4396 Hence, set it to 0 if its less than 90000.
4397
4398 2016-09-28 Andrei Borzenkov <arvidjaar@gmail.com>
4399
4400 asm-tests/i386-pc: Check that movl is 5 bytes.
4401 LLVM 3.9 now emits short form of jump instructions, but it is still using
4402 32 bit addresses for some movl instructions. Fortunately it was caught early:
4403
4404 clang ... boot/i386/pc/boot.S
4405 clang -cc1as: fatal error: error in backend: invalid .org offset '440' (at offset '441')
4406
4407 Add additional check to catch it during configure run and force -no-integrated-as.
4408
4409 Closes: 49200
4410
4411 More details in
4412 https://lists.gnu.org/archive/html/grub-devel/2015-02/msg00099.html
4413 https://llvm.org/bugs/show_bug.cgi?id=22662
4414
4415 2016-08-13 Pete Batard <pete@akeo.ie>
4416
4417 Add missing va_end() to xasprintf() in grub-emu.
4418
4419 2016-07-27 Andrei Borzenkov <arvidjaar@gmail.com>
4420
4421 at_keyboard: fix numpad "0" and "." mapping
4422 Reported for set 1 by fgndevelop <fgndevelop@posteo.org>. Apparently
4423 set 2 was reversed too.
4424
4425 2016-07-26 Andrei Borzenkov <arvidjaar@gmail.com>
4426
4427 dns: fix buffer overflow for data->addresses in recv_hook
4428 We may get more than one response before exiting out of loop in
4429 grub_net_dns_lookup, but buffer was allocated for the first response only,
4430 so storing answers from subsequent replies wrote past allocated size.
4431 We never really use more than the very first address during lookup so there
4432 is little point in collecting all of them. Just quit early if we already have
4433 some reply.
4434
4435 Code needs serious redesign to actually collect multiple answers
4436 and select the best fit according to requested type (IPv4 or IPv6).
4437
4438 Reported and tested by Michael Chang <mchang@suse.com>
4439
4440 2016-07-26 Andrei Borzenkov <arvidjaar@gmail.com>
4441
4442 xfs: accept filesystem with meta_uuid
4443 XFS V5 stores UUID in metadata and compares them with superblock UUID.
4444 To allow changing of user-visible UUID it stores original value in new
4445 superblock field (meta_uuid) and sets incompatible flag to indicate that
4446 new field must be used to verify metadata. Our driver currently does not
4447 check metadata UUID so simply accept such filesystem.
4448
4449 Reported-By: Marcos Mello <marcosfrm@outlook.com>
4450 Reviewd by Jan Kara <jack@suse.cz>
4451
4452 2016-05-03 Andrei Borzenkov <arvidjaar@gmail.com>
4453
4454 net: translate pxe prefix to tftp when checking for self-load
4455 Commit ba218c1 missed legacy pxe and pxe: prefixes which are
4456 translated to tftp, so comparison failed.
4457
4458 2016-04-30 Andrei Borzenkov <arvidjaar@gmail.com>
4459
4460 net: reset net->stall in grub_net_seek_real
4461 If we open new connection, we need to reset stall indication, otherwise
4462 nothing will ever be polled (low level code rely on this field being
4463 zero when establishing connection).
4464
4465 2016-04-30 Stefan Fritsch <sf@sfritsch.de>
4466
4467 http: reset EOF indication in http_seek
4468 Otherwise next read will stop polling too early due to stale EOF
4469 indicator, returning incomplete data to caller.
4470
4471 2016-04-24 Mike Gilbert <floppym@gentoo.org>
4472
4473 build: Use AC_HEADER_MAJOR to find device macros
4474 Depending on the OS/libc, device macros are defined in different
4475 headers. This change ensures we include the right one.
4476
4477 sys/types.h - BSD
4478 sys/mkdev.h - Sun
4479 sys/sysmacros.h - glibc (Linux)
4480
4481 glibc currently pulls sys/sysmacros.h into sys/types.h, but this may
4482 change in a future release.
4483
4484 https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
4485
4486 2016-04-09 Michael Chang <mchang@suse.com>
4487
4488 http: fix superfluous null line in range request header
4489 At least the apache sever is very unhappy with that extra null line and will
4490 take more than ten seconds in responding to each range request, which slows
4491 down a lot the entire http file transfer process or even time out.
4492
4493 2016-03-22 Andrei Borzenkov <arvidjaar@gmail.com>
4494
4495 configure: set -fno-pie together with -fno-PIE
4496 OpenBSD 5.9 apparently defaults to -fpie. We use -fno-PIE when appropriate
4497 already, but that is not enough - it does not turn off -fpie.
4498
4499 Actually check for -fPIE is not precise enough. __PIE__ is set for both
4500 -fpie and -fPIE but with different values. As far as I can tell, both
4501 options were introduced at the same time, so both should always be supported.
4502
4503 This fixes compilation on OpenBSD 5.9 which otherwise created insanely big
4504 lzma_decompress.img.
4505
4506 Reported, suggested and tested by: Jiri B <jirib@devio.us>
4507
4508 2016-03-20 Andrei Borzenkov <arvidjaar@gmail.com>
4509
4510 bootp: check that interface is not NULL in configure_by_dhcp_ack
4511 grub_net_add_addr may fail with OOM and we use returned interface
4512 later without any checks.
4513
4514 2016-03-19 Andrei Borzenkov <arvidjaar@gmail.com>
4515
4516 bootp: fix memory leak in grub_cmd_dhcpopt
4517
4518 2016-03-15 Aaron Luft <aluft@lifesize.com>
4519
4520 Remove the variable oldname which is attempting to free stack space.
4521 Historically this variable hold previous value of filename that
4522 had to be freed if allocated previously. Currently this branch
4523 is entered only if filename was not allocated previously so it
4524 became redundant. It did not cause real problems because grub_free
4525 was not called, but code is confusing and causes compilation error
4526 in some cases.
4527
4528 2016-03-13 Andrei Borzenkov <arvidjaar@gmail.com>
4529
4530 Makefile.util.def: add $LIBINTL to grub-macbless flags
4531 Fixes compilation on OpenBSD 5.9.
4532
4533 Reported by Jiri B <jirib@devio.us>
4534
4535 2016-03-11 Robert Marshall <rmarshall@redhat.com>
4536
4537 Failed config now returns exit code (#1252311)
4538 Grub would notify the user if the new config was invalid, however, it
4539 did not exit properly with exit code 1. Added the proper exit code.
4540
4541 Resolves: rhbz#1252311
4542
4543 2016-03-11 Michael Chang <mchang@suse.com>
4544
4545 xen_file: Fix invalid payload size
4546
4547 2016-03-10 Vladimir Serbinenko <phcoder@gmail.com>
4548
4549 multiboot2: Remove useless GRUB_PACKED
4550 Reported by: Daniel Kiper
4551
4552 2016-03-06 Andrei Borzenkov <arvidjaar@gmail.com>
4553
4554 20_linux_xen: fix test for GRUB_DEVICE
4555 Same fix as in 082bc9f.
4556
4557 2016-03-06 Mike Gilbert <floppym@gentoo.org>
4558
4559 10_linux: Fix grouping of tests for GRUB_DEVICE
4560 Commit 7290bb562 causes GRUB_DISABLE_LINUX_UUID to be ignored due to
4561 mixing of || and && operators. Add some parens to help with that.
4562
4563 2016-02-28 Andrei Borzenkov <arvidjaar@gmail.com>
4564
4565 NEWS update
4566
4567 2016-02-28 Vladimir Serbinenko <phcoder@gmail.com>
4568
4569 Release 2.02~beta3
4570
4571 grub_arch_sync_dma_caches: Accept volatile address
4572
4573 2016-02-27 Leif Lindholm <leif.lindholm@linaro.org>
4574
4575 efidisk: Respect block_io_protocol buffer alignment
4576 Returned from the OpenProtocol operation, the grub_efi_block_io_media
4577 structure contains the io_align field, specifying the minimum alignment
4578 required for buffers used in any data transfers with the device.
4579
4580 Make grub_efidisk_readwrite() allocate a temporary buffer, aligned to
4581 this boundary, if the buffer passed to it does not already meet the
4582 requirements.
4583
4584 Also sanity check the io_align field in grub_efidisk_open() for
4585 power-of-two-ness and bail if invalid.
4586
4587 2016-02-27 Vladimir Serbinenko <phcoder@gmail.com>
4588
4589 usbtrans: Fix memory coherence and use-after-free.
4590
4591 ehci: Fix memory coherence
4592 This is a no-op on x86 but necessarry on ARM and may be necessarry on MIPS.
4593
4594 arm-uboot: Make self-relocatable to allow loading at any address
4595
4596 Allow _start == 0 with relocatable images
4597
4598 2016-02-27 Vladimir Serbinenko <phcoder@gmail.com>
4599
4600 Provide __bss_start and _end symbols in grub-mkimage.
4601 For this ensure that all bss sections are merged.
4602
4603 We need this to correctly prelink non-PE relocatable images.
4604
4605 2016-02-27 Vladimir Serbinenko <phcoder@gmail.com>
4606
4607 Encapsulate image layout into a separate structure.
4608 Currently we pass around a lot of pointer. Instead put all relevant data
4609 into one structure.
4610
4611 mkimagexx: Split PE and generic part for relocations.
4612 As a preparation for U-Boot relocations, split emitting PE-relocations
4613 from parsing source ELF-relocations.
4614
4615 mkimage.c: Split into separate files.
4616 util/grub-mkimagexx.c is included in a special way into mkimage.c.
4617 Interoperation between defines makes this very tricky. Instead
4618 just have a clean interface and compile util/grub-mkimage*.c separately
4619 from mkimage.c
4620
4621 bsd: Ensure that kernel is loaded before loading module.
4622 kernel_type may be set to the type of failed kernel. This patching-up is
4623 easier than to reflow kernel loading routines.
4624
4625 cat: Don't switch terminal mode when there is nothing to highlight.
4626 This just pollutes serial console.
4627
4628 Use console rather than serial_efi0 on arm64-efi in tests
4629
4630 2016-02-27 Andrei Borzenkov <arvidjaar@gmail.com>
4631
4632 efidisk: fix misplaced parenthesis in b00e4c2
4633
4634 2016-02-26 Andrei Borzenkov <arvidjaar@gmail.com>
4635
4636 efidisk: prevent errors from diskfilter scan of removable drives
4637 Map EFI_NO_MEDIA to GRUB_ERR_OUT_OF_RANGE that is ignored by diskfilter. This
4638 actually matches pretty close (we obviously attempt to read outside of media)
4639 and avoids adding more error codes.
4640
4641 This affects only internally initiated scans. If read/write from removable is
4642 explicitly requested, we still return an error and text explanation is more
4643 clear for user than generic error.
4644
4645 Reported and tested by Andreas Loew <Andreas.Loew@gmx.net>
4646
4647 2016-02-26 Vladimir Serbinenko <phcoder@gmail.com>
4648
4649 Regenerate checksums
4650
4651 Makefile: Don't delete default_payload.elf if it doesn't exist.
4652
4653 2016-02-25 Josef Bacik <jbacik@fb.com>
4654
4655 net: fix ipv6 routing
4656 ipv6 routing in grub2 is broken, we cannot talk to anything outside our local
4657 network or anything that doesn't route in our global namespace. This patch
4658 fixes this by doing a couple of things
4659
4660 1) Read the router information off of the router advertisement. If we have a
4661 router lifetime we need to take the source address and create a route from it.
4662
4663 2) Changes the routing stuff slightly to allow you to specify a gateway _and_ an
4664 interface. Since the router advertisements come in on the link local address we
4665 need to associate it with the global address on the card. So when we are
4666 processing the router advertisement, either use the SLAAC interface we create
4667 and add the route to that interface, or loop through the global addresses we
4668 currently have on our interface and associate it with one of those addresses.
4669 We need to have a special case here for the default route so that it gets used,
4670 we do this by setting the masksize to 0 to mean it encompasses all networks.
4671 The routing code will automatically select the best route so if there is a
4672 closer match we will use that.
4673
4674 With this patch I can now talk to ipv6 addresses outside of my local network.
4675 Thanks,
4676
4677 2016-02-24 Vladimir Serbinenko <phcoder@gmail.com>
4678
4679 ieee1275: fix signed comparison
4680
4681 2016-02-23 Andrei Borzenkov <arvidjaar@gmail.com>
4682
4683 search: actually skip floppy with --no-floppy
4684 grub_device_iterate() ignores device when iterator returns 1, not 0.
4685
4686 Reported by Carlos E. R. <robin.listas@telefonica.net>
4687
4688 2016-02-23 Andrei Borzenkov <arvidjaar@gmail.com>
4689
4690 multiboot2: zero reserved field in memory map
4691 Documentation says, bootloader should set reserved field to zero.
4692
4693 Reported by Wink Saville <wink@saville.com>
4694
4695 2016-02-22 Vladimir Serbinenko <phcoder@gmail.com>
4696
4697 Improve EHCI logging
4698 Add dprintf's on common error paths and remove some entries which are too
4699 noisy.
4700
4701 usb_keyboard: Remove useless include
4702 This prevents non-PCI machines from having USB.
4703
4704 Refresh before abort
4705 This ensures that abort message is actually visible to the user.
4706
4707 2016-02-22 Eric Snowberg <eric.snowberg@oracle.com>
4708
4709 ieee1275: prevent buffer over-read
4710 Prevent buffer over-read in grub_machine_mmap_iterate. This was
4711 causing phys_base from being calculated properly. This then
4712 caused the wrong value to be placed in ramdisk_image within
4713 struct linux_hdrs. Which prevented the ramdisk from loading on
4714 boot.
4715
4716 Newer SPARC systems contain more than 8 available memory entries.
4717
4718 For example on a T5-8 with 2TB of memory, the memory layout could
4719 look like this:
4720
4721 T5-8 Memory
4722 reg 00000000 30000000 0000003f b0000000
4723 00000800 00000000 00000040 00000000
4724 00001000 00000000 00000040 00000000
4725 00001800 00000000 00000040 00000000
4726 00002000 00000000 00000040 00000000
4727 00002800 00000000 00000040 00000000
4728 00003000 00000000 00000040 00000000
4729 00003800 00000000 00000040 00000000
4730 available 00003800 00000000 0000003f ffcae000
4731 00003000 00000000 00000040 00000000
4732 00002800 00000000 00000040 00000000
4733 00002000 00000000 00000040 00000000
4734 00001800 00000000 00000040 00000000
4735 00001000 00000000 00000040 00000000
4736 00000800 00000000 00000040 00000000
4737 00000000 70000000 0000003f 70000000
4738 00000000 6eef8000 00000000 00002000
4739 00000000 30400000 00000000 3eaf6000
4740 name memory
4741
4742 2016-02-22 Thomas Huth <thuth@redhat.com>
4743
4744 menu_entry: Disable cursor during update_screen()
4745 When running grub in a VGA console of a KVM pseries guest on PowerPC,
4746 you can see the cursor sweeping over the whole line when entering a
4747 character in editor mode. This is visible because grub always refreshes
4748 the whole line when entering a character in editor mode, and drawing
4749 characters is quite a slow operation with the firmware used for the
4750 powerpc pseries guests (SLOF).
4751 To avoid this ugliness, the cursor should be disabled when refreshing
4752 the screen contents during update_screen().
4753
4754 2016-02-17 Vladimir Serbinenko <phcoder@gmail.com>
4755
4756 default_payload.elf: Always rebuild and remove before build.
4757 It's difficult to know all dependencies. Since it's manual and cheap
4758 target anyway, simply always rebuild it.
4759
4760 default_payload.elf: Include password_pbkdf2.
4761 Withoout this module we may end up in a system where no password is
4762 accepted.
4763
4764 default_payload.elf: Add modules from $(EXTRA_PAYLOAD_MODULES).
4765 This allows coreboot building system to add extra modules depending
4766 on user config.
4767
4768 mm: Avoid integer overflow.
4769
4770 Remove -Wno-maybe-uninitialized as it may not be present.
4771
4772 Fix warnings when compiling with -O3
4773
4774 2016-02-14 Vladimir Serbinenko <phcoder@gmail.com>
4775
4776 Add wbinvd around bios call.
4777 Via C3 has problems with cache coherency when transitioning between the modes,
4778 so flush it around bios calls.
4779
4780 2016-02-12 Eric Snowberg <eric.snowberg@oracle.com>
4781
4782 OBP available region contains grub. Start at grub_phys_end.
4783 This prevents a problem where grub was being overwritten since
4784 grub_phys_start does not start at a zero offset within the memory
4785 map.
4786
4787 2016-02-12 Andreas Freimuth <andreas_freimuth@web.de>
4788
4789 Add Thinkpad T410s button cmos address.
4790
4791 2016-02-12 Vladimir Serbinenko <phcoder@gmail.com>
4792
4793 TODO: Remove obsolete link
4794
4795 2016-02-12 Toomas Soome <tsoome@me.com>
4796
4797 lz4: Fix pointer overflow
4798
4799 2016-02-12 Vladimir Serbinenko <phcoder@gmail.com>
4800
4801 grub-shell: Update 32-bit OVMF binary name.
4802
4803 2016-02-12 Daniel Kiper <daniel.kiper@oracle.com>
4804
4805 relocator: Fix integer underflow.
4806
4807 2016-02-12 Vladimir Serbinenko <phcoder@gmail.com>
4808
4809 Change -v to -V for version of shell utils.
4810
4811 xnu: Add new kernel path to autoconfig.
4812
4813 arm64: Use cpu timer for timekeeping.
4814
4815 powerpc: Trim header in tests.
4816
4817 default_payload: Include syslinuxcfg, all filesystems and xnu.
4818
4819 xnu: Supply random seed.
4820 Now we're able to load kernels up to El Capitan.
4821
4822 Add RNG module.
4823
4824 yylex: use grub_fatal for exit.
4825 lexer calls yylex_fatal on fatal internal errors. yylex_fatal itself is
4826 declared as noreturn and calls exit. Returning from noreturn function has
4827 unpredictable consequences.
4828
4829 printf: Fix and test %% behaviour in presence of subsequenbt args.
4830
4831 Split pmtimer wait and tsc measurement from pmtimer tsc calibration.
4832
4833 Make grub_cpu_is_tsc_supported generally available.
4834
4835 Make grub_acpi_find_fadt accessible generically
4836
4837 Make unaligned types public.
4838 This simplifies code which has to handle those types.
4839
4840 Fix emu compilation error on arm.
4841
4842 2016-02-11 Vladimir Serbinenko <phcoder@gmail.com>
4843
4844 xnu: Include relocated EFI in heap size.
4845
4846 xnu: supply ramsize to the kernel.
4847 Without this info recent kernels crash as they allocate no heap.
4848
4849 2016-02-03 Andrei Borzenkov <arvidjaar@gmail.com>
4850
4851 support modules without symbol table
4852 all_video module does not have any code or data and exists solely for
4853 .moddeps section to pull in dependencies. This makes all symbols unneeded.
4854
4855 While in current binutils (last released version as of this commit is 2.26)
4856 ``strip --strip-unneeded'' unintentionally adds section symbols for each
4857 existing section, this behavior was considered a bug and changed in commit
4858 14f2c699ddca1e2f706342dffc59a6c7e23e844c to completely strip symbol table
4859 in this case.
4860
4861 Older binutils (verified with 2.17) and some other toolchains (at least
4862 elftoolchain r3223M), both used in FreeBSD, remove symbol table in all_video
4863 as well.
4864
4865 Relax run-time check and do not return error for modules without symbol table.
4866 Add additional checks to module verifier to make sure such modules
4867
4868 a) have non-empty .moddeps section. Without either externally visible symbols
4869 or .moddeps modules are completely useless and should not be built.
4870
4871 b) do not have any relocations.
4872
4873 Closes: 46986
4874
4875 v2: add run-time check for empty symbol table if relocations are present as
4876 suggested by Vladimir.
4877
4878 2016-02-01 Andrei Borzenkov <arvidjaar@gmail.com>
4879
4880 10_linux: avoid multi-device root= kernel argument
4881 If root filesystem is multidev btrfs, do not attempt to pass all devices as
4882 kernel root= argument. This results in splitting command line in GRUB due to
4883 embedded newline and even if we managed to quote it, kernel does not know how
4884 to interpret it anyway. Multidev btrfs requires user space device scanning,
4885 so passing single device would not work too.
4886
4887 This still respects user settings GRUB_DISABLE_LINUX_UUID. Not sure what we
4888 should do in this case.
4889
4890 Closes: 45709
4891
4892 2016-01-22 Vladimir Serbinenko <phcoder@gmail.com>
4893
4894 Error out if mtools invocation fails.
4895
4896 arm64: Add support for relocations needed for linaro gcc
4897
4898 efiemu: Fix compilation failure
4899
4900 Document cpuid -p
4901
4902 2016-01-22 Robert Elliott <elliott@hpe.com>
4903
4904 efiemu: Handle persistent RAM and unknown possible future additions.
4905
4906 2016-01-22 Vladimir Serbinenko <phcoder@gmail.com>
4907
4908 Document expr1 expr2 syntax for test command
4909
4910 2016-01-22 Michael Chang <mchang@suse.com>
4911
4912 Restore terminal settings on grub-emu exit.
4913
4914 2016-01-22 Vladimir Serbinenko <phcoder@gmail.com>
4915
4916 xen_boot: Remove obsolete module type distinctions.
4917
4918 arm: Ignore qemu clock bug
4919
4920 i386-ieee1275: Increase maximum heap size to accomodate highres graphi tests
4921
4922 2016-01-20 Colin Watson <cjwatson@ubuntu.com>
4923
4924 Remove pragmas related to -Wunreachable-code
4925 -Wunreachable-code has been a no-op since GCC 4.5; GRUB hasn't been
4926 compiled with it since 2012; and GCC 6 produces "error:
4927 '-Wunreachable-code' is not an option that controls warnings" for these.
4928
4929 Fixes Debian bug #812047.
4930
4931 2016-01-16 Colin Watson <cjwatson@ubuntu.com>
4932
4933 loader/bsd: Fix signed/unsigned comparison
4934
4935 ahci, ehci: Fix typos
4936
4937 2016-01-16 Andrei Borzenkov <arvidjaar@gmail.com>
4938
4939 grub-probe: fix memory leak
4940 Found by: Coverity scan.
4941 CID: 73783
4942
4943 2016-01-16 Andrei Borzenkov <arvidjaar@gmail.com>
4944
4945 tftp: fix memory leaks in open
4946 If protocol open fails, file is immediately freed, so data was leaked.
4947
4948 Found by: Coverity scan.
4949 CID: 96659
4950
4951 2016-01-16 Andrei Borzenkov <arvidjaar@gmail.com>
4952
4953 tcp: fix memory leaks
4954 Found by: Coverity scan.
4955 CID: 96639, 96647
4956
4957 net: fix memory leaks
4958 Found by: Coverity scan.
4959 CID: 96638, 96648
4960
4961 legacycfg: fix memory leaks and add NULL check
4962 Memory leaks found by Coverity scan.
4963 CID: 96642, 96645
4964
4965 2016-01-15 Andrei Borzenkov <arvidjaar@gmail.com>
4966
4967 loader: Unintended sign extension
4968 CID: 96707, 96699, 96693, 96691, 96711, 96709, 96708, 96703, 96702,
4969 96700, 96698, 96696, 96695, 96692, 96710, 96705
4970
4971 2016-01-12 Andrei Borzenkov <arvidjaar@gmail.com>
4972
4973 script: fix memory leak
4974 Found by: Coverity scan.
4975 CID: 96637
4976
4977 normal: fix memory leak
4978 Found by: Coverity scan.
4979 CID: 96641, 96670, 96667
4980
4981 xnu: fix memory leak
4982 Found by: Coverity scan.
4983 CID: 96663
4984
4985 truecrypt: fix memory leak
4986 Found by: Coverity scan.
4987 CID: 156611
4988
4989 gfxmenu: fix memory leak
4990 Found by: Coverity scan.
4991 CID: 96657
4992
4993 efiemu: fix memory leak
4994 Found by: Coverity scan.
4995 CID: 156610
4996
4997 efidisk: fix memory leak
4998 Found by: Coverity scan.
4999 CID: 96644
5000
5001 verify: fix memory leak
5002 Found by: Coverity scan.
5003 CID: 96643
5004
5005 password_pbkdf2: fix memory leak
5006 Found by: Coverity scan.
5007 CID: 96656
5008
5009 parttool: fix memory leak
5010 Found by: Coverity scan.
5011 CID: 96652
5012
5013 2016-01-12 Andrei Borzenkov <arvidjaar@gmail.com>
5014
5015 nativedisk: fix memory leak
5016 Based on Coverity scan.
5017 CID: 96660
5018
5019 Extended to also cover other error return places.
5020
5021 2016-01-12 Andrei Borzenkov <arvidjaar@gmail.com>
5022
5023 acpi: fix memory leak
5024 Found by: Coverity scan.
5025 CID: 96673
5026
5027 2016-01-10 Andrei Borzenkov <arvidjaar@gmail.com>
5028
5029 grub-install: include ehci in list of native modules
5030 This matches behavior of "nativedisk" command.
5031
5032 Reported and tested by Smith Henry <sh37092@gmail.com>
5033
5034 2016-01-10 Andrei Borzenkov <arvidjaar@gmail.com>
5035
5036 grub-mkimage: remove redundant NULL check
5037 Found by: Coverity scan.
5038 CID: 73737
5039
5040 2016-01-10 Andrei Borzenkov <arvidjaar@gmail.com>
5041
5042 net: remove dead and redundant code
5043 server cannot be NULL at this point (we return error earlier if it is).
5044 Also structure is zalloc'ed, so no need to explicitly initialize
5045 members to 0.
5046
5047 Found by: Coverity scan.
5048 CID: 73837
5049
5050 2016-01-10 Andrei Borzenkov <arvidjaar@gmail.com>
5051
5052 hostdisk: fix device detection
5053 Condition was apparently reversed so GRUB assumed all devices were
5054 files. This later made it skip BLKFLSBUF ioctl on Linux which caused
5055 various page cache coherency issues. Observed were
5056
5057 - failure to validate blocklist install (read content did not match
5058 just written)
5059
5060 - failure to detect Linux MD on disk after online hot addition
5061 (GRUB got stale superblock)
5062
5063 Closes: 46691
5064
5065 2016-01-09 Andrei Borzenkov <arvidjaar@gmail.com>
5066
5067 setup: fix NULL pointer dereference
5068 Check return value of grub_guess_root_devices
5069
5070 Found by: Coverity scan.
5071 CID: 73638, 73751
5072
5073 2016-01-09 Andrei Borzenkov <arvidjaar@gmail.com>
5074
5075 mkimage: fix unintended sign extension
5076 Found by: Coverity scan.
5077 CID: 73691, 73717
5078
5079 2016-01-09 Andrei Borzenkov <arvidjaar@gmail.com>
5080
5081 util/getroot: delete dead code
5082 is_part cannot be non-zero at this point.
5083
5084 Found by: Coveruty scan.
5085 CID: 73838
5086
5087 2016-01-09 Andrei Borzenkov <arvidjaar@gmail.com>
5088
5089 loader/multiboot: fix unintended sign extension
5090 Found by: Coveruty scan.
5091 CID: 73700, 73763
5092
5093 kern/elf: fix unintended sign extension
5094 Found by: Coverity scan.
5095 CID: 73729, 73735, 73758, 73760
5096
5097 2016-01-09 Andrei Borzenkov <arvidjaar@gmail.com>
5098
5099 xfs: fix possible inode corruption in directory scan
5100 grub_xfs_iterate_dir did not restore first character after inline
5101 name when match was found. Dependning on XFS format this character
5102 could be inode number and we could return to the same node later in
5103 find_file if processing cycled symlinks.
5104
5105 CID: 86724
5106
5107 2016-01-09 Andrei Borzenkov <arvidjaar@gmail.com>
5108
5109 rescue_parser: restructure code to avoid Coverity false positive
5110 If line contains single word, line and argv[0] are aliases, so
5111 no NULL dereference is possible, but Coverity does not know it.
5112 Change code to avoid ambiguity and also remove redundant call to
5113 grub_strchr.
5114
5115 CID: 86725
5116
5117 2016-01-09 Andrei Borzenkov <arvidjaar@gmail.com>
5118
5119 grub-mklayout: check subscript bounds
5120 Found by: Coverity scan.
5121 CID: 73686
5122
5123 grub-probe: fix memory leak
5124 Found by: Coverity scan.
5125 CID: 73783
5126
5127 gfxmenu: fix memory leak
5128 Found by: Coverity scan.
5129 CID: 73766
5130
5131 2016-01-09 Andrei Borzenkov <arvidjaar@gmail.com>
5132
5133 util/setup: fix grub_util_path_list leak
5134 Add helper grub_util_free_path_list and use it where appropriate.
5135
5136 Found by: Coverity scan.
5137 CID: 73727
5138
5139 2016-01-09 Andrei Borzenkov <arvidjaar@gmail.com>
5140
5141 setup: fix memory leak
5142 Found by: Coverity scan.
5143 CID: 73680, 73715
5144
5145 efiemu: check return value of grub_efiemu_write_value
5146 Found by: Coverity scan.
5147 CID: 73590
5148
5149 efiemu: change code to avoid Coverity false positive
5150 CID: 73623
5151
5152 efiemu: fix unintended sign extension
5153 Found by: Coverity scan.
5154 CID: 73883, 73637
5155
5156 hfs: fix memory leak
5157 Found by: Coverity scan.
5158 CID: 156531
5159
5160 grub-module-verifier: fix unintended sign extension
5161 Found by: Coverity scan.
5162 CID: 156533, 156532
5163
5164 2016-01-08 Vladimir Serbinenko <phcoder@gmail.com>
5165
5166 Tests: Support arm-efi
5167
5168 2016-01-07 Vladimir Serbinenko <phcoder@gmail.com>
5169
5170 arm64/setjmp: Add missing move for arg1 == 0 case.
5171
5172 grub-shell: Support arm64-efi
5173
5174 2016-01-07 Mark Salter <msalter@redhat.com>
5175
5176 arm-efi: Reduce timer event frequency by 10
5177 Timer event to keep grub msec counter was running at 1000HZ. This was too
5178 fast for UEFI timer driver and resulted in a 10x slowdown in grub time
5179 versus wallclock. Reduce the timer event frequency and increase tick
5180 increment accordingly to keep better time.
5181
5182 2016-01-07 Vladimir Serbinenko <phcoder@gmail.com>
5183
5184 x86_64-efi: Automatically add -bios OVMF.fd to qemu in tests.
5185
5186 Allow GRUB_QEMU_OPTS to override machine.
5187
5188 arm64: Disable tests that need native drivers.
5189
5190 Disable NetBSD bootcheck on EFI until it supports ACPI on EFI.
5191
5192 grub-shell: Use new cbfstool syntax.
5193
5194 grub-shell: On i386-ieee1275 don't try to switch to console.
5195 console goes to serial as well, so this doesn't stop garbage from going
5196 to serial. But it creates garbage itself.
5197
5198 hddboot_test: reenable on OVMF
5199 OVMF now supports booting from disks.
5200
5201 iee1275/datetime: Fix off-by-1 error.
5202
5203 2016-01-07 Vladimir Serbinenko <phcoder@gmail.com>
5204
5205 Adjust bootcheck tests for multiboot/coreboot/qemu to match real support.
5206 coreboot has ACPI while 2 others don't. *BSD need ACPI and have trouble
5207 without it. Don't even attempt to boot *BSD on multiboot or qemu targets.
5208
5209 On coreboot boot all *BSD except 32-bit NetBSD which apparently does some
5210 early BIOS calls.
5211
5212 2016-01-05 Vladimir Serbinenko <phcoder@gmail.com>
5213
5214 minixfs_test: Check if mkfs.minixfs supports -B option.
5215
5216 Add memdisk support to grub-emu.
5217 Use it to add custom files, so that tests which need them work.
5218
5219 Move file loading functions to grub-emu.
5220 So that we can use it in grub-emu as well as utils.
5221
5222 Disable progress indicator in grub-shell.
5223 This disables progress indicator for tests. This in turn fixes test
5224 flakiness as they ended up timing-dependent.
5225
5226 Update checksums
5227
5228 2016-01-02 Andrei Borzenkov <arvidjaar@gmail.com>
5229
5230 acpihalt: add GRUB_ACPI_OPCODE_CREATE_DWORD_FIELD (0x8a)
5231 Fixes ACPI halt on ASUSTeK P8B75-V,
5232 Bios: American Megatrends v: 0414 date: 04/24/2012
5233
5234 Reported-By: Goh Lip <g.lip@gmx.com>
5235
5236 2016-01-02 Andrei Borzenkov <arvidjaar@gmail.com>
5237
5238 acpihalt: fix GRUB_DSDT_TEST compilation
5239
5240 2016-01-01 Andrei Borzenkov <arvidjaar@gmail.com>
5241
5242 Add missing BUILD_EXEEXT
5243
5244 2015-12-31 Vladimir Serbinenko <phcoder@gmail.com>
5245
5246 configure.ac: Reorder efiemu check to after link format check.
5247 efiemu is supposed to be disabled when compiling through exe format.
5248 Unfortunately format was determined only after efiemu check. Reorder to fix the
5249 problem
5250
5251 2015-12-31 Andrey Borzenkov <arvidjaar@gmail.com>
5252
5253 remove temporary .bin files (kernel and modules)
5254
5255 add dejavu built fonts to cleanfiles
5256
5257 2015-12-31 Andrei Borzenkov <arvidjaar@gmail.com>
5258
5259 Add grub-module-verifier files to EXTRA_DIST
5260
5261 2015-12-31 Vladimir Serbinenko <phcoder@gmail.com>
5262
5263 configure: Add -fno-unwind-tables if supported.
5264 Unwind tables are useless for us bt consume space if present. Ensure that they
5265 are not.
5266
5267 module-verifier: allow limited-range relocations on sparc64.
5268 clang as incomplete mcmodel=large support. As we don't currently need full
5269 mcmodel=large support for sparc64, relax those checks.
5270
5271 Disable build-time module check on emu.
5272 On emu some checks can be laxer like check for relocation range. Additionally
5273 module loading in emu is rarely used. So skip this check rather than making
5274 it laxer for all platforms. In ideal we may want to have slightly different
5275 check for emu but for now this is good enough.
5276
5277 configure: Fix grub_cv_cc_fno_unwind_tables check.
5278 Check tries -fno-dwarf2-cfi-asm but adds -fno-asynchronous-unwind-tables
5279 to TARGET_CFLAGS. Fix this.
5280
5281 Add -mno-stack-arg-probe on mingw.
5282 This argument disables generation of calls to __chkstk_ms. Those calls are
5283 useless on GRUB as function is dummy. Yet they increase module size and
5284 use limited-range relocations which may not work under some memory layouts.
5285 We currently don't use such layouts on concerned platforms but lt's correct
5286 this.
5287
5288 Strip .ARM.exidx
5289 This section is generated by clang and is useful only for debugging.
5290 It contains exotic relocations, so strip them to avoid them interferring
5291 with module loading.
5292
5293 module-verifier: Check range-limited relative relocations.
5294 Check that they point to the same module, so will end up in the same
5295 chunk of memory.
5296
5297 xen/relocator: Use local symbol to ensure that code is relocation-free.
5298
5299 backtrace: Fix register call syntax
5300
5301 Verify modules on build-time rather than failing in runtime.
5302
5303 sparc64: Fix assembly to let compiler to fill in memory references.
5304 This fixes the use of not fully relocatable (they assume that variables are
5305 under 4G limit in virtual memory) references.
5306
5307 2015-12-30 Andrey Borzenkov <arvidjaar@gmail.com>
5308
5309 30_os-prober: derive --class from os-prober generated label
5310 Currently only Windows gets distinguished icons, everything else is displayed
5311 using the same generic one. Add additional --class based on os-prober returned
5312 label, which usually is expected to match primary distribution name.
5313
5314 Also use it for Windows as well - chainloader prober may actually return
5315 different strings (Windows, MS-DOS, Windows9xME).
5316
5317 2015-12-30 Vladimir Serbinenko <phcoder@gmail.com>
5318
5319 backtrace: Remove assembly assumption that grub_backtrace_pointer is under 4G
5320
5321 2015-12-30 Andrei Borzenkov <arvidjaar@gmail.com>
5322
5323 menu: fix line count calculation for long lines
5324 It gave one extra screen line if length was exactly equal to screen
5325 width.
5326
5327 Reported by Michael Chang.
5328 Also-By: Michael Chang <mchang@suse.com>
5329
5330 2015-12-29 Vladimir Serbinenko <phcoder@gmail.com>
5331
5332 grub-mkrescue: Delete temporary file
5333 Reported by: Thomas Schmitt
5334
5335 grub-mount: Fix oath parsing.
5336 Brackets detection was copied from somewhere else and makes no sense in case
5337 of grub-mount and prevents user from accessing and files with ) in them.
5338
5339 exfat: Fix stream extension flag parsing.
5340
5341 2015-12-26 Andrei Borzenkov <arvidjaar@gmail.com>
5342
5343 devmapper: check for valid device abstraction in get_grub_dev
5344 This was lost when code was refactored. Patch restores previous behavior.
5345
5346 It is still not clear whether this is the right one. Due to the way we
5347 detect DM abstraction, partitions on DM are skipped, we fall through to
5348 generic detection which ends up in assuming parent device is BIOS disk.
5349
5350 It is useful to install GRUB on VM disk from the host. But it also means
5351 that GRUB will mistakenly allow install on real system as well.
5352
5353 For now let's fix regression; future behavior needs to be discussed.
5354
5355 Closes: 45163
5356
5357 2015-12-19 Andrei Borzenkov <arvidjaar@gmail.com>
5358
5359 windows: correct LBA in generated EFI HDD media paths
5360 GRUB keeps partition offset and size in units of 512B sectors. Media paths
5361 are defined in terms of LBA which are presumed to match HDD sector size.
5362
5363 This is probably cosmetic (EFI requires that partition is searched by GUID)
5364 and still incorrect if GPT was created using different logical block size.
5365 But current code is obviously wrong and new has better chances to be correct.
5366
5367 2015-12-17 Robert Elliott <elliott@hpe.com>
5368
5369 lsefimmap: support persistent memory and other UEFI 2.5 features
5370 This should accompany
5371 76ce1de740 Translate UEFI persistent memory type
5372
5373 1. Add a string for the EfiPersistentMemory type 14 that was
5374 added in UEFI 2.5.
5375
5376 2. Decode the memory attributes that were added in UEFI 2.5:
5377 * NV (non-volatile)
5378 * MORE_RELIABLE (higher reliable, e.g., mirrored memory in a system
5379 with partial memory mirroring)
5380 * RO (read-only)
5381
5382 3. Use proper IEC binary units (KiB, MiB, etc.) for power-of-two
5383 values rather than misusing SI power-of-ten units (KB, MB, etc.)
5384
5385 4. The lsmmap command only decodes memory ranges sizes up to GiB scale
5386 units. Persistent memory ranges will reach into the TiB scale.
5387 Since 64-bit size field supports TiB, PiB, and EiB, decode all of
5388 them for completeness.
5389
5390 5. In the lsefimmap command, rewrite the print statements to
5391 * avoid rounding
5392 * avoid a big nested if/else tree.
5393
5394 For example: In the sixth entry below, the value of 309MB implies
5395 316416KB but is really reporting 316436KB.
5396
5397 Widen the size column to 6 digits to accommodate typical cases.
5398 The worst case value would require 14 digits; if that happens,
5399 let the columns get out of sync.
5400
5401 Old format:
5402 Type Physical start - end #Pages Size Attributes
5403 conv-mem 0000000000000000-0000000000092fff 00000093 588KB UC WC WT WB
5404 reserved 0000000000093000-0000000000093fff 00000001 4KB UC WC WT WB
5405 conv-mem 0000000000094000-000000000009ffff 0000000c 48KB UC WC WT WB
5406 conv-mem 0000000000100000-000000000fffffff 0000ff00 255MB UC WC WT WB
5407 BS-code 0000000010000000-0000000010048fff 00000049 292KB UC WC WT WB
5408 conv-mem 0000000010049000-000000002354dfff 00013505 309MB UC WC WT WB
5409 ldr-data 000000002354e000-000000003ecfffff 0001b7b2 439MB UC WC WT WB
5410 BS-data 000000003ed00000-000000003ed7ffff 00000080 512KB UC WC WT WB
5411 conv-mem 000000003ed80000-000000006af5ffff 0002c1e0 705MB UC WC WT WB
5412 reserved 000000006af60000-000000006b55ffff 00000600 6MB UC WC WT WB
5413 BS-data 000000006b560000-000000006b560fff 00000001 4KB UC WC WT WB
5414 RT-data 000000006b561000-000000006b5e1fff 00000081 516KB RT UC WC WT WB
5415 BS-data 000000006b5e2000-000000006ecfafff 00003719 55MB UC WC WT WB
5416 BS-code 000000006ecfb000-000000006ecfbfff 00000001 4KB UC WC WT WB
5417 conv-mem 000000006ecfc000-00000000711fafff 000024ff 36MB UC WC WT WB
5418 BS-data 00000000711fb000-000000007128dfff 00000093 588KB UC WC WT WB
5419 Unk 0d 0000000880000000-0000000e7fffffff 00600000 24GB UC WC WT WB NV
5420 reserved 0000001680000000-0000001c7fffffff 00600000 24GB UC WC WT WB NV
5421
5422 New format:
5423 Type Physical start - end #Pages Size Attributes
5424 conv-mem 0000000000000000-0000000000092fff 00000093 588KiB UC WC WT WB
5425 reserved 0000000000093000-0000000000093fff 00000001 4KiB UC WC WT WB
5426 conv-mem 0000000000094000-000000000009ffff 0000000c 48KiB UC WC WT WB
5427 conv-mem 0000000000100000-000000000fffffff 0000ff00 255MiB UC WC WT WB
5428 BS-code 0000000010000000-0000000010048fff 00000049 292KiB UC WC WT WB
5429 conv-mem 0000000010049000-000000002354dfff 00013505 316436KiB UC WC WT WB
5430 ldr-data 000000002354e000-000000003ecfffff 0001b7b2 450248KiB UC WC WT WB
5431 BS-data 000000003ed00000-000000003ed7ffff 00000080 512KiB UC WC WT WB
5432 conv-mem 000000003ed80000-000000006af5ffff 0002c1e0 722816KiB UC WC WT WB
5433 reserved 000000006af60000-000000006b55ffff 00000600 6MiB UC WC WT WB
5434 BS-data 000000006b560000-000000006b560fff 00000001 4KiB UC WC WT WB
5435 RT-data 000000006b561000-000000006b5e1fff 00000081 516KiB RT UC WC WT WB
5436 BS-data 000000006b5e2000-000000006ecfafff 00003719 56420KiB UC WC WT WB
5437 BS-code 000000006ecfb000-000000006ecfbfff 00000001 4KiB UC WC WT WB
5438 conv-mem 000000006ecfc000-0000000071222fff 00002527 38044KiB UC WC WT WB
5439 BS-data 0000000071223000-00000000712ddfff 000000bb 748KiB UC WC WT WB
5440 persist 0000000880000000-0000000e7fffffff 00600000 24GiB UC WC WT WB NV
5441 reserved 0000001680000000-0000001c7fffffff 00600000 24GiB UC WC WT WB NV
5442
5443 2015-12-16 Andrei Borzenkov <arvidjaar@gmail.com>
5444
5445 kernel: print and reset grub_errno after each embedded config line
5446 Otherwise it causes subsequent file open to fail, because grub_file_open
5447 misinterprets set grub_errno for grub_file_get_device_name failure.
5448
5449 Closes: 46540
5450
5451 2015-12-16 Andrei Borzenkov <arvidjaar@gmail.com>
5452
5453 Erase backspaced character in grub_username_get
5454 It probably does not work across linefeed, but hopefully user names are not
5455 that long (and nobody is using terminal that small).
5456
5457 2015-12-16 Hector Marco-Gisbert <hecmargi@upv.es>
5458
5459 Fix security issue when reading username and password
5460 This patch fixes two integer underflows at:
5461 * grub-core/lib/crypto.c
5462 * grub-core/normal/auth.c
5463
5464 CVE-2015-8370
5465
5466 Also-By: Andrey Borzenkov <arvidjaar@gmail.com>
5467
5468 2015-12-15 Andrei Borzenkov <arvidjaar@gmail.com>
5469
5470 NEWS: more additions
5471 Also-By: Robert Elliott <elliott@hpe.com>
5472
5473 2015-12-15 Robert Elliott <elliott@hpe.com>
5474
5475 Translate UEFI persistent memory type
5476 Define
5477 * GRUB_EFI_PERSISTENT_MEMORY (UEFI memory map type 14) per UEFI 2.5
5478 * GRUB_MEMORY_PERSISTENT (E820 type 7) per ACPI 3.0
5479 * GRUB_MEMORY_PERSISTENT_LEGACY (E820 unofficial type 12) per ACPI 3.0
5480
5481 and translate GRUB_EFI_PERSISTENT_MEMORY to GRUB_MEMORY_PERSISTENT in
5482 grub_efi_mmap_iterate().
5483
5484 Includes
5485 * adding the E820 names to lsmmap
5486 * handling the E820 types in make_efi_memtype()
5487
5488 Suggested-by: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>
5489 Suggested-by: Andrei Borzenkov <arvidjaar@gmail.com>
5490
5491 2015-12-14 Vladimir Serbinenko <phcoder@gmail.com>
5492
5493 Document bootlocation discovery limitations and xen platform limitations
5494
5495 2015-12-07 Josef Bacik <jbacik@fb.com>
5496
5497 tcp: ack when we get an OOO/lost packet
5498 While adding tcp window scaling support I was finding that I'd get some packet
5499 loss or reordering when transferring from large distances and grub would just
5500 timeout. This is because we weren't ack'ing when we got our OOO packet, so the
5501 sender didn't know it needed to retransmit anything, so eventually it would fill
5502 the window and stop transmitting, and we'd time out. Fix this by ACK'ing when
5503 we don't find our next sequence numbered packet. With this fix I no longer time
5504 out. Thanks,
5505
5506 2015-12-01 Michael Chang <mchang@suse.com>
5507
5508 i386: fix TSC calibration using PIT
5509 Condition was accidentally reversed, so PIT calibration always failed
5510 when PIT was present and always succeeded when PIT was missing, but in
5511 the latter case resulted in absurdly fast clock.
5512
5513 Reported and tested by Vitaly Kuznetsov <vkuznets@redhat.com>
5514
5515 2015-11-28 Andrei Borzenkov <arvidjaar@gmail.com>
5516
5517 Do not include generated gnulib headers in tarball
5518 gnulib files are already handled by recursive make distdir invocation.
5519 Including all generated headers (after make completed) causes build
5520 failure if target system is different (different compile version etc).
5521
5522 2015-11-27 Andrei Borzenkov <arvidjaar@gmail.com>
5523
5524 Replace numbers with grub_memory_type_t enums
5525
5526 2015-11-27 Andrei Borzenkov <arvidjaar@gmail.com>
5527
5528 configure: fix macports flex version detection
5529 Macports add extra information after version itself:
5530
5531 $flex --version
5532 flex 2.5.35 Apple(flex-31)
5533
5534 We require at least felx 2.5.35 so do not need to care about prehistoric
5535 "flex version n.n.n"; just use second field always.
5536
5537 Reported by Peter Cheung <mcheung63@hotmail.com>
5538
5539 2015-11-27 Vladimir Serbinenko <phcoder@gmail.com>
5540
5541 tsc: Use alternative delay sources whenever appropriate.
5542 PIT isn't available on some of new hardware including Hyper-V. So
5543 use pmtimer for calibration. Moreover pmtimer calibration is faster, so
5544 use it on coreboor where booting time is important.
5545
5546 Based on patch by Michael Chang.
5547
5548 2015-11-26 Andrei Borzenkov <arvidjaar@gmail.com>
5549
5550 efi: really mark memory of unknown type as reserved
5551 9be4c45dbe3c877d1f4856e99ee15133c6cd2261 added switch case between
5552 fall through cases, causing all memory regions of unknown type to be
5553 marked as available.
5554
5555 Move default case into its own block and add explicit FALLTHROUGH
5556 annotation.
5557
5558 Reported by Elliott, Robert (Persistent Memory) <elliott@hpe.com>
5559
5560 2015-11-24 Josef Bacik <jbacik@fb.com>
5561
5562 net: reset nb->data per dns record lookup loop
5563 We were resetting nb->data every time we tried a new server, but we need to do
5564 it every time we try for a different record, otherwise we don't end up falling
5565 back to the A record properly. Thanks,
5566
5567 2015-11-18 Andrei Borzenkov <arvidjaar@gmail.com>
5568
5569 unix: do not close stdin in grub_passwd_get
5570 This makes it impossible to read from stdin without controlling tty:
5571
5572 10:/mnt # echo -e passwd\\npasswd | setsid ./grub-mkpasswd-pbkdf2
5573 Enter password:
5574 Reenter password: ./grub-mkpasswd-pbkdf2: error: failure to read password.
5575 10:/mnt
5576
5577 2015-11-17 Andrei Borzenkov <arvidjaar@gmail.com>
5578
5579 lsefisystab: add missing comma after 7994077
5580
5581 2015-11-14 Pavel Bludov <pbludov@gmail.com>
5582
5583 Add some UUIDs found in the hardware
5584
5585 2015-11-13 Konstantin Vlasov <kvlasov@odin.com>
5586
5587 gfxterm: fix calculation of terminal-top and terminal-height
5588 They used screen width, not height.
5589
5590 2015-11-12 Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
5591
5592 ofdisk: add sas disks to the device list
5593
5594 2015-11-12 Vladimir Serbinenko <phcoder@gmail.com>
5595
5596 multiboot: Don't rely on particular ordering of options.
5597
5598 multiboot_mbi: Fix handling of --quirk-bad-kludge.
5599
5600 2015-11-12 Fu Wei <fu.wei@linaro.org>
5601
5602 xen_boot: Remove useless file_name_index variable.
5603
5604 Document ARM64 xen commands
5605
5606 2015-11-11 Vladimir Serbinenko <phcoder@gmail.com>
5607
5608 asm-tests/i386-pc: Check that near jumps are 2 bytes.
5609 We already check that jump over 300 bytes gap is 3 bytes in code16-mode.
5610 Some clang versions generate 3-byte opcode for short jumps which makes
5611 boot.img blow over 512-byte limit. Enforce -no-integrated-as in such cases
5612
5613 2015-11-11 Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
5614
5615 ofdisk: add a comment about vscsi method
5616
5617 2015-11-09 Vladimir Serbinenko <phcoder@gmail.com>
5618
5619 fdt.mod: Move license tag to the right file.
5620
5621 2015-11-09 Fu Wei <fu.wei@linaro.org>
5622
5623 fdt.mod: Add missing license tag.
5624
5625 2015-11-09 Vladimir Serbinenko <phcoder@gmail.com>
5626
5627 kern/elf: Ignore cast-align warnings
5628
5629 2015-11-09 Vladimir Serbinenko <phcoder@gmail.com>
5630
5631 cbfs: Fix corner case and compilation with recdent gcc
5632 Accept the header to touch the jump address at 0xfffffff0.
5633
5634 Fix compilation for 64-bit EFI with recent GCC.
5635
5636 2015-11-08 Vladimir Serbinenko <phcoder@gmail.com>
5637
5638 fstester: Enforce LC_ALL=C
5639
5640 Adapt build-system to use imported xen headers.
5641
5642 Import xen headers directly into GRUB
5643
5644 cbfs: Check for ptr range sanity.
5645 Triaged by Andrei and enhanced with suggestions by Aaron Durbin
5646 Also-By: Andrei Borzenkov <arvidjaar@gmail.com>
5647
5648 Remove reliance C.UTF-8
5649
5650 genmoddep.awk: Add a test that we have no circular dependencies
5651
5652 Makefile.core.def: Break circular dependency on arm64.
5653
5654 autogen: Use cp instead of ln -s.
5655 libgcrypt-grub shouldn't be modified directly anyway. With this patch
5656 tarball without contrib can be unpacked on FAT and stay usable for
5657 out-of-tree compile on full POSIX FS (compile on FAT not tested).
5658
5659 2015-11-07 Andrei Borzenkov <arvidjaar@gmail.com>
5660
5661 partmap_test: check that parted is available
5662 Skip test if parted is unavailable instead of returning false failure.
5663
5664 2015-11-07 grub-devel@iam.tj <grub-devel@iam.tj>
5665
5666 cryptodisk: teach grub_cryptodisk_insert() about partitions (bug #45889)
5667 It is not possible to configure encrypted containers on multiple partitions of
5668 the same disk; after the first one all subsequent fail with
5669
5670 disk/cryptodisk.c:978: already mounted as crypto0
5671
5672 Store partition offset in cryptomount descriptor to distinguish between them.
5673
5674 2015-11-07 Andrey Borzenkov <arvidjaar@gmail.com>
5675
5676 doc: document config_directory and config_file variables
5677
5678 2015-11-07 Andrei Borzenkov <arvidjaar@gmail.com>
5679
5680 unix/getroot: remove unused MAJOR definition
5681 We use major() everywhere, these definitions just add to confusion.
5682
5683 Add comments to code for commit d313218
5684
5685 2015-11-07 Andrei Borzenkov <arvidjaar@gmail.com>
5686
5687 devmapper/getroot: use makedev instead of direct shift
5688 Fixes device detection with large number of devices.
5689
5690 Reported by Tim Wallberg <twalberg@comcast.net>
5691
5692 2015-11-06 Andrei Borzenkov <arvidjaar@gmail.com>
5693
5694 mkimage: zero fill alignment space
5695 This did not cause real problem but is good for reproducible builds. I hit
5696 it with recent bootinfoscript that displays embedded config; I was puzzled
5697 by random garbage at the end.
5698
5699 Prezero memory buffer used to assemble core.img. This makes individual
5700 memset redundant. Also ensure buffer is filled with zeroes in several other
5701 places.
5702
5703 Also remove redundant zeroing code where we fill in the whole memory block
5704 anyway.
5705
5706 2015-11-06 Vladimir Serbinenko <phcoder@gmail.com>
5707
5708 configure.ac: Explicitly add -mno-sse3 on x86.
5709
5710 README: Remove dead link to the wiki
5711
5712 2015-10-29 Andrei Borzenkov <arvidjaar@gmail.com>
5713
5714 NEWS: mention powerpc64le support
5715
5716 2015-10-29 Ignat Korchagin <ignat>
5717
5718 tcp: Fix uninited mac address when accepting connection.
5719
5720 2015-10-29 Fu Wei <fu.wei@linaro.org>
5721
5722 arm64: Add support for xen boot protocol.
5723
5724 2015-10-29 Vladimir Serbinenko <phcoder@gmail.com>
5725
5726 arm64: Move FDT functions to separate module
5727
5728 2015-10-27 Andrei Borzenkov <arvidjaar@gmail.com>
5729
5730 efi: fix warnings with recent GCC
5731 ../../grub-core/term/efi/console.c:128:32: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
5732 if (key.unicode_char >= 0x20 && key.unicode_char <= 0x7f
5733
5734 2015-10-26 Eric Snowberg <eric.snowberg@oracle.com>
5735
5736 ofdisk: Fix devpath freeing logic.
5737
5738 2015-10-26 Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
5739
5740 Implement cross-endian ELF load for powerpc
5741
5742 2015-10-25 Peter Jones <pjones@redhat.com>
5743
5744 Use EFI_SIMPLE_TEXT_INPUT_EX to support key combinations.
5745
5746 2015-10-14 Andrei Borzenkov <arvidjaar@gmail.com>
5747
5748 configure: find options to force endian on MIPS
5749
5750 2015-10-14 Andrei Borzenkov <arvidjaar@gmail.com>
5751
5752 configure: force o32 ABI on MIPS
5753 GRUB code expects O32 or N32. N32 is less tested than O32, so we prefer to
5754 compile with O32. Some systems (e.g. GNU Guix) default to using newer
5755 n64 or n32 ABI. Try to find suitable options to force o32.
5756
5757 For GCC this is simply -mabi=32. While clang supports this option as well,
5758 o32 ABI is valid for MIPS target and n32/64 ABI are valid for MIPS64 target
5759 only, so use "-target mips/mipsel -mabi=32".
5760
5761 Reported-By: Mark H Weaver <mhw@netris.org>
5762 Also-By: Mark H Weaver <mhw@netris.org>
5763
5764 2015-10-12 Andrei Borzenkov <arvidjaar@gmail.com>
5765
5766 net: avoid closing NULL socket in DNS lookup
5767 Refactor code so that we do not store NULL pointers in array
5768 of in-flight DNS servers.
5769
5770 Reported-By: Josef Bacik <jbacik@fb.com>
5771
5772 2015-10-11 Andrei Borzenkov <arvidjaar@gmail.com>
5773
5774 install: --compress argument is not optional
5775 Fixes crash if argument is not specified. Also use `|' to separate choices
5776 in list of compression methods to align it with --core-compress.
5777
5778 2015-10-11 Vladimir Serbinenko <phcoder@gmail.com>
5779
5780 mips: Make setjmp code N32-compliant.
5781
5782 mips: Make the assembly-code N32-compatible.
5783 There are no $t4 or $t5 in N32 but there are $a4 and $a5.
5784
5785 2015-10-10 Andrei Borzenkov <arvidjaar@gmail.com>
5786
5787 progress: avoid NULL dereference for net files
5788 From original patch by dann frazier <dann.frazier@canonical.com>:
5789
5790 grub_net_fs_open() saves off a copy of the file structure it gets passed and
5791 uses it to create a bufio structure. It then overwrites the passed in file
5792 structure with this new bufio structure. Since file->name doesn't get set
5793 until we return back to grub_file_open(), it means that only the bufio
5794 structure gets a valid file->name. The "real" file's name is left
5795 uninitialized. This leads to a crash when the progress module hook is called
5796 on it.
5797
5798 grub_net_fs_open() already saved copy of file name as ->net->name, so change
5799 progress module to use it.
5800
5801 Also, grub_file_open may leave file->name as NULL if grub_strdup fails. Check
5802 for it.
5803
5804 Also-By: dann frazier <dann.frazier@canonical.com>
5805
5806 2015-10-10 Andrei Borzenkov <arvidjaar@gmail.com>
5807
5808 file: ignore host disk in blocklist check
5809 It cannot work anyway because host disk cannot be read. This fixes hostfs access
5810 on native Windows build where filenames start with '\' or do not have initial
5811 separator at all (d:\foo).
5812
5813 Issue was observed when running grub-fstest on Windows. On UNIX image name is
5814 canonicalized to always start with `/' so this was not noticed.
5815
5816 This has side effect of allowing relative path names on host, but this already
5817 was the case with `ls' command, so it just extends it to all commands.
5818
5819 Reported-By: Arch Stack <archstacker@gmail.com>
5820 Also-By: Arch Stack <archstacker@gmail.com>
5821
5822 2015-10-09 Vladimir Serbinenko <phcoder@gmail.com>
5823
5824 mips/dl: Handle addend in RELA entries.
5825
5826 gfxmenu/model: Delete empty file.
5827
5828 2015-10-09 Alexander Bluhm <bluhm@genua.de>
5829
5830 ufs: Fix parameters to grub_memset.
5831 len = 0 made simply no sense. Fix parameters to be in line with read.
5832
5833 2015-10-07 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
5834
5835 ofnet: Do not set SUFFIX for sun4v network devices
5836 sun4v vnet devices do not implement the support of duplex and speed
5837 instance attributes. An attempt to open such a device with
5838 the attributes will fail:
5839
5840 ok select net:speed=auto,duplex=auto
5841 Unknown key 'speed'
5842 Unknown key 'duplex'
5843 Manual Configuration: Host IP, boot server and filename must be specified
5844 WARNING: /virtual-devices@100/channel-devices@200/network@0: Can't open OBP standard TFTP package
5845
5846 Can't open device
5847 ok
5848
5849 Therefore, let's not set SUFFIX for such devices.
5850
5851 2015-10-07 Eric Snowberg <eric.snowberg@oracle.com>
5852
5853 sparc64 - use correct drive name within grub_util_sparc_setup
5854 Incorrect drive name was being passed into grub_util_sparc_setup,
5855 causing the grub-install to fail.
5856
5857 2015-09-13 Andrei Borzenkov <arvidjaar@gmail.com>
5858
5859 cryptodisk: strip parenthesis from backing device name
5860 Otherwise subsequent disk open fails.
5861
5862 Reported-By: Klemens Nanni <contact@autoboot.org>
5863
5864 2015-08-22 Felix Zielcke <fzielcke@z-51.de>
5865
5866 disk/ldm, partmap/msdos.c: fix spelling error
5867
5868 2015-08-13 Andrei Borzenkov <arvidjaar@gmail.com>
5869
5870 net: do not try to load protocol module via itself
5871 Otherwise we get infinite recursion.
5872
5873 Closes: 45729
5874
5875 2015-08-09 Josef Bacik <jbacik@fb.com>
5876
5877 efinet: handle get_status() on buggy firmware properly
5878 The EFI spec indicates that get_status() should return the address of the buffer
5879 we passed into transmit to indicate the the buffer was transmitted. However we
5880 have boxes where the firmware returns some arbitrary address instead, which
5881 makes grub think that we've not sent anything. So since we have the SNP stuff
5882 opened in exclusive mode just assume any non-NULL txbuf means that our transmit
5883 occurred properly. This makes grub able to do its networking stuff properly on
5884 our broken firmware. Thanks,
5885
5886 cc: Peter Jones <pjones@redhat.com>
5887
5888 2015-08-09 Andrei Borzenkov <arvidjaar@gmail.com>
5889
5890 linguas.sh: fix error when removing non-existing autogenerated files
5891
5892 2015-07-28 Vladimir Serbinenko <phcoder@gmail.com>
5893
5894 ahci: Ensure that bus mastering is set.
5895 Fixes ahci_test failing on several platforms.
5896
5897 2015-07-27 Vladimir Serbinenko <phcoder@gmail.com>
5898
5899 archelp: Never pass NULL as mtime.
5900 Moves complexity from fs code (NULL check) to common code (passing non-NULL).
5901
5902 HFS: Convert to fshelp.
5903 HFS doesn't handle "." and ".." properly. Convert it to fshelp to reuse the
5904 logic.
5905
5906 FAT: Convert to fshelp.
5907 exFAT doesn't handle "." and ".." correctly, convert it to fshelp to
5908 reuse the same logic.
5909
5910 BFS: Convert to fshelp.
5911 BFS doesn't handle ".." correctly, so convert it to fshelp to reuse the logic.
5912
5913 fshelp: Add handling of "." and ".." and grub_fshelp_find_file_lookup.
5914 Recent tests have discovered that many of our filesystems have flawed
5915 handling of "." and "..". Rather than attempting to fix it in filesystems
5916 themselves, make the common code fshelp aware of "." and ".." and handle
5917 them in this layer. Add grub_fshelp_find_file_lookup for easy conversion
5918 of BFS, HFS and exFAT which have the same problem and don't use fshelp.
5919
5920 Switch procfs to use archelp.
5921 This fixes handling of "." and "..".
5922
5923 grub-install: Use a+ in fopen rather than r+.
5924 r+ does not create a file if none exists.
5925
5926 Add transform_data as a variant of data with substitutions.
5927 This fixrs name mismatch for grub.chrp with
5928 transform_program_name='s,grub,grub2,g'
5929
5930 2015-07-24 Ignat Korchagin <ignat@cloudflare.com>
5931
5932 efi: fix GetVariable return status check in 81ca24a
5933 GetVariable should return EFI_BUFFER_TOO_SMALL if given buffer of size
5934 zero; commit incorrectly checked for EFI_SUCCESS.
5935
5936 2015-07-24 Vladimir Serbinenko <phcoder@gmail.com>
5937
5938 zfs_test: Skip dotdot in volume root test.
5939 Given special semantics of ZFS it's far from clear what the expected
5940 result is. Just skip it for now
5941
5942 xfs_test: Test both crc and non-crc filesystems.
5943
5944 xfs: Fix handling of symlink with crc-enabled filesystem.
5945
5946 reiserfs: Fix handling of first entry in the directory.
5947 Fixes garbage being added to "." filename.
5948
5949 2015-07-23 Ignat Korchagin <ignat@cloudflare.com>
5950
5951 efi: fix memory leak in variable handling
5952
5953 2015-07-23 Vladimir Serbinenko <phcoder@gmail.com>
5954
5955 exclude.pot: Add missing blacklisted strings.
5956
5957 archelp: Fix handling of dot and dotdot at the end of the name.
5958 Fixes cpio_test and tar_test.
5959
5960 arm-emu: Add __aeabi_memcpy* and __aeabi_memclr* symbols.
5961 Fixes compilation with clang.
5962
5963 2015-07-22 Vladimir Serbinenko <phcoder@gmail.com>
5964
5965 fwstart: Fix loading of address of read_spd_fail.
5966
5967 fwstart: Add missing argument to p2align.
5968 Resulting binary is unchanged as it happens we were already aligned
5969 by chance.
5970
5971 2015-07-22 Vladimir Serbinenko <phcoder@gmail.com>
5972
5973 fwstart: Replace blt with bltz.
5974 blt A, $zero, B and bltz A, B are equivalent but clang recognizes only
5975 later, so use it.
5976
5977 Resulting binary is unchanged.
5978
5979 2015-07-22 Vladimir Serbinenko <phcoder@gmail.com>
5980
5981 Remove mips_attributes.
5982 mips_attributes was introduced to work around clang problems with
5983 -msoft-float. Those problems are now fixed and moreover .gnu_attributes
5984 itself is unportable and creates problem with clang.
5985
5986 Revert "mips: Fix soft-float handling."
5987
5988 This partially reverts commit 6a4ecd276ed39f66be0ad6ff0f8ff67598098605.
5989
5990 2015-07-22 Vladimir Serbinenko <phcoder@gmail.com>
5991
5992 ARM: provide __aeabi_memclr* and __aeabi_memcpy* symbols
5993 Fixes compilation with recent clang.
5994
5995 diskfilter: Make name a const char to fix compilation error.
5996
5997 dmraid_nvidia: Set a name to usable value to avoid null dereference.
5998 Reported by: Andrei Borzenkov
5999
6000 configure.ac: Handle powerpc64le compiler
6001 Also-by: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
6002
6003 2015-07-20 Bernhard Übelacker <bernhardu@vr-web.de>
6004
6005 loader/linux: Make trailer initrd entry aligned again.
6006 Regression from commit:
6007 loader/linux: do not pad initrd with zeroes at the end
6008 a8c473288d3f0a5e17a903a5121dea1a695dda3b
6009
6010 Wimboot fails since the change above because it expects the "trailer"
6011 initrd element on an aligned address.
6012 This issue shows only when newc_name is used and the last initrd
6013 entry has a not aligned size.
6014
6015 2015-07-16 Vladimir Serbinenko <phcoder@gmail.com>
6016
6017 XFS: Fix wrong alignment treatment.
6018
6019 grub_ext2_read_block: Fix return type on error.
6020
6021 2015-07-05 Andrei Borzenkov <arvidjaar@gmail.com>
6022
6023 use TARGET_LDFLAGS in grub_PROG_OBJCOPY_ABSOLUTE
6024 That's what Makefile will use and it is required if unusual flags
6025 must be passed to linker (e.g. to build ppc32 code on ppc64le with clang).
6026
6027 2015-06-26 Michael Chang <mchang@suse.com>
6028
6029 Fix missing byte order conversion in get_btrfs_fs_prefix function
6030 Since btrfs on-disk format uses little-endian, the searched item types
6031 (ROOT_REF, INODE_REF) need converting the byte order in order to
6032 function properly on big-endian systems.
6033
6034 2015-06-26 Andrei Borzenkov <arvidjaar@gmail.com>
6035
6036 chainloader: fix resoource leak
6037 Found by: Coverity scan.
6038 CID: 96651
6039
6040 loader/bsd: fix memory leak
6041 Found by: Coverity scan.
6042 CID: 96662, 96665
6043
6044 2015-06-20 Andrei Borzenkov <arvidjaar@gmail.com>
6045
6046 loader/bsd: free memory leaks
6047 Found by: Coverity scan.
6048 CID: 96671, 96658, 96653
6049
6050 search_wrap: fix memory leak
6051 Found by: Coverity scan.
6052 CID: 96675
6053
6054 password_pbkdf2: fix memory leak
6055 Found by: Coverity scan.
6056 CID: 96676
6057
6058 normal: fix memory leak
6059 Found by: Coverity scan.
6060 CID: 96677
6061
6062 efi/serial: fix memory leak
6063 Found by: Coverity scan.
6064 CID: 96678
6065
6066 ohci: fix memory leak
6067 Found by: Coverity scan.
6068 CID: 96679
6069
6070 loader/bsd: free memory leaks
6071 Found by: Coverity scan.
6072 CID: 96682
6073
6074 multiboot: fix memory leak
6075 Found by: Coverity scan.
6076 CID: 96684
6077
6078 normal: fix memory leak
6079 Found by: Coverity scan.
6080 CID: 96685
6081
6082 loader/bsd: fix memory leak
6083 Found by: Coverity scan.
6084 CID: 96686
6085
6086 reed_solomon: fix memory leak
6087 Found by: Coverity scan.
6088 CID: 96688
6089
6090 usb: fix use after free
6091 Found by: Coverity scan.
6092 CID: 96704
6093
6094 xnu: fix use after free
6095 Found by: Coverity scan.
6096 CID: 96706
6097
6098 disk/scsi: fix use after free
6099 Found by: Coverity scan.
6100 CID: 96713
6101
6102 efi/chainloader: fix use after free
6103 Found by: Coverity scan.
6104 CID: 96714
6105
6106 search: fix use after free
6107 Found by: Coverity scan.
6108 CID: 96715
6109
6110 NEWS: emu libusb support removed
6111
6112 2015-06-19 Andrei Borzenkov <arvidjaar@gmail.com>
6113
6114 grub-probe: fix memory leak in probe (ofpath)
6115 Found by: Coverity scan.
6116 CID: 73772
6117
6118 2015-06-19 Andrei Borzenkov <arvidjaar@gmail.com>
6119
6120 grub-probe: restructure code to make static analysis easier
6121 Current code in probe() could not be verified to not contain memory leaks.
6122 Restructure code and ensure grub_device_close is always called at the end of
6123 loop.
6124
6125 Calms down Coverity scan.
6126 CID: 73739
6127
6128 2015-06-19 Andrei Borzenkov <arvidjaar@gmail.com>
6129
6130 zfs: fix memory leak
6131 Found by: Coverity scan.
6132 CID: 73647
6133
6134 xfs: silence Coverity overflow warning
6135 inode size cannot really overflow integer, but Coverity does not know it.
6136 CID: 96602
6137
6138 zfs: memory leak
6139 Found by Coverity scan.
6140 CID: 96603
6141
6142 unix/getroot: memory leak
6143 Found by Coverity scan.
6144 CID: 96605
6145
6146 unix/relpath: memory leak
6147 Found by Coverity scan.
6148 CID: 96606
6149
6150 2015-06-19 Andrei Borzenkov <arvidjaar@gmail.com>
6151
6152 syslinux_parse: assorted issues found by Coverity
6153 1. Remove unneeded NULL check
6154 CID: 96607
6155
6156 2. Do not allocate storage for initrd, copy it directly from input
6157 buffer. Avoids memory leak in failure path.
6158 CID: 96604
6159
6160 3. Unchecked error return from print()
6161 CID: 96601, 73595
6162
6163 2015-06-19 Andrei Borzenkov <arvidjaar@gmail.com>
6164
6165 syslinux_parse: make print_escaped actually stop before `to'
6166 The only current user is mboot.c32 which unfortunately is not covered
6167 by regression tests.
6168
6169 2015-06-18 Andrei Borzenkov <arvidjaar@gmail.com>
6170
6171 fat: fix handling of "." and ".." directory entries
6172 Emulate dot and dotdot in root directory. For other directories do not
6173 add separator between name and extension for these two special entries.
6174
6175 Closes: 45335
6176
6177 2015-06-18 Andrei Borzenkov <arvidjaar@gmail.com>
6178
6179 tests: regression tests for "." and ".." directory entries
6180
6181 2015-06-16 Andrei Borzenkov <arvidjaar@gmail.com>
6182
6183 efinet: enable hardware filters when opening interface
6184 Exclusive open on SNP will close all existing protocol instances which
6185 may disable all receive filters on interface. Reinstall them after we
6186 opened protocol exclusively.
6187
6188 Also follow UEFI specification recommendation and stop interfaces when
6189 closing them:
6190
6191 Unexpected system errors, reboots and hangs can occur if an OS is loaded
6192 and the network devices are not Shutdown() and Stopped().
6193
6194 Also by: Mark Salter <msalter@redhat.com>
6195 Closes: 45204
6196
6197 2015-06-16 Andrei Borzenkov <arvidjaar@gmail.com>
6198
6199 NEWS: mention libgcc removal
6200
6201 2015-06-15 Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
6202
6203 Add flag for powerpc ieee1275 to avoid unneeded optimizations
6204
6205 2015-06-12 Mark Salter <msalter@redhat.com>
6206
6207 Fix exit to EFI firmware
6208 The current code for EFI grub_exit() calls grub_efi_fini() before
6209 returning to firmware. In the case of ARM, this leaves a timer
6210 event running which could lead to a firmware crash. This patch
6211 changes this so that grub_machine_fini() is called with a NORETURN
6212 flag. This allows machine-specific shutdown to happen as well
6213 as the shutdown done by grub_efi_fini().
6214
6215 2015-06-12 Paul Menzel <paulepanter@users.sourceforge.net>
6216
6217 disk/ahci.c: Use defines `GRUB_AHCI_HBA_PORT_CMD_SPIN_UP` and `GRUB_AHCI_HBA_PORT_CMD_POWER_ON`
6218 Instead of hard coding `2` and `4` use the macros defined already at the
6219 top of the file. As a consequence, wrap the now too long line.
6220
6221 2015-06-12 Andrei Borzenkov <arvidjaar@gmail.com>
6222
6223 NEWS: XFS v5 support
6224
6225 2015-06-12 Jan Kara <jack@suse.cz>
6226
6227 xfs: V5 filesystem format support
6228 Add support for new XFS on disk format. We have to handle optional
6229 filetype fields in directory entries, additional CRC, LSN, UUID entries
6230 in some structures, etc.
6231
6232 xfs: Add helpers for inode size
6233 Add helpers to return size of XFS inode on disk and when loaded in
6234 memory.
6235
6236 2015-06-04 Toomas Soome <tsoome@me.com>
6237
6238 multiboot_header_tag_module_align fix to confirm multiboot specification
6239
6240 2015-06-02 Leif Lindholm <leif.lindholm@linaro.org>
6241
6242 configure.ac: clean up arm64 soft-float handling
6243 Fix compilation with gcc 5.1 (avoid internal compiler error), by
6244 replacing explicit -march +nofp+nosimd options with -mgeneral-regs-only.
6245
6246 This also enables the removal of some further conditional build flag
6247 setting.
6248
6249 2015-06-01 dann frazier <dann.frazier@canonical.com>
6250
6251 arm64/setjmp: Add missing license macro
6252 Including the setjmp module in an arm64-efi image will cause it to
6253 immediately exit with an "incompatible license" error.
6254
6255 The source file includes a GPLv3+ boilerplate, so fix this by declaring a
6256 GPLv3+ license using the GRUB_MOD_LICENSE macro.
6257
6258 2015-05-31 Paul Menzel <paulepanter@users.sourceforge.net>
6259
6260 disk/ahci.c: Add port number to port debug messages
6261 Currently, some messages cannot be mapped to the port they belong to as
6262 the port number is missing from the output. So add `port: n` to the
6263 debug messages.
6264
6265 2015-05-30 Andrei Borzenkov <arvidjaar@gmail.com>
6266
6267 Clarify use of superusers variable and menu entry access
6268 superusers controls both CLI and editing. Also explicitly mention that
6269 empty superusers disables them.
6270
6271 "Access to menuentry" is a bit vague - change to "execute menuentry"
6272 to make it obvious, what access is granted.
6273
6274 2015-05-30 Paul Menzel <paulepanter@users.sourceforge.net>
6275
6276 Correct spelling of *scheduled*
6277 Run the command below
6278
6279 $ git grep -l schedulded | xargs sed -i 's/schedulded/scheduled/g'
6280
6281 and revert the change in `ChangeLog-2015`.
6282
6283 Including "miscellaneous" spelling fix noted by richardvoigt@gmail.com
6284
6285 2015-05-30 Toomas Soome <tsoome@me.com>
6286
6287 zfs extensible_dataset and large_blocks feature support
6288 large blocks basically use extensible dataset feature, or to be exact,
6289 setting recordsize above 128k will trigger large_block feature to be
6290 enabled and storing such blocks is using feature extensible dataset. so
6291 the extensible dataset is prerequisite.
6292
6293 Changes implement read support extensible dataset… instead of fixed DMU
6294 types they dont specify type, making it possible to use fat zap objects
6295 from bonus area.
6296
6297 2015-05-27 Vladimir Serbinenko <phcoder@gmail.com>
6298
6299 multiboot1: never place modules in low memory.
6300 While in theory permitted by the spec, modules rarely fit in low memory
6301 anyway and not every kernel is able to handle modules in low memory anyway.
6302 At least VMWare is known not to be able to handle modules at arbitrary
6303 locations.
6304
6305 2015-05-24 Paul Menzel <paulepanter@users.sourceforge.net>
6306
6307 disk/ahci: Use defines `GRUB_ATA_STATUS_BUSY` and `GRUB_ATA_STATUS_DRQ`
6308 Instead of hard coding `0x88` use the macros defined in `disk/ata.h`.
6309
6310 2015-05-19 Paul Menzel <paulepanter@users.sourceforge.net>
6311
6312 cb_timestamps.c: Add new time stamp descriptions
6313 Add the descriptions of the “core”, that means no vendorcode or payload,
6314 coreboot time stamps added up to coreboot commit a7d92441 (timestamps:
6315 You can never have enough of them!) [1].
6316
6317 Running `coreboot_boottime` in the GRUB command line interface now shows
6318 descriptions for all time stamps again on the ASRock E350M1.
6319
6320 [1] http://review.coreboot.org/9608
6321
6322 2015-05-17 Andrei Borzenkov <arvidjaar@gmail.com>
6323
6324 bootp: ignore gateway_ip (relay) field.
6325 From RFC1542:
6326
6327 The 'giaddr' field is rather poorly named. It exists to facilitate
6328 the transfer of BOOTREQUEST messages from a client, through BOOTP
6329 relay agents, to servers on different networks than the client.
6330 Similarly, it facilitates the delivery of BOOTREPLY messages from the
6331 servers, through BOOTP relay agents, back to the client. In no case
6332 does it represent a general IP router to be used by the client. A
6333 BOOTP client MUST set the 'giaddr' field to zero (0.0.0.0) in all
6334 BOOTREQUEST messages it generates.
6335
6336 A BOOTP client MUST NOT interpret the 'giaddr' field of a BOOTREPLY
6337 message to be the IP address of an IP router. A BOOTP client SHOULD
6338 completely ignore the contents of the 'giaddr' field in BOOTREPLY
6339 messages.
6340
6341 Leave code ifdef'd out for the time being in case we see regression.
6342
6343 Suggested by: Rink Springer <rink@rink.nu>
6344 Closes: 43396
6345
6346 2015-05-17 Andrei Borzenkov <arvidjaar@gmail.com>
6347
6348 hostdisk: fix crash with NULL device.map
6349 grub-macbless calls grub_util_biosdisk_init with NULL device.map.
6350
6351 2015-05-14 Andrei Borzenkov <arvidjaar@gmail.com>
6352
6353 zfs: fix integer truncation in zap_lookup
6354 Size after shift could exceed 16 bits; use grub_unit32_t for result.
6355
6356 Reported and tested by: Kostya Berger <bergerkos@yahoo.co.uk>
6357 Closes: 44448
6358
6359 2015-05-13 Andrei Borzenkov <arvidjaar@gmail.com>
6360
6361 remove extra newlines in grub_util_* strings
6362 grub_util_{info,warn,error} already add trailing newlines, so remove
6363 them from format strings. Also trailing full stops are already added.
6364
6365 2015-05-12 Jan Kara <jack@suse.cz>
6366
6367 xfs: Convert inode numbers to cpu endianity immediately after reading
6368 Currently XFS driver converted inode numbers to native endianity only
6369 when using them to compute inode position. Although this works, it is
6370 somewhat confusing. So convert inode numbers when reading them from disk
6371 structures as every other field.
6372
6373 2015-05-11 Jan Kara <jack@suse.cz>
6374
6375 xfs: Fix termination loop for directory iteration
6376 Directory iteration used wrong position (sizeof wrong structure) for
6377 termination of iteration inside a directory block. Luckily the position
6378 ended up being wrong by just 1 byte and directory entries are larger so
6379 things worked out fine in practice. But fix the problem anyway.
6380
6381 2015-05-08 Andrei Borzenkov <arvidjaar@gmail.com>
6382
6383 acpi: do not skip BIOS scan if EBDA length is zero
6384 EBDA layout is not standardized so we cannot assume first two bytes
6385 are length. Neither is it required by ACPI standard. HP 8710W is known
6386 to contain zeroes here.
6387
6388 Closes: 45002
6389
6390 2015-05-07 Andrei Borzenkov <arvidjaar@gmail.com>
6391
6392 Add asm-tests to tarball
6393
6394 2015-05-07 Vladimir Serbinenko <phcoder@gmail.com>
6395
6396 util/grub-mkrescue: Fix compilation
6397
6398 2015-05-07 Andrei Borzenkov <arvidjaar@gmail.com>
6399
6400 efinet: open Simple Network Protocol exclusively
6401 EDK2 network stack is based on Managed Network Protocol which is layered
6402 on top of Simple Management Protocol and does background polling. This
6403 polling races with grub for received (and probably trasmitted) packets
6404 which causes either serious slowdown or complete failure to load files.
6405
6406 Open SNP device exclusively. This destroys all child MNP instances and
6407 stops background polling.
6408
6409 Exclusive open cannot be done when enumerating cards, as it would destroy
6410 PXE information we need to autoconfigure interface; and it cannot be done
6411 during autoconfiguration as we need to do it for non-PXE boot as well. So
6412 move SNP open to card ->open method and add matching ->close to clean up.
6413
6414 Based on patch from Mark Salter <msalter@redhat.com>
6415
6416 Also-By: Mark Salter <msalter@redhat.com>
6417 Closes: 41731
6418
6419 2015-05-07 Andrei Borzenkov <arvidjaar@gmail.com>
6420
6421 efinet: skip virtual IPv4 and IPv6 devices when enumerating cards
6422 EDK2 PXE driver creates two child devices - IPv4 and IPv6 - with
6423 bound SNP instance. This means we get three cards for every physical
6424 adapter when enumerating. Not only is this confusing, this may result
6425 in grub ignoring packets that come in via the "wrong" card.
6426
6427 Example of device hierarchy is
6428
6429 Ctrl[91] PciRoot(0x0)/Pci(0x3,0x0)
6430 Ctrl[95] PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)
6431 Ctrl[B4] PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)/IPv4(0.0.0.0)
6432 Ctrl[BC] PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)/IPv6(0000:0000:0000:0000:0000:0000:0000:0000)
6433
6434 Skip PXE created virtual devices when enumerating cards. Make sure to
6435 find real card when applying initial autoconfiguration during PXE boot,
6436 this information is associated with one of child devices.
6437
6438 2015-05-07 Andrei Borzenkov <arvidjaar@gmail.com>
6439
6440 efidisk: move device path helpers in core for efinet
6441
6442 convert to, not from, CPU byte order in DNS receive function
6443
6444 2015-05-07 Andrei Borzenkov <arvidjaar@gmail.com>
6445
6446 loader/linux: do not pad initrd with zeroes at the end
6447 Syslinux memdisk is using initrd image and needs to know uncompressed
6448 size in advance. For gzip uncompressed size is at the end of compressed
6449 stream. Grub padded each input file to 4 bytes at the end, which means
6450 syslinux got wrong size.
6451
6452 Linux initramfs loader apparently does not care about trailing alignment.
6453 So change code to align beginning of each file instead which atomatically
6454 gives us the correct size for single file.
6455
6456 Reported-By: David Shaw <dshaw@jabberwocky.com>
6457
6458 2015-05-07 Daniel Kiper <daniel.kiper@oracle.com>
6459
6460 i386/relocator: Remove unused extern grub_relocator64_rip_addr
6461
6462 2015-05-07 Vladimir Serbinenko <phcoder@gmail.com>
6463
6464 grub-install-common: Increase buf size to 8192 as modinfo.sh is bigger.
6465
6466 2015-05-07 Vladimir Serbinenko <phcoder@gmail.com>
6467
6468 grub-mkrescue: Recognize -output as an alias of --output.
6469 This helps us to be in line with xorriso -as mkisofs.
6470
6471 Suggested by: Thomas Schmitt
6472
6473 2015-05-07 Vladimir Serbinenko <phcoder@gmail.com>
6474
6475 linux.c: Ensure that initrd is page-aligned.
6476
6477 Revert parts accidentally committed 2 commits ago.
6478
6479 2015-05-07 Fu Wei <fu.wei@linaro.org>
6480
6481 fdt.h: Add grub_fdt_set_reg64 macro
6482
6483 arm64: Export useful functions from linux.c
6484
6485 2015-05-04 Andrei Borzenkov <arvidjaar@gmail.com>
6486
6487 Revert "efinet: memory leak on module removal"
6488 This reverts commits 47b2bee3ef0ea60fc3f5bfc37f3784e559385297
6489 and 8d3c4544ffdd0289a4b0bdeb0cdc6355f801a4b3. It is not safe
6490 to free allocated cards, dangling pointers main remain. Such
6491 cleanup requires more changes in net core.
6492
6493 efinet: cannot free const char * pointer
6494
6495 efinet: memory leak on module removal
6496
6497 2015-05-03 Andrei Borzenkov <arvidjaar@gmail.com>
6498
6499 zfs: add missing NULL check and fix incorrect buffer overwrite
6500 grub_memset should zero out padding after data end. It is not clear
6501 why it is needed at all - ZFS block is at least 512 bytes and power
6502 of two, so it is always multiple of 16 bytes. This grub_memset
6503 apparently never did anything.
6504
6505 2015-05-03 Toomas Soome <tsoome@me.com>
6506
6507 zfs: com.delphix:embedded_data feature support
6508
6509 zfs: com.delphix:hole_birth feature support
6510 In the past birth was always zero for holes. This feature started
6511 to make use of birth for holes as well, so change code to test for
6512 valid DVA address instead.
6513
6514 2015-04-29 Andrei Borzenkov <arvidjaar@gmail.com>
6515
6516 grub-mkconfig: use $pkgdatadir in scripts
6517 Otherwise scripts will source wrong grub-mkconfig_lib.
6518
6519 2015-04-24 Vladimir Serbinenko <phcoder@gmail.com>
6520
6521 Remove -V in grub-mkrescue.c
6522 It clashhes with -V which is alias to -volid.
6523
6524 2015-04-13 Toomas Soome <tsoome@me.com>
6525
6526 getroot: include sys/mkdev.h for makedev
6527 Solaris (like) systems need to include sys/mkdev.h for makedev() function.
6528
6529 2015-04-13 Toomas Soome <tsoome@me.com>
6530
6531 core/partmap: rename 'sun' to avoid clash with predefined symbol
6532 the symbol “sun” is defined macro in solaris derived systems, from
6533 gcc -dM -E:
6534
6535 and therefore can not be used as name.
6536
6537 2015-04-12 Paul Menzel <paulepanter@users.sourceforge.net>
6538
6539 docs/grub.texi: Fix spelling of cbfstool
6540
6541 2015-04-06 Andrei Borzenkov <arvidjaar@gmail.com>
6542
6543 core: avoid NULL derefrence in grub_divmod64s
6544 It can be called with NULL for third argument. grub_divmod32* for
6545 now are called only from within wrappers, so skip check.
6546
6547 Reported-By: Michael Zimmermann <sigmaepsilon92@gmail.com>
6548
6549 2015-03-28 Andrei Borzenkov <arvidjaar@gmail.com>
6550
6551 do not emit cryptomount without crypto UUID
6552
6553 2015-03-28 Sarah Newman <srn@prgmr.com>
6554
6555 grub-core/loader/i386/xen.c: Initialized initrd_ctx so we don't free a random pointer from the stack.
6556
6557 2015-03-27 Andrei Borzenkov <arvidjaar@gmail.com>
6558
6559 net: trivial grub_cpu_to_XX_compile_time cleanup
6560
6561 2015-03-27 Lunar <lunar@torproject.org>
6562
6563 syslinux: Support {vesa,}menu.c32.
6564
6565 2015-03-27 Steve McIntyre <steve@einval.com>
6566
6567 Recognize EFI platform even in case of mismatch between Linux and EFI.
6568 Some x86 systems might be capable of running a 64-bit Linux kernel but
6569 only use a 32-bit EFI (e.g. Intel Bay Trail systems). It's useful for
6570 grub-install to be able to recognise such systems, to set the default
6571 x86 platform correctly.
6572
6573 To allow grub-install to know the size of the firmware rather than
6574 just the size of the kernel, there is now an extra EFI sysfs file to
6575 describe the underlying firmware. Read that if possible, otherwise
6576 fall back to the kernel type as before.
6577
6578 2015-03-27 Michael Zimmermann <sigmaepsilon92@gmail.com>
6579
6580 Add missing initializers to silence suprious warnings.
6581
6582 2015-03-27 Leif Lindholm <leif.lindholm@linaro.org>
6583
6584 dl_helper: Cleanup
6585 Use the new thumb_get_instruction_word/thumb_set_instruction_word
6586 helpers throughout.
6587
6588 Style cleanup (missing spaces).
6589
6590 Move Thumb MOVW/MOVT handlers into Thumb relocation section of file.
6591
6592 2015-03-27 Martin Wilck <martin.wilck@ts.fujitsu.com>
6593
6594 efinet: Check for immediate completition.
6595 This both speeds GRUB up and workarounds unexpected EFI behaviour.
6596
6597 2015-03-27 Vladimir Serbinenko <phcoder@gmail.com>
6598
6599 Make Makefile.util.def independent of platform.
6600
6601 2015-03-27 Daniel Kahn Gillmor <dkg@fifthhorseman.net>
6602
6603 util/mkimage: Use stable timestamp when generating binaries.
6604
6605 2015-03-27 Vladimir Serbinenko <phcoder@gmail.com>
6606
6607 modinfo.sh.in: Add missing config variables.
6608
6609 Makefile.core.def: Remove obsolete LDADD_KERNEL
6610
6611 arp, icmp: Fix handling in case of oversized or invalid packets.
6612 This restrict ARP handling to MAC and IP addresses but in practice we need
6613 only this case anyway and other cases are very rar if exist at all. It makes
6614 code much simpler and less error-prone.
6615
6616 2015-03-23 Colin Watson <cjwatson@ubuntu.com>
6617
6618 hostfs: Drop unnecessary feature test macros
6619 _BSD_SOURCE was added to allow the use of DT_DIR, but that was removed
6620 in e768b77068a0b030a07576852bd0f121c9a077eb. While adding
6621 _DEFAULT_SOURCE as well works around problems with current glibc,
6622 neither is in fact needed nowadays.
6623
6624 2015-03-20 Vladimir Serbinenko <phcoder@gmail.com>
6625
6626 compiler-rt-emu: Add missing file.
6627
6628 emunet: Fix init error checking.
6629 Otherwise emunet doesn't expose any cards.
6630
6631 fddboot_test: Add -no-pad to xorriso.
6632
6633 grub-mkrescue: pass all unrecognized options unchanged to xorriso.
6634
6635 cacheinfo: Add missing license information.
6636
6637 2015-03-19 Andrei Borzenkov <arvidjaar@gmail.com>
6638
6639 grub-fs-tester: add LVM RAID1 support
6640 LVM miscalculates bitmap size with small extent, so start with 16K as
6641 for other RAID types.
6642
6643 Until version 2.02.103 LVM counts metadata segments twice when checking
6644 available space, reduce segment count by one to account for this bug.
6645
6646 2015-03-19 Andrei Borzenkov <arvidjaar@gmail.com>
6647
6648 core: add LVM RAID1 support
6649 Closes 44534.
6650
6651 2015-03-16 Andrei Borzenkov <arvidjaar@gmail.com>
6652
6653 grub-fs-tester: explicitly set segment type for LVM mirror
6654 LVM mirror defaults to RAID1 today and can be different on different
6655 systems as set in lvm.conf.
6656
6657 2015-03-15 Andrei Borzenkov <arvidjaar@gmail.com>
6658
6659 grub-fs-tester: better estimation of filesystem time for LVM/RAID
6660 Write activity with LVM/RAID can happen after filesystem is unmounted.
6661 In my testing modification time of loop files was 15 - 20 seconds
6662 after unmount. So use time as close to unmount as possible as
6663 reference instead.
6664
6665 2015-03-06 Vladimir Serbinenko <phcoder@gmail.com>
6666
6667 hfsplus: Fix potential access to uninited memory on invalid FS
6668
6669 2015-03-06 Jon McCune <jonmccune@google.com>
6670
6671 autogen.sh: Allow overriding the python to be used by setting $PYTHON.
6672 Some installations have several python versions installed. Allow user
6673 to choose which one to use by setting $PYTHON.
6674
6675 2015-03-05 Andrei Borzenkov <arvidjaar@gmail.com>
6676
6677 update gnulib/argp-help.c to fix garbage in grub-mknetdir --help output
6678 argp_help attempts to translate empty string, which results in printing
6679 meta information about translation, like in
6680
6681 bor@opensuse:~/build/grub> grub2-mknetdir --help
6682 Использование: grub2-mknetdir [ПАРАМЕТР…]
6683 Project-Id-Version: grub 2.02-pre2
6684 Report-Msgid-Bugs-To: bug-grub@gnu.org
6685 ...
6686
6687 Update gnulib/argp-help.c to the current version which fixes this
6688 (commit b9bfe78424b871f5b92e5ee9e7d21ef951a6801d).
6689
6690 2015-03-05 Andrey Borzenkov <arvidjaar@gmail.com>
6691
6692 update m4/extern-inline.m4 to upstream version to fix compilation on FreeBSD
6693 In file included from util/grub-mkimage.c:54:0:
6694 ./grub-core/gnulib/argp.h:627:49: error: '__sbistype' is static but
6695 used in inline function '_option_is_short' which is not static
6696 [-Werror] cc1: all warnings being treated as errors gmake[2]: ***
6697 [util/grub_mkimage-grub-mkimage.o] Error 1
6698
6699 Update m4/extern-inline.m4 to current upstream gnulib version that
6700 contains fix for this (commit b9bfe78424b871f5b92e5ee9e7d21ef951a6801d).
6701
6702 Reported-By: Beeblebrox <zaphod@berentweb.com>
6703
6704 2015-03-04 Vladimir Serbinenko <phcoder@gmail.com>
6705
6706 syslinux_parse: Fix the case of unknown localboot.
6707 Reported by: Jordan Uggla
6708
6709 configure.ac: Fix the name of pciaccess header.
6710
6711 Fix canonicalize_file_name clash.
6712 canonicalize_file_name clashed with gnulib function. Additionally
6713 it was declared in 2 places: emu/misc.h and util/misc.h. Added
6714 grub_ prefix and removed second declaration.
6715
6716 2015-03-03 Vladimir Serbinenko <phcoder@gmail.com>
6717
6718 Remove emu libusb support.
6719 It's disabled by default and has been broken for a long time.
6720 As nobody is interested in fixing and maintaining it, remove it.
6721
6722 configure.ac: Remove unused COND_clang
6723
6724 Remove libgcc dependency.
6725 libgcc for boot environment isn't always present and compatible.
6726 libgcc is often absent if endianness or bit-size at boot is different
6727 from running OS.
6728 libgcc may use optimised opcodes that aren't available on boot time.
6729 So instead of relying on libgcc shipped with the compiler, supply
6730 the functions in GRUB directly.
6731 Tests are present to ensure that those replacement functions behave the
6732 way compiler expects them to.
6733
6734 types.h: Use __builtin_bswap* with clang.
6735 clang pretends to be GCC 4.2 but we use __builtin_bswap* only with GCC 4.3+.
6736 clang support __builtin_bswap*, so use it.
6737
6738 configure.ac: Set $CPPFLAGS when checking for no_app_regs.
6739 Fixes compilation for sparc64 with clang.
6740
6741 Don't continue to query block-size if disk doesn't have it.
6742 Stops poluting screen with a lot of "block-size: exception -21".
6743
6744 2015-02-28 Andrei Borzenkov <arvidjaar@gmail.com>
6745
6746 grub-probe: free temporary variable
6747
6748 2015-02-28 Vladimir Serbinenko <phcoder@gmail.com>
6749
6750 exclude.pot: Add new technical strings
6751
6752 grub-probe: Mark a "[default=]" for translation.
6753
6754 grub-shell: Add missing --locale-directory.
6755 Fixes the language tests is no make install was done.
6756
6757 ntfs_test: Skip is setfattr is unavailable.
6758
6759 2015-02-26 Vladimir Serbinenko <phcoder@gmail.com>
6760
6761 emu/cache: Change declaration of __clear_cache to match builtin declaration.
6762 Fixes compile of arm64-emu.
6763
6764 arm/dl: Fix handling of nonstandard relocation sizes
6765
6766 gzio: Optimize by removing division.
6767
6768 raid6: Optimize by removing division.
6769
6770 dmraid_nvidia: Fix division by 0 and missing byte-swap.
6771
6772 crypto: restrict cipher block size to power of 2.
6773 All current ciphers have blocks which are power of 2 and it's
6774 unlikely to change. Other block length would be tricky to handle anyway.
6775 This restriction allows avoiding extra divisions.
6776
6777 jpeg: Optimise by replacing division with shifts.
6778
6779 png: Optimize by avoiding divisions.
6780
6781 Add missing lib/division.c
6782
6783 fbblit: Optimize by replacing division with additions and shifts.
6784
6785 bitmap_scale: Optimize by moving division out of the loop.
6786
6787 minilzo: Skip parts tha we don't need.
6788
6789 2015-02-23 Vladimir Serbinenko <phcoder@gmail.com>
6790
6791 mips: Fix soft-float handling.
6792 Add -msoft-float alongside clang arguments to specify ABI.
6793 Specify ABI in asm files explicitly.
6794 This trigers asm warning due to gcc failing to propagate -msoft-float
6795 but it's tolerable.
6796
6797 Add missing grub_ prefix in memcpy invocation
6798
6799 Allow clang compilation for thumb with -mthumb-interwork.
6800 clang already uses -mthumb-interwork behaviour even thout it doesn't
6801 support the option.
6802
6803 arm64: Fix compilation failure.
6804 Don't supply +nosimd to asm files.
6805 Otherwise +nosimd coming from flags forbids some of instructions
6806 used in cache_flush.
6807
6808 Supply signed division to fix ARM compilation.
6809 Previously we supplied only unsigned divisions on platforms that need software
6810 division.
6811 Yet compiler may itself use a signed division. A typical example would be a
6812 difference between 2 pointers which involves division by object size.
6813
6814 2015-02-22 Vladimir Serbinenko <phcoder@gmail.com>
6815
6816 acpi: Fix unused function warning.
6817
6818 configure.ac: Add ia64-specific way to disable floats.
6819
6820 i386/tsc: Fix unused function warning on xen.
6821
6822 2015-02-22 Vladimir Serbinenko <phcoder@gmail.com>
6823
6824 Experimental support for clang for sparc64.
6825 Automatically discover command line options to make clang and
6826 gcc behave in same way.
6827
6828 Tested with qemu.
6829
6830 2015-02-22 Vladimir Serbinenko <phcoder@gmail.com>
6831
6832 Discover which option provides soft-float on configure stage.
6833 Deals with clang needing other arguments to stop issuing floating
6834 instructions than gcc.
6835
6836 2015-02-21 Vladimir Serbinenko <phcoder@gmail.com>
6837
6838 mips: Switch to more portable .org
6839 Binary is unchanged.
6840
6841 sparc64: Switch to more portable .org.
6842 Binaries are unchanged.
6843
6844 kernel-8086: Switch to more portable .org.
6845
6846 Relax requirements on asm for non-BIOS i386 platforms.
6847 These platforms don't have a hard limit on size of resulting code16
6848 code, so we don't care if assembly is bigger than necessarry.
6849
6850 qemu: Switch to more portable .org
6851 Binary is checked identical.
6852
6853 qemu: Fix GateA20 enabling.
6854 GateA20 code was inactive due to address error.
6855
6856 qemu: Fix compilation
6857
6858 Remove realmode.S from coreboot and qemu.
6859 It's not used there.
6860
6861 Remove obsolete ADDR32 and DATA32 checks.
6862
6863 i386: Remove needless ADDR32 prefixes when address is known and fixed.
6864 Shaves off 6 bytes in lzma_decompress.img.
6865
6866 i386-pc/boot: Explicitly mark kernel_address[_high] as local.
6867 Otherwise apple asm might try to make accesses relocatable.
6868
6869 Change dot assignmnet to more portable .org.
6870 Binary is unchanged (verified)
6871
6872 i386: Move from explicit ADDR32/DATA32 prefixes to instruction suffixes.
6873 Is more portable.
6874 Binary is unchanged (verified).
6875
6876 Test which flags make our asm compile.
6877 Previously we relied on assumption that clang always needs -no-integrated-as
6878 but it's not always true.
6879
6880 INSTALL: clarify that clang support is experimental
6881
6882 zfs/mzap_lookup: Fix argument types
6883
6884 wildcard: Mark unused argument as such.
6885
6886 ofdisk: Exclude floppies from scanning.
6887 It causes similar hang as CD on at least the qemu.
6888
6889 configure: Add -msoft-float to CCASFLAGS
6890 Otherwise mismatch between API flags triggers linker failure
6891
6892 mips/startup_raw: Use more portable .asciz
6893
6894 Provide __aeabi_mem{cpy,set}
6895 Fixes ARM compilation
6896
6897 div_test: Don't try to divide by zero
6898
6899 INSTALL: Fix names of host flags to match actual behaviour
6900
6901 Strip .MIPS.abiflags which causes compile failure
6902
6903 2015-02-20 Vladimir Serbinenko <phcoder@gmail.com>
6904
6905 configure: Move adding of include options to the very end to avoid subshell.
6906
6907 configure: Add missing comma.
6908
6909 2015-02-16 Vladimir Serbinenko <phcoder@gmail.com>
6910
6911 ext2: Ignore INCOMPAT_MMP.
6912 It's not really incompatible as long as driver never writes to FS.
6913
6914 ext2: Support META_BG.
6915 This fixes bug that system would become unbootable after ext*
6916 online resize if no resize_inode was created at ext* format time.
6917
6918 2015-02-16 Andrei Borzenkov <arvidjaar@gmail.com>
6919
6920 tests: remove hardcoded paths from syslinux_test
6921 abs_top_srcdir appeared in Autoconf 2.52f. Minimal grub requirement
6922 is 2.60 so we should be good here.
6923
6924 build-sys: add syslinux test files to tarball
6925
6926 2015-02-16 Vladimir Serbinenko <phcoder@gmail.com>
6927
6928 Add test for syslinux converter
6929
6930 2015-02-16 Vladimir Serbinenko <phcoder@gmail.com>
6931
6932 Don't remove initrd= parameter.
6933 Based on simplified patch by Lunar.
6934
6935 Reported by: Lunar
6936
6937 2015-02-16 Vladimir Serbinenko <phcoder@gmail.com>
6938
6939 syslinux_parse: Always output comments even if no entries are found.
6940
6941 2015-02-15 Andrei Borzenkov <arvidjaar@gmail.com>
6942
6943 diskfilter_make_raid: more memory leaks in failure path
6944
6945 2015-02-14 Vladimir Serbinenko <phcoder@gmail.com>
6946
6947 disk/lvm: Use zalloc to ensure that segments are initialised to sane value.
6948 Reported by: EmanueL Czirai.
6949
6950 2015-02-14 Daniel Kiper <daniel.kiper@oracle.com>
6951
6952 multiboot2: Fix information request tag size calculation
6953
6954 2015-02-14 Andrei Borzenkov <arvidjaar@gmail.com>
6955
6956 diskfilter: fix double free of lv names for mdraid
6957 Avoid micro-optimization in grub_diskfilter_make_raid and make sure
6958 name and fullname are independent strings. This avoids need to special
6959 case it everywhere else.
6960
6961 Also fix memory leak in failure case in grub_diskfilter_make_raid.
6962
6963 Closes: 41582
6964
6965 2015-02-14 Andrei Borzenkov <arvidjaar@gmail.com>
6966
6967 diskfilter: fix crash in validate_lv for mdraid arrays
6968 Commit 750f4bacd3262376ced3f837d8dc78f834ca233a put LV validation before
6969 actual vg assignment. Make grub_diskfilter_make_raid to assign ->vg as
6970 happens in other cases for consistency. Also clean up redundant code and add
6971 explicit NULL lv->vg check in validate_lv.
6972
6973 Also fix segment validation in validate_lv; it became obvious when crash
6974 was fixed.
6975
6976 Closes: 44199
6977
6978 2015-02-12 Jiri Slaby <jslaby@suse.cz>
6979
6980 util: mkimage, fix gcc5 build failure
6981 gcc5 reports:
6982 ../util/mkimage.c: In function 'grub_install_get_image_target':
6983 ../util/mkimage.c:954:5: error: loop exit may only be reached after undefined behavior [-Werror=aggressive-loop-optimizations]
6984 && j < ARRAY_SIZE (image_targets[i].names); j++)
6985 ^
6986 ../util/mkimage.c:953:39: note: possible undefined statement is here
6987 for (j = 0; image_targets[i].names[j]
6988 ^
6989
6990 Well, let's move the index 'j' test before accesing the array to:
6991 1) make the loop obvious
6992 2) make gcc happy
6993
6994 2015-02-03 Leif Lindholm <leif.lindholm@linaro.org>
6995
6996 arm: implement additional relocations generated by gcc 4.9 at -O3
6997 GCC 4.9 also generates R_ARM_THM_MOVW_ABS_NC and R_ARM_THM_MOVT_ABS,
6998 as an alternative to ABS32.
6999
7000 2015-01-30 Andrei Borzenkov <arvidjaar@gmail.com>
7001
7002 setup: fix blocklist size calculation
7003 Found by: Coverity scan.
7004
7005 grub-fstest: fix descriptor leak
7006 Found by: Coverity scan.
7007
7008 2015-01-30 Andrei Borzenkov <arvidjaar@gmail.com>
7009
7010 net/pxe: fix error condition
7011 Test return value of grub_netbuff_reserve(), buf itself cannot be
7012 NULL here.
7013
7014 Found by: Coverity scan.
7015
7016 2015-01-30 Andrei Borzenkov <arvidjaar@gmail.com>
7017
7018 grub-mkimage: fix potential NULL pointer dereference
7019 Move fatal check whether symtab_section is NULL before first reference.
7020
7021 Found by: Coverity scan.
7022
7023 2015-01-30 Andrei Borzenkov <arvidjaar@gmail.com>
7024
7025 net/ip: check result of grub_netbuff_push
7026 Found by: Coverity scan.
7027
7028 tests: add test command file tests
7029 This requires access to files in both host and grub image, so
7030 implementing as separate test unit instead of script test was
7031 more easy.
7032
7033 test: consistently use TMPDIR and same name pattern for temp files
7034
7035 test: fix previous commit - we need to return from subexpression
7036 ( ... ) was processed recursively, we need to return from it. Revert
7037 this change.
7038
7039 test: do not stop after first file test or closing bracket
7040 Closes: 44115
7041
7042 2015-01-28 Leif Lindholm <leif.lindholm@linaro.org>
7043
7044 configure.ac: don't use -msoft-float for arm64
7045 aarch64 toolchains do not support the -msoft-float option added by
7046 commit 3661261f. Insted, for arm64 use -march=armv8-a+nofp+nosimd.
7047
7048 Reported-by: Ryan Harkin <ryan.harkin@linaro.org>
7049
7050 2015-01-28 Andrei Borzenkov <arvidjaar@gmail.com>
7051
7052 script/execute.c: fix memory leak.
7053 Make sure to continue loop over array after failure to free
7054 allocated strings.
7055
7056 Found by: Coverity scan.
7057
7058 2015-01-28 Andrei Borzenkov <arvidjaar@gmail.com>
7059
7060 syslinux_parse: fix memory leak.
7061 Found by: Coverity scan.
7062
7063 2015-01-27 Andrei Borzenkov <arvidjaar@gmail.com>
7064
7065 Change quotes to match overall style in NEWS
7066
7067 loader/xnu: fix memory leak.
7068 Foound by: Coverity scan.
7069
7070 util/grub-probe: fix memory leaks.
7071 Found by: Coverity scan.
7072
7073 fs/hfsplus: fix memory leak.
7074 Found by: Coverity scan.
7075
7076 fs/zfs/zfscrypt.c: fix indentation.
7077
7078 fs/zfs/zfscrypt.c: fix memory leaks.
7079 Found by: Coverity scan.
7080
7081 commands/parttool: fix memory leak.
7082 Found by: Coverity scan.
7083
7084 fs/zfs/zfs.c: fix memory leak.
7085 Found by: Coverity scan.
7086
7087 linux/ofpath: fix descriptor leak
7088 Found by: Coverity scan
7089
7090 linux/hostdisk: use strncpy instead of strlcpy
7091 strlcpy is not available on Linux as part of standard libraries.
7092 It probably is not worth extra configure checks espicially as we
7093 need to handle missing function anyway.
7094
7095 2015-01-27 Vladimir Serbinenko <phcoder@gmail.com>
7096
7097 Document intentional fallthroughs.
7098 Found by: Coverity scan.
7099
7100 linux/ofpath: Fix error handling.
7101 Found by: Coverity Scan.
7102
7103 linux/hostdisk: Limit strcpy size to buffer size.
7104 Found by: Coverity scan.
7105
7106 fs/zfscrypt: Add missing explicit cast.
7107 Found by: Coverity scan.
7108
7109 fs/zfs: Fix error handling.
7110 Found by: Coverity Scan.
7111
7112 2015-01-27 Vladimir Serbinenko <phcoder@gmail.com>
7113
7114 fs/{cbfs,cpio}: Remove useless check if mode is NULL.
7115 Callers already ensure that it's not null.
7116
7117 Found by: Coverity Scan.
7118
7119 2015-01-27 Vladimir Serbinenko <phcoder@gmail.com>
7120
7121 commands/acpi: Use ALIGN_UP rather than manual expression.
7122 Improves readability and hopefully automatic scanning.
7123
7124 Found by: Coverity Scan.
7125
7126 2015-01-26 Andrei Borzenkov <arvidjaar@gmail.com>
7127
7128 util/setup: fix memory leak.
7129 Found by: Coverity scan.
7130
7131 util/mkimage: fix memory leaks.
7132 Found by: Coverity scan.
7133
7134 util/grub-mount: fix descriptor leak.
7135 Found by: Coverity scan.
7136
7137 util/grub-mkstandalone: fix memory leak.
7138 Found by: Coverity scan.
7139
7140 util/grub-install: rearrange code to avoid memory leak.
7141 Found by: Coverity scan.
7142
7143 linux/getroot: fix memory leak.
7144 Found by: Coverity scan.
7145
7146 util/install: fix memory leak.
7147 Found by: Coverity scan.
7148
7149 util/setup: fix memory leak.
7150 Found by: Coverity scan.
7151
7152 linux/ofpath: fix various memory leaks.
7153 Found by: Coverity scan.
7154
7155 linux/getroot: fix descriptor leak.
7156 Found by: Coverity scan.
7157
7158 2015-01-26 Vladimir Serbinenko <phcoder@gmail.com>
7159
7160 util/misc.c: Check ftello return value.
7161 Found by: Coverity scan.
7162
7163 grub-macbless: Fix resource leak.
7164 Found by: Coverity scan.
7165
7166 grub-install: Fix memory leak.
7167 Found by: Coverity scan.
7168
7169 grub-install-common: Fix sizeof usage.
7170 Found by: Coverity scan.
7171
7172 util/getroot: Add missing grub_disk_close.
7173 Found by: Coverity scan.
7174
7175 vbe: Fix incorrect register usage.
7176 Found by: Coverity scan.
7177
7178 unix/password: Fix file descriptor leak.
7179 Found by: Coverity scan.
7180
7181 linux/getroot: Fix error handling.
7182 Found by: Coverity scan.
7183
7184 linux/blocklist: Fix memory leak.
7185 Found by: Coverity scan.
7186
7187 devmapper/getroot: Fix memory leak.
7188 Found by: Coverity scan.
7189
7190 normal/misc: Close device on all pathes.
7191 Found by: Coverity scan.
7192
7193 normal/main: Fix error handling.
7194 Found by: Coverity scan.
7195
7196 xnu: Add missing error check.
7197 Found by: Coveriy scan.
7198
7199 plan9: Add missing grub_device_close.
7200 Found by: Coverity scan.
7201
7202 multiboot: Simplify to avoid confusing assignment.
7203 Found by: Coverity scan.
7204
7205 bsd: Add missing null-pointer check.
7206 Found by: Coverity scan.
7207
7208 lib/syslinux_parse: Add missing error check.
7209 Found by: Coverity scan.
7210
7211 lib/syslinux_parse: Fix memory leak.
7212 Found by: Coveriy scan.
7213
7214 lib/syslinux_parse: Add missing alloc check.
7215 Found by: Coverity scan.
7216
7217 i386/pc/mmap: Fix memset size.
7218 Found by: Coverity scan.
7219
7220 gfxmenu/theme_loader: Add missing allos error check.
7221 Found by: Coverity scan.
7222
7223 gfxmenu/icon_manager: Fix null pointer dereference.
7224 Found by: Coverity scan.
7225
7226 fs/ufs: Add missing error check.
7227 Found by: Coverity scan.
7228
7229 configure.ac: Always add -D_FILE_OFFSET_BITS=64.
7230
7231 2015-01-25 Vladimir Serbinenko <phcoder@gmail.com>
7232
7233 fs/sfs: Fix error check and add sanity check.
7234 Found by: Coverity scan.
7235
7236 fs/reiserfs: Fix sector count overflow.
7237 Found by: Coverity scan.
7238
7239 fs/ntfs: Add sizes sanity checks.
7240 Found by: Coverity scan.
7241
7242 fs/ntfs: Add missing free.
7243 Found by: Coverity scan.
7244
7245 2015-01-25 Vladimir Serbinenko <phcoder@gmail.com>
7246
7247 fs/minix: Fix sector promotion to 64-bit.
7248 While on it make GRUB_MINIX_ZONE2SECT into function.
7249
7250 Found by: Coverity scan
7251
7252 2015-01-25 Vladimir Serbinenko <phcoder@gmail.com>
7253
7254 grub_iso9660_read: Explicitly check read_node return value.
7255 Not really needed as grub_errno is already checked but is nicer.
7256
7257 Found by: Coverity scan.
7258
7259 2015-01-25 Andrei Borzenkov <arvidjaar@gmail.com>
7260
7261 commands/fileXX: Fix remaining memory leak.
7262 Found by: Coverity Scan.
7263
7264 2015-01-25 Vladimir Serbinenko <phcoder@gmail.com>
7265
7266 fs/hfs: Add pointer sanity checks.
7267 Found by: Coverity scan.
7268
7269 fs/hfs/hfs_open: Check that mount succeeded.
7270 Found by: Coverity scan.
7271
7272 fs/fat: Fix codepath to properly free on error.
7273 Found by: Coverity scan.
7274
7275 fs/cpio_common: Add a sanity check on namesize.
7276 Found by: Coverity scan.
7277
7278 fs/cbfs: Add missing free.
7279 Found by: Coverity scan.
7280
7281 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7282
7283 font: Add missing free.
7284 Found by: Coverity Scan.
7285
7286 biosdisk: Add missing cast.
7287 Found by: Coverity scan.
7288
7289 disk/geli: Add missing free.
7290 Found by: Coverity scan.
7291
7292 disk/geli: Add missing seek success check.
7293 Found by: Coverity scan.
7294
7295 disk/diskfilter: Add missing lv presence check.
7296 Found by: Coverity scan.
7297
7298 disk/cryptodisk: Add missing error check.
7299 Found by: Coverity scan.
7300
7301 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7302
7303 disk/ahci: Fix device_map_range argument.
7304 Argument is not used on x86, hence it's gone unnoticed.
7305
7306 Found by: Coverity scan.
7307
7308 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7309
7310 disk/AFsplitter: check argument validity before doing any allocs.
7311 This avoids possible memory leaks.
7312
7313 Found by: Coverity scan.
7314
7315 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7316
7317 commands/wildcard: Add missing free.
7318 Found by: Coverity scan.
7319
7320 commands/verify: Fix sha1 context zeroing-out.
7321 Current code doesn't zero-out context completely. It's a minor issue
7322 really as sha1 init already takes care of initing the context.
7323
7324 commands/tr: Simplify and fix missing parameter test.
7325 Found by: Coverity scan
7326
7327 commands/syslinux: Add missing free.
7328 Found by: Coverity scan.
7329
7330 commands/parttool: Add missing device close.
7331 Found by: Coverity scan.
7332
7333 commands/nativedisk: Add missing device_close.
7334 Found by: Coverity scan.
7335
7336 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7337
7338 commands/macbless: Handle device opening errors correctly.
7339 Wrong variable was checked for errors.
7340
7341 Found by: Coverity scan.
7342
7343 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7344
7345 commands/macbless: Fix potential overflow.
7346 Is a minor concern as no such FS would be created under normal circumstances
7347 and failure was benign.
7348
7349 Found by: Coverity scan.
7350
7351 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7352
7353 commands/macbless: Remove incorrect grub_free.
7354 Found by: Coverity Scan
7355
7356 commands/legacycfg: Fix resource leaks.
7357
7358 zfs: Fix disk-matching logic.
7359 Reported by: Tim Chase <dweeezil>
7360
7361 commands/hdparm: Add missing grub_disk_close.
7362 Found by: Coverity scan.
7363
7364 gptsync: Add missing device_close.
7365 Found by: Coverity scan
7366
7367 commands/fileXX: Fix memory leak.
7368 Found by: Coverity Scan.
7369
7370 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7371
7372 commands/file: Change the confusing loop stop condition.
7373 Old condition was used to zero-out header variable on exit of the loop.
7374 This is correct but confusing. Replace with in-loop logic.
7375
7376 Found by: Coverity Scan.
7377
7378 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7379
7380 commands/acpi: Use ALIGN_UP rather than manual expression.
7381 Improves readability and hopefully automatic scanning.
7382
7383 Found by: Coverity Scan.
7384
7385 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7386
7387 uhci: Fix null pointer dereference.
7388 Found by: Coverity scan.
7389
7390 Always add -msoft-float to avoid compiler generating float arithmetics.
7391
7392 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7393
7394 Generate empty ChangeLog if no .git is available.
7395 When making dist from a git snapshot without repo available make dist would
7396 fail to find ChangeLog. Generate empty ChangeLog if no ChangeLog is already
7397 present and repo is not available.
7398
7399 Reported by: Andrei Borzenkov <arvidjaar@gmail.com>
7400
7401 2015-01-24 Vladimir Serbinenko <phcoder@gmail.com>
7402
7403 Makefile.am: Fix Changelog cutoff address.
7404 gitlog-to-changelog Doesn't generate entries for cutoff day, only
7405 for days after the cutoff date, adjust by one to compensate.
7406
7407 efidisk: Return the determined root disk even if partition is unknown.
7408
7409 util/grub-mkrescue.c: Always include part_msdos and part_gpt on EFI.
7410 When booted from stick, EFI would use GPT partition and our root
7411 device detection algortihm depends on GRUB's ability to see the same
7412 partitions. Hence include msdos and gpt partmap modules on EFI even when
7413 they're not needed to access root filesystem.
7414
7415 conf/Makefile.common: Remove unused {LD,C}FLAGS_CPU.
7416
7417 Autogenerate ChangeLog from git changelog.
7418 Old ChangeLog is moved to ChangeLog-2015. For all changes starting from
7419 this one ChangeLog will be generated from gitlog only on explicit make
7420 invocation and make dist.
7421
7422 2015-01-23 Vladimir Serbinenko <phcoder@gmail.com>
7423
7424 * tests/file_filter/file: Really add missing file.
7425
7426 2015-01-23 Andrei Borzenkov <arvidjaar@gmail.com>
7427
7428 Mention platform "none" in NEWS
7429
7430 2015-01-23 Andrey Borzenkov <arvidjaar@gmail.com>
7431
7432 accept also hdX as alias to native Xen disk name
7433 To be compatible with legacy pv-grub, sort disks by increasing order of handle
7434 value. This allows reusing legacy pv-grub menu.lst which is using hdX names.
7435
7436 Suggested-By: Michael Chang <mchang@suse.com>
7437 Closes: 44026