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: <20101229161418.d34bf0d4.akpm@linux-foundation.org>
Date:	Wed, 29 Dec 2010 16:14:18 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jeff Mahoney <jeffm@...e.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Dan Carpenter <error27@...il.com>, balbir@...ux.vnet.ibm.com,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] taskstats: Use better ifdef for alignment

On Wed, 29 Dec 2010 19:12:08 -0500 Jeff Mahoney <jeffm@...e.com> wrote:

>  Commit 4be2c95d added a null field to align the taskstats structure but
>  the discussion centered around ia64. The issue exists on other platforms
>  with inefficient unaligned access and adding them piecemeal would be
>  an unmaintainable mess.
> 
>  This patch uses Dave Miller's suggestion of using a combination of
>  CONFIG_64BIT && !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to determine
>  whether alignment is needed.
> 
>  Note that this will cause breakage on those platforms with applications
>  like iotop which had hard-coded offsets into the packet to access the
>  taskstats structure.

That seems a very good reason to not apply the patch.

Tell us more, please...

>  The message seen on systems without the alignment fixes looks like:
>  kernel unaligned access to 0xe000023879dca9bc, ip=0xa000000100133d10
> 
>  The addresses may vary but resolve to locations inside __delayacct_add_tsk.
> 
> Reported-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Jeff Mahoney <jeffm@...e.com>
> ---
>  kernel/taskstats.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/kernel/taskstats.c
> +++ b/kernel/taskstats.c
> @@ -349,7 +349,7 @@ static int parse(struct nlattr *na, stru
>  	return ret;
>  }
>  
> -#ifdef CONFIG_IA64
> +#if defined(CONFIG_64BIT) && !defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)
>  #define TASKSTATS_NEEDS_PADDING 1
>  #endif
>  
--
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