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]
Date:	Fri, 2 Feb 2007 15:20:39 -0500
From:	"John W. Linville" <linville@...driver.com>
To:	"Hennerich, Michael" <Michael.Hennerich@...log.com>
Cc:	proski@....org, hermes@...son.dropbear.id.au,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fix unaligned exception in /drivers/net/wireless/orinoco.c

On Thu, Jan 18, 2007 at 09:57:18AM -0000, Hennerich, Michael wrote:
> 
> This short patch prevents an unaligned exception to occur. (GCC 4.1)
> tmp is defined as char pointer while it is later accessed as short.
> 
> Best regards,
> Michael 
> 
> Index: linux-2.6.19.2/drivers/net/wireless/orinoco.c
> ===================================================================
> --- linux-2.6.x/drivers/net/wireless/orinoco.c  (Revision 2649)
> +++ linux-2.6.x/drivers/net/wireless/orinoco.c  (Arbeitskopie)
> @@ -2053,7 +2053,7 @@
>         int err;
>         struct comp_id nic_id, sta_id;
>         unsigned int firmver;
> -       char tmp[SYMBOL_MAX_VER_LEN+1];
> +       char tmp[SYMBOL_MAX_VER_LEN+1] __attribute__ ((aligned(2)));
> 
>         /* Get the hardware version */
>         err = HERMES_READ_RECORD(hw, USER_BAP, HERMES_RID_NICID, &nic_id);

This patch seems fine, such as it is.  But, it seems like it might
also be appropriate to change hermes_read_ltv and/or hermes_read_words
to not take void * parameters?  This patch would still be needed,
but it might be more obvious to future coders?

John
-- 
John W. Linville
linville@...driver.com
-
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