Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1035990

Summary: thin_dump and other persistent-data tools may perform IO to misaligned buffers on devices with block sizes larger than 512 bytes
Product: Red Hat Enterprise Linux 6 Reporter: yanfu,wang <yanwang>
Component: device-mapper-persistent-dataAssignee: Heinz Mauelshagen <heinzm>
Status: CLOSED ERRATA QA Contact: yanfu,wang <yanwang>
Severity: medium Docs Contact:
Priority: high    
Version: 6.5CC: agk, ccui, cmarthal, coughlan, heinzm, jbrassow, jorris, msnitzer, prajnoha, prockai, thornber, tlavigne, xiaoli, yanwang, zkabelac
Target Milestone: alpha   
Target Release: 6.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: device-mapper-persistent-data-0.3.2-1.el6 Doc Type: Bug Fix
Doc Text:
Cause: thin_dump and other persistent-data tools assume 512 bytes block sizes on devices accessed. Consequence: thin_dump and other persistent-data tools may perform IO to misaligned buffers. Fix: Change code to support 4K block size. Result: Tools work.
Story Points: ---
Clone Of: 960284 Environment:
Last Closed: 2014-10-14 04:35:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 960284    
Bug Blocks:    

Description yanfu,wang 2013-11-29 06:40:08 UTC
+++ This bug was initially created as a clone of Bug #960284 +++

Description of problem:
On devices with logical_block_size=4096 thin_check and thin_dump can perform IO that isn't 4K aligned.

Steps to Reproduce:
# modprobe scsi_debug sector_size=4096 dev_size_mb=128
# thin_dump /dev/sdh
read failed
# strace thin_dump /dev/sdh
...
open("/dev/sdh", O_RDONLY|O_SYNC|O_DIRECT) = 3
brk(0x155f000)                          = 0x155f000
lseek(3, 0, SEEK_SET)                   = 0
read(3, 0x153d600, 4096)                = -1 EINVAL (Invalid argument)
brk(0x155e000)                          = 0x155e000

0x153d600 isn't a 4K aligned address.

(I've also seen thin_check fail IO to when reading from an mmap() buffer that isn't 4K aligned). 
  
Actual results:
Buffers aren't aligned to logical_block_size (e.g. 4K).

Expected results:
Buffers should be aligned to logical_block_size (e.g. 4K).

Comment 8 errata-xmlrpc 2014-10-14 04:35:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1409.html