Jan Kara
d3ffeb9a9a
xfs: Add helpers for inode size
...
Add helpers to return size of XFS inode on disk and when loaded in
memory.
Signed-off-by: Jan Kara <jack@suse.cz>
2015-06-12 09:27:09 +03:00
Toomas Soome
cad5cc0f5d
zfs extensible_dataset and large_blocks feature support
...
large blocks basically use extensible dataset feature, or to be exact,
setting recordsize above 128k will trigger large_block feature to be
enabled and storing such blocks is using feature extensible dataset. so
the extensible dataset is prerequisite.
Changes implement read support extensible dataset… instead of fixed DMU
types they dont specify type, making it possible to use fat zap objects
from bonus area.
2015-05-30 08:50:53 +03:00
Andrei Borzenkov
5370dcfdae
zfs: fix integer truncation in zap_lookup
...
Size after shift could exceed 16 bits; use grub_unit32_t for result.
Reported and tested by: Kostya Berger <bergerkos@yahoo.co.uk>
Closes: 44448
2015-05-14 07:50:33 +03:00
Jan Kara
a139188eb5
xfs: Convert inode numbers to cpu endianity immediately after reading
...
Currently XFS driver converted inode numbers to native endianity only
when using them to compute inode position. Although this works, it is
somewhat confusing. So convert inode numbers when reading them from disk
structures as every other field.
Signed-off-by: Jan Kara <jack@suse.cz>
2015-05-12 08:21:10 +03:00
Jan Kara
1570140f03
xfs: Fix termination loop for directory iteration
...
Directory iteration used wrong position (sizeof wrong structure) for
termination of iteration inside a directory block. Luckily the position
ended up being wrong by just 1 byte and directory entries are larger so
things worked out fine in practice. But fix the problem anyway.
Signed-off-by: Jan Kara <jack@suse.cz>
2015-05-11 14:48:14 +03:00
Andrei Borzenkov
6210b8e8f7
zfs: add missing NULL check and fix incorrect buffer overwrite
...
grub_memset should zero out padding after data end. It is not clear
why it is needed at all - ZFS block is at least 512 bytes and power
of two, so it is always multiple of 16 bytes. This grub_memset
apparently never did anything.
2015-05-03 18:57:32 +03:00
Toomas Soome
4a7ea4003b
zfs: com.delphix:embedded_data feature support
2015-05-03 18:45:40 +03:00
Toomas Soome
a1007c6af2
zfs: com.delphix:hole_birth feature support
...
In the past birth was always zero for holes. This feature started
to make use of birth for holes as well, so change code to test for
valid DVA address instead.
2015-05-03 18:11:29 +03:00
Michael Zimmermann
ed07b7e128
Add missing initializers to silence suprious warnings.
2015-03-27 14:44:41 +01:00
Vladimir Serbinenko
5fe21c9968
hfsplus: Fix potential access to uninited memory on invalid FS
2015-03-06 22:33:20 +01:00
Vladimir Serbinenko
87a04adb65
zfs/mzap_lookup: Fix argument types
2015-02-21 16:22:01 +01:00
Vladimir Serbinenko
5537a586e0
ext2: Ignore INCOMPAT_MMP.
...
It's not really incompatible as long as driver never writes to FS.
2015-02-16 21:08:37 +01:00
Vladimir Serbinenko
e20aa39ea4
ext2: Support META_BG.
...
This fixes bug that system would become unbootable after ext*
online resize if no resize_inode was created at ext* format time.
2015-02-16 20:53:26 +01:00
Andrei Borzenkov
edc94e4b0b
fs/hfsplus: fix memory leak.
...
Found by: Coverity scan.
2015-01-27 21:19:28 +03:00
Andrei Borzenkov
3900726fa8
fs/zfs/zfscrypt.c: fix indentation.
2015-01-27 21:13:10 +03:00
Andrei Borzenkov
fa13e60527
fs/zfs/zfscrypt.c: fix memory leaks.
...
Found by: Coverity scan.
2015-01-27 21:12:19 +03:00
Andrei Borzenkov
e871994849
fs/zfs/zfs.c: fix memory leak.
...
Found by: Coverity scan.
2015-01-27 20:52:27 +03:00
Vladimir Serbinenko
9ee5ae1fae
Document intentional fallthroughs.
...
Found by: Coverity scan.
2015-01-27 17:17:58 +01:00
Vladimir Serbinenko
916733ea6a
fs/zfscrypt: Add missing explicit cast.
...
Found by: Coverity scan.
2015-01-27 16:35:37 +01:00
Vladimir Serbinenko
0daf46fdbd
fs/zfs: Fix error handling.
...
Found by: Coverity Scan.
2015-01-27 16:32:21 +01:00
Vladimir Serbinenko
69a52e95d4
fs/{cbfs,cpio}: Remove useless check if mode is NULL.
...
Callers already ensure that it's not null.
Found by: Coverity Scan.
2015-01-27 16:32:21 +01:00
Vladimir Serbinenko
a4e33a8b18
fs/ufs: Add missing error check.
...
Found by: Coverity scan.
2015-01-26 09:36:19 +01:00
Vladimir Serbinenko
66baeffc0f
fs/sfs: Fix error check and add sanity check.
...
Found by: Coverity scan.
2015-01-25 20:32:31 +01:00
Vladimir Serbinenko
8c1d086689
fs/reiserfs: Fix sector count overflow.
...
Found by: Coverity scan.
2015-01-25 20:32:31 +01:00
Vladimir Serbinenko
157f9a9cca
fs/ntfs: Add sizes sanity checks.
...
Found by: Coverity scan.
2015-01-25 20:32:31 +01:00
Vladimir Serbinenko
bc0ecd7104
fs/ntfs: Add missing free.
...
Found by: Coverity scan.
2015-01-25 20:32:31 +01:00
Vladimir Serbinenko
ca793e9c05
fs/minix: Fix sector promotion to 64-bit.
...
While on it make GRUB_MINIX_ZONE2SECT into function.
Found by: Coverity scan
2015-01-25 20:32:31 +01:00
Vladimir Serbinenko
ac602ce700
grub_iso9660_read: Explicitly check read_node return value.
...
Not really needed as grub_errno is already checked but is nicer.
Found by: Coverity scan.
2015-01-25 20:32:31 +01:00
Vladimir Serbinenko
d0af2156c3
fs/hfs: Add pointer sanity checks.
...
Found by: Coverity scan.
2015-01-25 13:18:10 +01:00
Vladimir Serbinenko
4387ca78f0
fs/hfs/hfs_open: Check that mount succeeded.
...
Found by: Coverity scan.
2015-01-25 01:28:17 +01:00
Vladimir Serbinenko
83543f937a
fs/fat: Fix codepath to properly free on error.
...
Found by: Coverity scan.
2015-01-25 01:27:44 +01:00
Vladimir Serbinenko
faad548ce3
fs/cpio_common: Add a sanity check on namesize.
...
Found by: Coverity scan.
2015-01-25 00:11:59 +01:00
Vladimir Serbinenko
b6f21bcb98
fs/cbfs: Add missing free.
...
Found by: Coverity scan.
2015-01-25 00:00:49 +01:00
Vladimir Serbinenko
12a9c52e51
zfs: Fix disk-matching logic.
...
Reported by: Tim Chase <dweeezil>
2015-01-24 20:57:26 +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
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
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
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
03d79a878b
grub-core/fs/zfs/zfsinfo.c: memory leak in print_vdev_info
...
CID: 73635
2014-12-01 20:54:12 +03:00
Andrey Borzenkov
954fe77163
cleanup: grub_cpu_to_XXX_compile_time for constants
...
This tries to catch all cases where grub_cpu_to_XXX was used for constant
expressions (including sizeof).
2014-09-22 20:47:10 +04:00
Michael Chang
54bd9a0610
Fix incorrect address reference in btrfs
...
We encountered a weird random kernel initrd unpacking error on btrfs
and finally found it was caused by incorrect address reference in range
check for type GRUB_BTRFS_EXTENT_REGULAR and the entire result is
unpredictable.
This is a quick fix to make the address reference to the
grub_btrfs_extent_data structure correctly, not the pointer variable
to it.
Any suggestions to this patch is welcome.
2014-09-08 11:33:40 +01:00
Vladimir Serbinenko
33f6ce671f
* grub-core/fs/cbfs.c: Don't probe disks of unknow size.
...
Fixes hang on virtualbox.
2014-08-10 09:50:36 +02:00
Thomas Falcon
4afd0107ef
btrfs: fix get_root key comparison failures due to endianness
...
* grub-core/fs/btrfs.c (get_root): Convert
GRUB_BTRFS_ROOT_VOL_OBJECTID to little-endian.
2014-03-31 15:32:30 +01:00
Vladimir Serbinenko
2e238b3708
Make grub_zlib_decompress handle incomplete chunks.
...
Fixes squash4.
2013-12-18 23:39:49 +01:00