lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070508191904.GA13368@mailshack.com>
Date:	Tue, 8 May 2007 21:19:04 +0200
From:	Alexander van Heukelum <heukelum@...lshack.com>
To:	"H. Peter Anvin" <hpa@...or.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Cc:	"Antonino A. Daplas" <adaplas@...il.com>, Andi Kleen <ak@...e.de>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Make bootsector stub 16-bit-only (i386)

On Tue, May 08, 2007 at 11:45:47AM -0700, H. Peter Anvin wrote:
> Alexander van Heukelum wrote:
> > 
> > Oh! A padding hole in a struct! That could be a problem. If the freeze
> > is after decompression, could you test if this makes it work again?
> > 
> 
> The correct fix is to apply __attribute__((packed)) to this structure.

Yeah, I thought about that possibility too, but the struct didn't need
that (in my opinion ugly) annotation before. Oh well, here you go.

Greetings,
	Alexander

---

Commit 89ec4c238e7a3d7e660291f3f1a8181381baad77 introduced a discrepancy
between the struct screen_info which is used by the C code, and the
PARAM_* offsets which are used in the real-mode kernel. As hpa suggests,
adding __attribute__((packed)) to the struct fixes it.

Signed-off-by: Alexander van Heukelum <heukelum@...lshack.com>

---

diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
index b02308e..4a7c24b 100644
--- a/include/linux/screen_info.h
+++ b/include/linux/screen_info.h
@@ -44,7 +44,7 @@ struct screen_info {
 	u32 capabilities;       /* 0x36 */
 				/* 0x3a -- 0x3b reserved for future expansion */
 				/* 0x3c -- 0x3f micro stack for relocatable kernels */
-};
+} __attribute__((packed));
 
 extern struct screen_info screen_info;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ