Hello community, here is the log from the commit of package pmtools checked in at Fri Apr 20 15:59:13 CEST 2007. -------- --- arch/i386/pmtools/pmtools.changes 2007-03-29 15:32:13.000000000 +0200 +++ /mounts/work_src_done/STABLE/pmtools/pmtools.changes 2007-04-20 15:25:46.000000000 +0200 @@ -1,0 +2,5 @@ +Fri Apr 20 15:25:35 CEST 2007 - schwab@suse.de + +- Fix unaligned accesses. + +------------------------------------------------------------------- New: ---- unaligned.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pmtools.spec ++++++ --- /var/tmp/diff_new_pack.h18677/_old 2007-04-20 15:58:09.000000000 +0200 +++ /var/tmp/diff_new_pack.h18677/_new 2007-04-20 15:58:09.000000000 +0200 @@ -13,7 +13,7 @@ Name: pmtools URL: http://www.intel.com/technology/iapc/acpi/downloads.htm Version: 20061026 -Release: 13 +Release: 15 %define acpica acpica-unix-20060912 License: GNU General Public License (GPL) Group: Development/Tools/Other @@ -25,6 +25,7 @@ Patch3: pmtools-override-CFLAGS.diff Patch4: pmtools-move-includes.diff Patch5: madt.diff +Patch6: unaligned.diff Source2: dmidecode-2.9.tar.bz2 Source3: %{acpica}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -48,6 +49,7 @@ %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 %build make all CFLAGS="$RPM_OPT_FLAGS" @@ -93,6 +95,8 @@ /%{_mandir}/man8/* %changelog +* Fri Apr 20 2007 - schwab@suse.de +- Fix unaligned accesses. * Thu Mar 29 2007 - coolo@suse.de - BuildRequire flex and bison * Mon Feb 26 2007 - jdelvare@suse.de ++++++ unaligned.diff ++++++ --- acpidump/acpidump.c +++ acpidump/acpidump.c @@ -275,8 +275,15 @@ num = (sdt->length - sizeof(struct acpi_table_header))/((xsdt)?sizeof(u64):sizeof(u32)); offset = (char *)sdt + sizeof(struct acpi_table_header); for (i = 0; i < num; ++i, offset += ((xsdt) ? sizeof(u64) : sizeof(u32))) { - addr = (xsdt) ? (unsigned long)(*(u64 *)offset): - (unsigned long)(*(u32 *)offset); + if (xsdt) { + u64 tmp; + memcpy(&tmp, offset, sizeof(tmp)); + addr = (unsigned long)tmp; + } else { + u32 tmp; + memcpy(&tmp, offset, sizeof(tmp)); + addr = (unsigned long)tmp; + } if (!addr) continue; tbl = acpi_map_table(addr, 0); if (!tbl) continue; @@ -289,10 +296,13 @@ } acpi_unmap_table(tbl); if (connect) { - if (xsdt) - (*(u64*)offset) = lseek(fd, 0, SEEK_CUR); - else - (*(u32*)offset) = lseek(fd, 0, SEEK_CUR); + if (xsdt) { + u64 tmp = lseek(fd, 0, SEEK_CUR); + memcpy(offset, &tmp, sizeof(tmp)); + } else { + u32 tmp = lseek(fd, 0, SEEK_CUR); + memcpy(offset, &tmp, sizeof(tmp)); + } } } if (xsdt) { ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org