1. 29 Feb, 2008 2 commits
    • Lennert Buytenhek's avatar
      [ARM] 4837/1: make __get_unaligned_*() return unsigned types · 94a3f785
      Lennert Buytenhek authored
      Eric Sandeen tracked an XFS on ARM corruption bug down to a function
      under fs/xfs/ involving some get_unaligned() calls on u64 pointers.
      As it turns out, calling ARM's get_unaligned() on a u64 pointer
      pointing to the following byte sequence:
      
      	80 81 82 83 84 85 86 87
      
      would return ffffffff83828180 (LE mode.)  This turns out to be
      because of implicit u8 -> int promotion in ARM's implementation of
      various helpers for get_unaligned(), causing them to accidentally
      return signed instead of unsigned values, which in turn caused the
      subsequent casts to unsigned long long in __get_unaligned_8_[bl]e()
      to sign-extend the lower words.
      
      Fix by casting the return values of __get_unaligned_[24]_[bl]e()
      to unsigned int.
      
      Cc: Eric Sandeen <sandeen@sandeen.net>
      Cc: Rabeeh Khoury <rabeeh@marvell.com>
      Cc: Nicolas Pitre <nico@marvell.com>
      Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      94a3f785
    • Uli Luckas's avatar
      [ARM] 4836/1: Make ATAGS_PROC depend on KEXEC · b98d7291
      Uli Luckas authored
      On Wed, Feb 20, 2008 at 11:50:33AM +0100, Guennadi Liakhovetski wrote:
      > arch/arm/kernel/atags.c uses for some reason the
      > KEXEC_BOOT_PARAMS_SIZE macro, which is only defined if CONFIG_KEXEC
      > is set. So, either this macro should be defined always, or another
      > macro should be used, or ATAGS_PROC should depend on KEXEC.
      
      As the procfs export of ATAGS is not meant as a stable, general purpose
      ABI it shouldn't be an independent, general configuration option.
      
      This patch make ATAGS_PROC depend on KEXEC
      Signed-off-by: default avatarUli Luckas <u.luckas@road.de>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      b98d7291
  2. 24 Feb, 2008 38 commits