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-next>] [day] [month] [year] [list]
Message-ID: <890BF3111FB9484E9526987D912B261932E2D1@NAMAIL3.ad.lsil.com>
Date:	Tue, 25 Jul 2006 08:45:06 -0600
From:	"Ju, Seokmann" <Seokmann.Ju@...l.com>
To:	<sakurai_hiro@...t.fujitsu.com>, <James.Bottomley@...elEye.com>,
	<akpm@...l.org>
Cc:	<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	"Patro, Sumant" <Sumant.Patro@...enio.com>,
	"Yang, Bo" <Bo.Yang@...enio.com>
Subject: [PATCH 3/3] scsi : megaraid_{mm,mbox}: a fix on "kernel unaligned access address" issue

Hi,

This is a third patch which follows prevous two patches ([PATCH 1/3] and
[PATCH 2/3]).

There was an issue in the data structure defined by megaraid driver
casuing "kernel unaligned access.." messages to be displayed during
IOCTL on IA64 platform.

The issue has been reported/fixed by Sakurai Hiroomi
[sakurai_hiro@...t.fujitsu.com].

Thank you Sakurai for you help.

Thank you,

Seokmann

Signed-Off By: Seokmann Ju <seokmann.ju@...l.com>
---
diff -Naur inqwithevpd/Documentation/scsi/ChangeLog.megaraid
unaligned/Documentation/scsi/ChangeLog.megaraid
--- inqwithevpd/Documentation/scsi/ChangeLog.megaraid	2006-07-24
15:35:02.000000000 -0400
+++ unaligned/Documentation/scsi/ChangeLog.megaraid	2006-07-24
15:41:49.000000000 -0400
@@ -66,6 +66,61 @@
 	Fix: MegaRAID F/W has fixed the problem and being process of
release,
 	soon. Meanwhile, driver will filter out the request.
 
+3.	One of member in the data structure of the driver leads unaligne
+	issue on 64-bit platform.
+	Customer reporeted "kernel unaligned access addrss" issue when
+	application communicates with MegaRAID HBA driver.
+	Root Cause: in uioc_t structure, one of member had misaligned
and it
+	led system to display the error message.
+	Fix: A patch submitted to community from following folk.
+
+	> -----Original Message-----
+	> From: linux-scsi-owner@...r.kernel.org 
+	> [mailto:linux-scsi-owner@...r.kernel.org] On Behalf Of Sakurai
Hiroomi
+	> Sent: Wednesday, July 12, 2006 4:20 AM
+	> To: linux-scsi@...r.kernel.org; linux-kernel@...r.kernel.org
+	> Subject: Re: Help: strange messages from kernel on IA64
platform
+	> 
+	> Hi,
+	> 
+	> I saw same message.
+	> 
+	> When GAM(Global Array Manager) is started, The following 
+	> message output.
+	> kernel: kernel unaligned access to 0xe0000001fe1080d4, 
+	> ip=0xa000000200053371
+	> 
+	> The uioc structure used by ioctl is defined by packed,
+	> the allignment of each member are disturbed.
+	> In a 64 bit structure, the allignment of member doesn't fit 64
bit
+	> boundary. this causes this messages.
+	> In a 32 bit structure, we don't see the message because the
allinment
+	> of member fit 32 bit boundary even if packed is specified. 
+	> 
+	> patch
+	> I Add 32 bit dummy member to fit 64 bit boundary. I tested.
+	> We confirmed this patch fix the problem by IA64 server.
+	> 
+	> **************************************************************
+	> ****************
+	> --- linux-2.6.9/drivers/scsi/megaraid/megaraid_ioctl.h.orig	
+	> 2006-04-03 17:13:03.000000000 +0900
+	> +++ linux-2.6.9/drivers/scsi/megaraid/megaraid_ioctl.h	
+	> 2006-04-03 17:14:09.000000000 +0900
+	> @@ -132,6 +132,10 @@
+	>  /* Driver Data: */
+	>          void __user *           user_data;
+	>          uint32_t                user_data_len;
+	> +
+	> +        /* 64bit alignment */
+	> +        uint32_t                pad_0xBC;
+	> +
+	>          mraid_passthru_t        __user *user_pthru;
+	>  
+	>          mraid_passthru_t        *pthru32;
+	> **************************************************************
+	> ****************
+
 Release Date	: Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju
<sju@...l.com>
 Current Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module)
 Older Version	: 2.20.4.7 (scsi module), 2.20.2.6 (cmm module)
diff -Naur inqwithevpd/drivers/scsi/megaraid/megaraid_ioctl.h
unaligned/drivers/scsi/megaraid/megaraid_ioctl.h
--- inqwithevpd/drivers/scsi/megaraid/megaraid_ioctl.h	2006-07-24
15:32:27.000000000 -0400
+++ unaligned/drivers/scsi/megaraid/megaraid_ioctl.h	2006-07-24
16:40:56.000000000 -0400
@@ -132,6 +132,10 @@
 /* Driver Data: */
 	void __user *		user_data;
 	uint32_t		user_data_len;
+
+	/* 64bit alignment */
+	uint32_t                pad_for_64bit_align;
+
 	mraid_passthru_t	__user *user_pthru;
 
 	mraid_passthru_t	*pthru32;
diff -Naur inqwithevpd/drivers/scsi/megaraid/megaraid_mm.c
unaligned/drivers/scsi/megaraid/megaraid_mm.c
--- inqwithevpd/drivers/scsi/megaraid/megaraid_mm.c	2006-07-24
15:32:27.000000000 -0400
+++ unaligned/drivers/scsi/megaraid/megaraid_mm.c	2006-07-24
15:44:14.000000000 -0400
@@ -10,7 +10,7 @@
  *	   2 of the License, or (at your option) any later version.
  *
  * FILE		: megaraid_mm.c
- * Version	: v2.20.2.6 (Mar 7 2005)
+ * Version	: v2.20.2.7 (Jul 16 2006)
  *
  * Common management module
  */
diff -Naur inqwithevpd/drivers/scsi/megaraid/megaraid_mm.h
unaligned/drivers/scsi/megaraid/megaraid_mm.h
--- inqwithevpd/drivers/scsi/megaraid/megaraid_mm.h	2006-07-24
15:32:27.000000000 -0400
+++ unaligned/drivers/scsi/megaraid/megaraid_mm.h	2006-07-24
15:44:44.000000000 -0400
@@ -27,9 +27,9 @@
 #include "megaraid_ioctl.h"
 
 
-#define LSI_COMMON_MOD_VERSION	"2.20.2.6"
+#define LSI_COMMON_MOD_VERSION	"2.20.2.7"
 #define LSI_COMMON_MOD_EXT_VERSION	\
-		"(Release Date: Mon Mar 7 00:01:03 EST 2005)"
+		"(Release Date: Sun Jul 16 00:01:03 EST 2006)"
 
 
 #define LSI_DBGLVL			dbglevel
---

Download attachment "megaraid_unaligned.patch" of type "application/octet-stream" (4436 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ