Bug 158930 - 32-bit GETBLKSIZE ioctl overflows incorrectly on 64-bit hosts.
32-bit GETBLKSIZE ioctl overflows incorrectly on 64-bit hosts.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.0
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Stephen Tweedie
Brian Brock
:
Depends On:
Blocks: 156322
  Show dependency treegraph
 
Reported: 2005-05-26 18:43 EDT by Stephen Tweedie
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHSA-2005-514
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-05 09:18:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix EFBIG for 32-bit GETBLKSIZE ioctl compatibility (1.22 KB, patch)
2005-05-26 18:50 EDT, Stephen Tweedie
no flags Details | Diff

  None (edit)
Description Stephen Tweedie 2005-05-26 18:43:59 EDT
Description of problem:

The 32-bit compatibility GETBLKSIZE ioctl on 64-bit kernels truncates the 64-bit
long return value to 32-bits.  Unfortunately, this wraps back to zero at the 2TB
point, returning an incorrect device size.  On a 32-bit kernel, the ioctl
returns an EFBIG error on such an overflow, allowing the application to fall
back on an alternative method of determining the device size (such as the
GETBLKSIZE64 ioctl.)

Version-Release number of selected component (if applicable):

kernel-2.6.9-6.37.EL

How reproducible:
100%

Steps to Reproduce:
1. Run the "verify-data" tool with "verify-data -Q /dev/$dev" on a device larger
than 2TB
(see http://people.redhat.com/sct/src/verify-data/ )

Actual results:
GETBLKSIZE returns incorrect size

Expected results:
GETBLKSIZE returns EFBIG
Comment 1 Stephen Tweedie 2005-05-26 18:45:14 EDT
This has only been seen in internal testing of >2TB devices.  It will be
encountered any time a 32-bit application attempts to determine device size on a
64-bit kernel for devices >2TB.
Comment 2 Stephen Tweedie 2005-05-26 18:50:11 EDT
Created attachment 114897 [details]
Fix EFBIG for 32-bit GETBLKSIZE ioctl compatibility
Comment 12 Red Hat Bugzilla 2005-10-05 09:18:17 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-514.html

Note You need to log in before you can comment on or make changes to this bug.