Commit graph

9522 commits

Author SHA1 Message Date
Vladimir Serbinenko
b8f537199a Generate empty ChangeLog if no .git is available.
When making dist from a git snapshot without repo available make dist would
fail to find ChangeLog. Generate empty ChangeLog if no ChangeLog is already
present and repo is not available.

Reported by: Andrei Borzenkov <arvidjaar@gmail.com>
2015-01-24 20:14:59 +01:00
Vladimir Serbinenko
14c9a72039 Makefile.am: Fix Changelog cutoff address.
gitlog-to-changelog Doesn't generate entries for cutoff day, only
for days after the cutoff date, adjust by one to compensate.
2015-01-24 20:12:51 +01:00
Vladimir Serbinenko
7d027b4d3e efidisk: Return the determined root disk even if partition is unknown. 2015-01-24 19:53:13 +01:00
Vladimir Serbinenko
eeea31b220 util/grub-mkrescue.c: Always include part_msdos and part_gpt on EFI.
When booted from stick, EFI would use GPT partition and our root
device detection algortihm depends on GRUB's ability to see the same
partitions. Hence include msdos and gpt partmap modules on EFI even when
they're not needed to access root filesystem.
2015-01-24 17:45:16 +01:00
Vladimir Serbinenko
11504d523c conf/Makefile.common: Remove unused {LD,C}FLAGS_CPU. 2015-01-24 17:44:19 +01:00
Vladimir Serbinenko
3bd0868364 Autogenerate ChangeLog from git changelog.
Old ChangeLog is moved to ChangeLog-2015. For all changes starting from
this one ChangeLog will be generated from gitlog only on explicit make
invocation and make dist.
2015-01-24 17:29:50 +01:00
Vladimir Serbinenko
8acb9dc697 * tests/file_filter/file: Really add missing file. 2015-01-23 19:46:02 +01:00
Andrei Borzenkov
edf2db97e7 Mention platform "none" in NEWS 2015-01-23 21:06:16 +03:00
Andrey Borzenkov
2f73d2733c accept also hdX as alias to native Xen disk name
To be compatible with legacy pv-grub, sort disks by increasing order of handle
value. This allows reusing legacy pv-grub menu.lst which is using hdX names.

Suggested-By: Michael Chang <mchang@suse.com>
Closes: 44026
2015-01-23 19:52:45 +03:00
Felix Janda
3bac4caa2b Remove direct _llseek code and require long filesystem libc. 2015-01-22 19:54:36 +01:00
Vladimir Serbinenko
6866f2ba37 Remove potential division by 0 in gfxmenu. 2015-01-21 17:42:15 +01:00
Vladimir Serbinenko
44b38e4988 grub_menu_init_page: Avoid returning 0 geometry to avoid divisions by 0. 2015-01-21 17:42:15 +01:00
Vladimir Serbinenko
68581b009f unix/cputime.c: Cache sc_clk_tck and check it for sanity. 2015-01-21 17:42:15 +01:00
Vladimir Serbinenko
69aee43fa6 * grub-core/kern/efi/mm.c (grub_efi_get_memory_map): Never return a
descriptor_size==0 to avoid potential divisions by zero.
2015-01-21 17:42:15 +01:00
Vladimir Serbinenko
ac8bac2496 haiku/getroot.c (grub_util_find_partition_start_os): Avoid division by zero. 2015-01-21 17:42:15 +01:00
Vladimir Serbinenko
4e0a25a4c0 rtc_get_time_ms.c (grub_rtc_get_time_ms): Avoid division by zero. 2015-01-21 17:42:14 +01:00
Vladimir Serbinenko
b666e01b9c * grub-core/loader/i386/xnu.c (guessfsb): Avoid division by 0. 2015-01-21 17:42:14 +01:00
Vladimir Serbinenko
2e62352bc2 * grub-core/kern/i386/tsc.c (calibrate_tsc): Ensure that
no division by 0 occurs.
2015-01-21 17:42:14 +01:00
Vladimir Serbinenko
e360b5d176 * include/grub/misc.h (grub_div_roundup): Remove as it's unused. 2015-01-21 17:42:14 +01:00
Vladimir Serbinenko
c453760c71 * grub-core/term/gfxterm.c: Avoid division by zero. 2015-01-21 17:42:13 +01:00
Vladimir Serbinenko
e95685dab1 Avoid division by zero in serial. 2015-01-21 17:42:13 +01:00
Vladimir Serbinenko
4816dcac19 * grub-core/video/readers/jpeg.c: Avoid division by zero. 2015-01-21 17:42:13 +01:00
Vladimir Serbinenko
750f4bacd3 * grub-core/disk/diskfilter.c: Validate volumes to avoid division by zero. 2015-01-21 17:42:13 +01:00
Vladimir Serbinenko
1b6aaddc45 term.h: Avoid returining 0-sized terminal as it may lead to division by zero. 2015-01-21 17:42:13 +01:00
Vladimir Serbinenko
475bffeae6 * grub-core/fs/zfs.c: Avoid divisions by zero. 2015-01-21 17:42:12 +01:00
Vladimir Serbinenko
9deb46e363 * grub-core/fs/btrfs.c: Avoid divisions by zero. 2015-01-21 17:42:12 +01:00
Vladimir Serbinenko
065ed900d4 grub-core/lib/pbkdf2.c (grub_crypto_pbkdf2): Check that hash len is not 0. 2015-01-21 17:42:12 +01:00
Vladimir Serbinenko
111ab3b9cc osdep/linux/blocklist.c (grub_install_get_blocklist): Check blocksize validity. 2015-01-21 17:42:12 +01:00
Vladimir Serbinenko
4200ad44fe * grub-core/disk/i386/pc/biosdisk.c: Check disk size sanity. 2015-01-21 17:42:12 +01:00
Vladimir Serbinenko
f1959b1695 * grub-core/disk/ieee1275/nand.c (grub_nand_open): Check block size
validity.
2015-01-21 17:42:11 +01:00
Vladimir Serbinenko
935863518f grub_dmraid_nv_detect: Do not divide by zero. 2015-01-21 17:42:11 +01:00
Vladimir Serbinenko
98f74998d5 * grub-core/fs/hfs.c (grub_hfs_mount): Additional filesystem sanity checks. 2015-01-21 17:42:11 +01:00
Vladimir Serbinenko
5ed3a5d049 * grub-core/fs/minix.c: Additional filesystem sanity checks. 2015-01-21 17:42:11 +01:00
Vladimir Serbinenko
47cd2645dd * grub-core/fs/ext2.c (grub_ext2_mount): Additional checks for superblock validity. 2015-01-21 17:42:11 +01:00
Vladimir Serbinenko
245e21b2b5 grub_ufs_mount: Check that sblock.ino_per_group is not 0. 2015-01-21 17:42:11 +01:00
Vladimir Serbinenko
9201cd79a3 Reject NILFS2 superblocks with over 1GiB blocks.
* grub-core/fs/nilfs2.c (grub_nilfs2_valid_sb): Check that
	block size is <= 1GiB.
2015-01-21 17:42:10 +01:00
Vladimir Serbinenko
f27ccb584c grub_ata_setaddress: Check that geometry is sane when using CHS addressing. 2015-01-21 17:42:10 +01:00
Vladimir Serbinenko
1dfe3f973e * grub-core/disk/AFSplitter.c (AF_merge): Check that mdlen is not 0. 2015-01-21 17:42:10 +01:00
Vladimir Serbinenko
44461d5af2 grub_cmd_play: Avoid division by zero. 2015-01-21 17:42:10 +01:00
Vladimir Serbinenko
30e177a05b grub-core/fs/minix.c (grub_minix_read_file): Avoid reading past the end of file. 2015-01-21 17:42:06 +01:00
Vladimir Serbinenko
af435524cd grub_fshelp_read_file: Don't attempt to read past the end of file. 2015-01-21 17:38:04 +01:00
Vladimir Serbinenko
66ce4d1aef grub_script_lexer_yywrap: Update len synchronously with line. 2015-01-21 17:38:01 +01:00
Vladimir Serbinenko
59d4036594 Replace explicit sizeof divisions by ARRAY_SIZE. 2015-01-21 17:37:31 +01:00
Kris Moore
ba3031f996 Support GELI v6 and v7 2015-01-19 21:56:41 +03:00
Andrei Borzenkov
bac5d1a64a Fix serial --rtscts option processing 2014-12-09 21:56:39 +03:00
David Kozub
17328db3b3 grub-core/kern/arm/misc.S: fix unaligned grub_uint64_t local variable
The unaligned local in __aeabi_uidivmod leads to a store to a 64bit
value at an address that is not divisible by 8 (in grub_divmod64).
The compiler most likely generates a STRD instruction to store it and
this causes an exception.

Fixes Savannah bug #43632.

This includes improvements done by Leif Lindholm.
2014-12-07 20:16:29 +03:00
Peter Nelson
58f66137a3 * grub-core/fs/ext2.c (grub_ext2_read_block): Support large sparse chunks. 2014-12-07 17:57:49 +01:00
Andrei Borzenkov
cdae5bf208 Avoid use of non-portable echo -n in grub-mkconfig
util/grub-mkconfig_lib.in(version_test_gt): "echo -n" is not really needed,
final newline is stripped by command substitution.

util/grub.d/10_kfreebsd.in, util/grub.d/10_linux.in,
util/grub.d/20_linux_xen.in: change how list is built, to avoid echo -n
completely.

util/grub.d/30_os-prober.in: add spaces to printed line directly

Closes 43668.
2014-12-07 14:56:17 +03:00
Curtis Larsen
06eadf5ebf fix double free in grub_net_recv_tcp_packet
Using the http module to download config files, produces memory errors,
after the config file is downloaded.

The error was traced to the tcp stack in grub-core/net/tcp.c. The wrong
netbuff pointer was being freed in the clean up loop.

Changing the code to free the correct netbuff pointer removes the runtime
error.

Closes 42765.
2014-12-07 11:28:57 +03:00
Andrei Borzenkov
ebb3d958aa fix memory corruption in pubkey filter over network
grub_pubkey_open closed original file after it was read; it set
io->device to NULL to prevent grub_file_close from trying to close device.
But network device itself is stacked (net -> bufio); and bufio preserved
original netfs file which hold reference to device. grub_file_close(io)
called grub_bufio_close which called grub_file_close for original file.
grub_file_close(netfs-file) now also called grub_device_close which
freed file->device->net. So file structure returned by grub_pubkey_open
now had device->net pointed to freed memory. When later file was closed,
it was attempted to be freed again.

Change grub_pubkey_open to behave like other filters - preserve original
parent file and pass grub_file_close down to parent. In this way only the
original file will close device. We really need to move this logic into
core instead.

Also plug memory leaks in error paths on the way.

Reported-By: Robert Kliewer <robert.kliewer@gmail.com>
Closes: bug #43601
2014-12-05 21:17:08 +03:00