1. 13 1月, 2015 2 次提交
    • M
      arm: macro whitespace fixes · 295bb01e
      Michael S. Tsirkin 提交于
      While working on arch/arm/include/asm/uaccess.h, I noticed
      that some macros within this header are made harder to read because they
      violate a coding style rule: space is missing after comma.
      
      Fix it up.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      295bb01e
    • M
      arm: fix put_user sparse errors · e8b94dea
      Michael S. Tsirkin 提交于
      virtio wants to write bitwise types to userspace using put_user.
      At the moment this triggers sparse errors, since the value is passed
      through an integer.
      
      For example:
      
      	__le32 __user *p;
      	__le32 x;
      	put_user(x, p);
      
      is safe, but currently triggers a sparse warning.
      
      Fix that up using __force.
      
      Note: this does not suppress any useful sparse checks since caller
      assigns x to typeof(*p), which in turn forces all the necessary type
      checks.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      e8b94dea
  2. 13 9月, 2014 1 次提交
    • V
      ARM: 8137/1: fix get_user BE behavior for target variable with size of 8 bytes · d9981380
      Victor Kamensky 提交于
      e38361d0 'ARM: 8091/2: add get_user() support for 8 byte types' commit
      broke V7 BE get_user call when target var size is 64 bit, but '*ptr' size
      is 32 bit or smaller. e38361d0 changed type of __r2 from 'register
      unsigned long' to 'register typeof(x) __r2 asm("r2")' i.e before the change
      even when target variable size was 64 bit, __r2 was still 32 bit.
      But after e38361d0 commit, for target var of 64 bit size, __r2 became 64
      bit and now it should occupy 2 registers r2, and r3. The issue in BE case
      that r3 register is least significant word of __r2 and r2 register is most
      significant word of __r2. But __get_user_4 still copies result into r2 (most
      significant word of __r2). Subsequent code copies from __r2 into x, but
      for situation described it will pick up only garbage from r3 register.
      
      Special __get_user_64t_(124) functions are introduced. They are similar to
      corresponding __get_user_(124) function but result stored in r3 register
      (lsw in case of 64 bit __r2 in BE image). Those function are used by
      get_user macro in case of BE and target var size is 64bit.
      
      Also changed __get_user_lo8 name into __get_user_32t_8 to get consistent
      naming accross all cases.
      Signed-off-by: NVictor Kamensky <victor.kamensky@linaro.org>
      Suggested-by: NDaniel Thompson <daniel.thompson@linaro.org>
      Reviewed-by: NDaniel Thompson <daniel.thompson@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d9981380
  3. 18 7月, 2014 1 次提交
    • D
      ARM: 8091/2: add get_user() support for 8 byte types · e38361d0
      Daniel Thompson 提交于
      Recent contributions, including to DRM and binder, introduce 64-bit
      values in their interfaces. A common motivation for this is to allow
      the same ABI for 32- and 64-bit userspaces (and therefore also a shared
      ABI for 32/64 hybrid userspaces). Anyhow, the developers would like to
      avoid gotchas like having to use copy_from_user().
      
      This feature is already implemented on x86-32 and the majority of other
      32-bit architectures. The current list of get_user_8 hold out
      architectures are: arm, avr32, blackfin, m32r, metag, microblaze,
      mn10300, sh.
      
      Credit:
      
          My name sits rather uneasily at the top of this patch. The v1 and
          v2 versions of the patch were written by Rob Clark and to produce v4
          I mostly copied code from Russell King and H. Peter Anvin. However I
          have mangled the patch sufficiently that *blame* is rightfully mine
          even if credit should more widely shared.
      
      Changelog:
      
      v5: updated to use the ret macro (requested by Russell King)
      v4: remove an inlined add on big endian systems (spotted by Russell King),
          used __ARMEB__ rather than BIG_ENDIAN (to match rest of file),
          cleared r3 on EFAULT during __get_user_8.
      v3: fix a couple of checkpatch issues
      v2: pass correct size to check_uaccess, and better handling of narrowing
          double word read with __get_user_xb() (Russell King's suggestion)
      v1: original
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Thompson <daniel.thompson@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      e38361d0
  4. 01 7月, 2014 1 次提交
    • U
      ARM: make user_addr_max more robust · 83de911c
      Uwe Kleine-König 提交于
      With CONFIG_MMU=y get_fs() returns current_thread_info()->addr_limit
      which is initialized as USER_DS (which in turn is defined to TASK_SIZE)
      for userspace processes. At least theoretically
      current_thread_info()->addr_limit is changable by set_fs() to a
      different limit, so checking for KERNEL_DS is more robust.
      
      With !CONFIG_MMU get_fs returns KERNEL_DS. To see what the old variant
      did you'd have to find out that USER_DS == KERNEL_DS which isn't needed
      any more with the variant this patch introduces. So it's a bit easier to
      understand, too.
      
      Also if the limit was changed this limit should be returned, not
      TASK_SIZE.
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      83de911c
  5. 26 5月, 2014 1 次提交
  6. 10 2月, 2014 1 次提交
  7. 18 9月, 2013 1 次提交
  8. 10 10月, 2012 1 次提交
    • A
      ARM: warnings in arch/arm/include/asm/uaccess.h · 8e7fc18b
      Arnd Bergmann 提交于
      On NOMMU ARM, the __addr_ok() and __range_ok() macros do not evaluate
      their arguments, which may lead to harmless build warnings in some
      code where the variables are not used otherwise. Adding a cast to void
      gets rid of the warning and does not make any semantic changes.
      
      Without this patch, building at91x40_defconfig results in:
      
      fs/read_write.c: In function 'rw_copy_check_uvector':
      fs/read_write.c:684:9: warning: unused variable 'buf' [-Wunused-variable]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      8e7fc18b
  9. 10 9月, 2012 2 次提交
  10. 10 7月, 2012 1 次提交
  11. 29 3月, 2012 1 次提交
  12. 25 1月, 2012 1 次提交
  13. 04 11月, 2010 1 次提交
    • C
      ARM: 6384/1: Remove the domain switching on ARMv6k/v7 CPUs · 247055aa
      Catalin Marinas 提交于
      This patch removes the domain switching functionality via the set_fs and
      __switch_to functions on cores that have a TLS register.
      
      Currently, the ioremap and vmalloc areas share the same level 1 page
      tables and therefore have the same domain (DOMAIN_KERNEL). When the
      kernel domain is modified from Client to Manager (via the __set_fs or in
      the __switch_to function), the XN (eXecute Never) bit is overridden and
      newer CPUs can speculatively prefetch the ioremap'ed memory.
      
      Linux performs the kernel domain switching to allow user-specific
      functions (copy_to/from_user, get/put_user etc.) to access kernel
      memory. In order for these functions to work with the kernel domain set
      to Client, the patch modifies the LDRT/STRT and related instructions to
      the LDR/STR ones.
      
      The user pages access rights are also modified for kernel read-only
      access rather than read/write so that the copy-on-write mechanism still
      works. CPU_USE_DOMAINS gets disabled only if the hardware has a TLS register
      (CPU_32v6K is defined) since writing the TLS value to the high vectors page
      isn't possible.
      
      The user addresses passed to the kernel are checked by the access_ok()
      function so that they do not point to the kernel space.
      Tested-by: NAnton Vorontsov <cbouatmailru@gmail.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      247055aa
  14. 21 4月, 2010 1 次提交
    • R
      ARM: fix build error in arch/arm/kernel/process.c · 4260415f
      Russell King 提交于
      /tmp/ccJ3ssZW.s: Assembler messages:
      /tmp/ccJ3ssZW.s:1952: Error: can't resolve `.text' {.text section} - `.LFB1077'
      
      This is caused because:
      
      	.section .data
      	.section .text
      	.section .text
      	.previous
      
      does not return us to the .text section, but the .data section; this
      makes use of .previous dangerous if the ordering of previous sections
      is not known.
      
      Fix up the other users of .previous; .pushsection and .popsection are
      a safer pairing to use than .section and .previous.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4260415f
  15. 24 7月, 2009 1 次提交
  16. 30 5月, 2009 1 次提交
    • N
      [ARM] allow for alternative __copy_to_user/__clear_user implementations · a1f98849
      Nicolas Pitre 提交于
      This allows for optional alternative implementations of __copy_to_user
      and __clear_user, with a possible runtime fallback to the standard
      version when the alternative provides no gain over that standard
      version. This is done by making the standard __copy_to_user into a weak
      alias for the symbol __copy_to_user_std.  Same thing for __clear_user.
      
      Those two functions are particularly good candidates to have alternative
      implementations for, since they rely on the STRT instruction which has
      lower performances than STM instructions on some CPU cores such as
      the ARM1176 and Marvell Feroceon.
      Signed-off-by: NNicolas Pitre <nico@marvell.com>
      a1f98849
  17. 30 11月, 2008 1 次提交
  18. 27 11月, 2008 1 次提交
    • R
      [ARM] remove memzero() · 59f0cb0f
      Russell King 提交于
      As suggested by Andrew Morton, remove memzero() - it's not supported
      on other architectures so use of it is a potential build breaking bug.
      Since the compiler optimizes memset(x,0,n) to __memzero() perfectly
      well, we don't miss out on the underlying benefits of memzero().
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      59f0cb0f
  19. 01 9月, 2008 1 次提交
  20. 03 8月, 2008 1 次提交
  21. 18 2月, 2007 1 次提交
  22. 12 2月, 2007 1 次提交
  23. 28 10月, 2006 1 次提交
  24. 12 10月, 2006 1 次提交
  25. 29 6月, 2006 2 次提交
  26. 18 11月, 2005 1 次提交
  27. 08 9月, 2005 1 次提交
  28. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4