Bug 5138
Summary: | 64bit put_unaligned/get_unaligned does not work on 32bit kernel | ||
---|---|---|---|
Product: | Other | Reporter: | Atsushi Nemoto (anemo) |
Component: | Other | Assignee: | other_other |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | akpm |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.12 | Subsystem: | |
Regression: | --- | Bisected commit-id: |
Description
Atsushi Nemoto
2005-08-27 07:46:52 UTC
bugme-daemon@kernel-bugs.osdl.org wrote: > > http://bugzilla.kernel.org/show_bug.cgi?id=5138 > > Summary: 64bit put_unaligned/get_unaligned does not work on 32bit > kernel > Kernel Version: 2.6.12 > Status: NEW > Severity: normal > Owner: other_other@kernel-bugs.osdl.org > Submitter: anemo@mba.ocn.ne.jp > > > Most recent kernel where this bug did not occur:2.6.11 > Distribution:any > Hardware Environment:mips, possibly parisc, sh, sparc > Software Environment:32bit kernel > Problem Description: > put_unaligned/get_unaligned in include/asm-generic/unaligned.h use 'unsigned > long' to hold 64bit value. > So if sizeof(long) was smaller than 8, higher 32bit will be lost. get_unaligned() looks OK to me. But yes, there is a seemingly-unneeded typecast in put_unaligned() which I think will indeed truncate 64-bit values. > get_unaligned() looks OK to me.
No, __get_unaligned() uses 'unsigned long val' to hold a 64bit value.
Also __uldp() loads a __u64 value but returns a 'unsigned long' value.
> Also __uldp() loads a __u64 value but returns a 'unsigned long' value.
Sorry, I mean __uldq().
Closing this - we seem to have fixed __get_unaligned() |