Bug 64601

Summary: fix unaligned access warnings on big endian machines
Product: udisks Reporter: Helge Deller <deller>
Component: detectionAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: PA-RISC (HP)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: patch for get_le32()

Description Helge Deller 2013-05-14 19:52:13 UTC
Created attachment 79315 [details]
patch for get_le32()

On big endian machines (in my case parisc) unaligned accesses to 32bit
 integers gives warnings during boot like this:

 udisks-part-id(3035): unaligned access to 0xc06d29ce at ip=0x00012a03
 udisks-part-id(3035): unaligned access to 0xc06d29d2 at ip=0x00012a3b
 udisks-part-id(3035): unaligned access to 0xc06d29de at ip=0x00012a03
 udisks-part-id(3035): unaligned access to 0xc06d29e2 at ip=0x00012a3b
 udisks-part-id(3035): unaligned access to 0xc06d29ee at ip=0x00012a03

 Fix this by copying the 4 bytes to an aligned address and then access
 it.

Patch attached.
Comment 1 Martin Pitt 2014-12-18 09:58:07 UTC
This only applies to udisks 1.x which has been unmaintained for several years. udisks 2.x does not contain this code any more.

Thus I'm closing this. Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.