mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zgetdump: Fix overflow/truncation in part_off calculation
When calculating partition start offset during multi-volume dump processing, the result of multiplication is truncated to 32-bits thus resulting in invalid behavior in case the real offset is beyond 4Gig boundary. Signed-off-by: Mikhail Zaslonko <zaslonko@linux.vnet.ibm.com> Reviewed-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
This commit is contained in:
committed by
Michael Holzheu
parent
b4868c21bf
commit
a74103dba7
@@ -3,6 +3,11 @@ Release history for s390-tools (MIT version)
|
||||
|
||||
* __v2.2.1 (xxxx-xx-xx)__
|
||||
|
||||
For Linux kernel version: 4.15
|
||||
|
||||
Bug Fixes:
|
||||
- zgetdump: Fix handling of DASD multi-volume dump for partitions above 4 GB
|
||||
|
||||
* __v2.2.0 (2017-12-07)__
|
||||
|
||||
For Linux kernel version: 4.14
|
||||
|
||||
@@ -242,7 +242,7 @@ static void vol_init(struct vol *vol, struct vol_parm *vol_parm, int ssid,
|
||||
|
||||
sprintf(vol->bus_id, "0.%x.%04x", ssid, vol_parm->devno);
|
||||
vol->blk_size = vol_parm->blk_size << 8;
|
||||
vol->part_off = vol_parm->start_blk * vol->blk_size;
|
||||
vol->part_off = (u64)vol_parm->start_blk * vol->blk_size;
|
||||
vol->part_size = blk_cnt * vol->blk_size;
|
||||
vol->status = dev_from_busid(vol->bus_id, &vol->dev);
|
||||
vol->sign = SIGN_VALID;
|
||||
|
||||
Reference in New Issue
Block a user