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: <20080126220023.4d1256b6.akpm@linux-foundation.org>
Date:	Sat, 26 Jan 2008 22:00:23 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	David Teigland <teigland@...hat.com>
Cc:	linux-kernel@...r.kernel.org, fabbione@...ntu.com
Subject: Re: [PATCH 06/19] dlm: align midcomms message buffer

> On Thu, 24 Jan 2008 10:50:29 -0600 David Teigland <teigland@...hat.com> wrote:
> From: Fabio M. Di Nitto <fabbione@...ntu.com>
> 
> gcc does not guarantee that a static buffer is 64bit aligned. This change
> allows sparc64 to work.
> 

This buffer is not static: changelog needs fixing: s/static/auto/

> ---
>  fs/dlm/midcomms.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/dlm/midcomms.c b/fs/dlm/midcomms.c
> index f8c69dd..da653b5 100644
> --- a/fs/dlm/midcomms.c
> +++ b/fs/dlm/midcomms.c
> @@ -58,7 +58,7 @@ static void copy_from_cb(void *dst, const void *base, unsigned offset,
>  int dlm_process_incoming_buffer(int nodeid, const void *base,
>  				unsigned offset, unsigned len, unsigned limit)
>  {
> -	unsigned char __tmp[DLM_INBUF_LEN];
> +	unsigned char __tmp[DLM_INBUF_LEN] __attribute__((aligned(64)));
>  	struct dlm_header *msg = (struct dlm_header *) __tmp;
>  	int ret = 0;
>  	int err = 0;

Why does DLM require that this thing be 64-bit aligned?

It all looks rather ugly.  Can't this stuff be implemeted within the C type
system somehow?
--
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