- 24 3月, 2012 4 次提交
-
-
由 Javi Merino 提交于
Commit 33bf5610 ("feature removal of io_remap_page_range()") removed io_remap_page_range(), but it is still included in some arch header files. It has no in-tree users. Signed-off-by: NJavi Merino <javi.merino@arm.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Jonas Bonn <jonas@southpole.se> Cc: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Cong Wang 提交于
ARCH_HAS_NMI_WATCHDOG is a macro defined by arch, but config HARDLOCKUP_DETECTOR depends on it. This is wrong, ARCH_HAS_NMI_WATCHDOG has to be a Kconfig config, and arch's need it should select it explicitly. Signed-off-by: NWANG Cong <xiyou.wangcong@gmail.com> Acked-by: NDon Zickus <dzickus@redhat.com> Acked-by: NMike Frysinger <vapier@gentoo.org> Cc: David Howells <dhowells@redhat.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Matt Fleming 提交于
As described in commit e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Also, use the new helper function introduced in commit 5e6292c0 ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: NOleg Nesterov <oleg@redhat.com> Cc: Richard Weinberger <richard@nod.at> Signed-off-by: NMatt Fleming <matt.fleming@intel.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Matt Fleming 提交于
If we fail to setup the signal stack frame then we don't need to restore current->blocked because it is not modified by setup_signal_stack_*. Acked-by: NOleg Nesterov <oleg@redhat.com> Acked-by: NRichard Weinberger <richard@nod.at> Tested-by: NRichard Weinberger <richard@nod.at> Signed-off-by: NMatt Fleming <matt.fleming@intel.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 23 3月, 2012 1 次提交
-
-
由 Jan Kiszka 提交于
Even if the content is always 0, gdb expects us to return also ds, es, fs, and gs while in x86-64 mode. Do this to avoid ugly errors on "info registers". [jason.wessel@windriver.com: adjust NUMREGBYTES for two new regs] Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
-
- 22 3月, 2012 12 次提交
-
-
由 Jussi Kivilinna 提交于
This caused conflict with camellia-x86_64 when compiled into kernel, same function names and not static. Reported-by: NRandy Dunlap <rdunlap@xenotime.net> Signed-off-by: NJussi Kivilinna <jussi.kivilinna@mbnet.fi> Acked-by: NRandy Dunlap <rdunlap@xenotime.net> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Jussi Kivilinna 提交于
This caused conflict with twofish-x86_64-3way when compiled into kernel, same function names and not static. Reported-by: NRandy Dunlap <rdunlap@xenotime.net> Signed-off-by: NJussi Kivilinna <jussi.kivilinna@mbnet.fi> Acked-by: NRandy Dunlap <rdunlap@xenotime.net> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Andrea Arcangeli 提交于
Without this fix the cpumask_of_node() for a fake=numa=2 is: cpumask 0 ff cpumask 1 ff with the fix it's correct and it's set to: cpumask 0 55 cpumask 1 aa Signed-off-by: NAndrea Arcangeli <aarcange@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Johannes Weiner <jweiner@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Xiao Guangrong 提交于
After looking up the vma which covers or follows the cached search address, the following condition is always true: !prev_vma || (addr >= prev_vma->vm_end) so we can stop checking the previous VMA altogether. Signed-off-by: NXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Xiao Guangrong 提交于
If the required size is bigger than cached_hole_size it is better to search from free_area_cache - it is easier to get a free region, specifically for the 64 bit process whose address space is large enough Do it just as hugetlb_get_unmapped_area_topdown() in arch/x86/mm/hugetlbpage.c Signed-off-by: NXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Hillf Danton <dhillf@gmail.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Xiao Guangrong 提交于
Search again only if some holes may be skipped in the first pass. [akpm@linux-foundation.org: clean up crazy compound definition] Signed-off-by: NXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Hillf Danton <dhillf@gmail.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Matt Fleming 提交于
Use the new helper function introduced in commit 5e6292c0 ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: NOleg Nesterov <oleg@redhat.com> Acked-by: N"David S. Miller" <davem@davemloft.net> Signed-off-by: NMatt Fleming <matt.fleming@intel.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Matt Fleming 提交于
As described in commit e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Also, use the new helper function introduced in commit 5e6292c0 ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: NOleg Nesterov <oleg@redhat.com> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: NMatt Fleming <matt.fleming@intel.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Matt Fleming 提交于
setup_frame() needs to return an indication of whether it succeeded or failed in setting up the signal stack frame. If setup_frame() fails then we must not modify current->blocked. Acked-by: NOleg Nesterov <oleg@redhat.com> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: NMatt Fleming <matt.fleming@intel.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Matt Fleming 提交于
get_signal_to_deliver() already resets the signal handler if SA_ONESHOT is set in ka->sa.sa_flags, there's no need to do it again in handle_signal(). Furthermore, because we were modifying ka->sa.sa_handler (which is a copy of sighand->action[]) instead of sighand->action[] the original code actually had no effect on signal delivery. Acked-by: NOleg Nesterov <oleg@redhat.com> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: NMatt Fleming <matt.fleming@intel.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Matt Fleming 提交于
Instead of open coding the sequence from force_sigsegv() just call it. This also fixes a bug because we were modifying ka->sa.sa_handler (which is a copy of sighand->action[]), whereas the intention of the code was to modify sighand->action[] directly. As the original code was working with a copy it had no effect on signal delivery. Acked-by: NOleg Nesterov <oleg@redhat.com> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: NMatt Fleming <matt.fleming@intel.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Andrea Arcangeli 提交于
In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad() that will not like to see a pmd materializing as trans huge. It's not khugepaged causing the problem, khugepaged holds the mmap_sem in write mode (and all those sites must hold the mmap_sem in read mode to prevent pagetables to go away from under them, during code review it seems vm86 mode on 32bit kernels requires that too unless it's restricted to 1 thread per process or UP builds). The race is only with the huge pagefaults that can convert a pmd_none() into a pmd_trans_huge(). Effectively all these pmd_none_or_clear_bad() sites running with mmap_sem in read mode are somewhat speculative with the page faults, and the result is always undefined when they run simultaneously. This is probably why it wasn't common to run into this. For example if the madvise(MADV_DONTNEED) runs zap_page_range() shortly before the page fault, the hugepage will not be zapped, if the page fault runs first it will be zapped. Altering pmd_bad() not to error out if it finds hugepmds won't be enough to fix this, because zap_pmd_range would then proceed to call zap_pte_range (which would be incorrect if the pmd become a pmd_trans_huge()). The simplest way to fix this is to read the pmd in the local stack (regardless of what we read, no need of actual CPU barriers, only compiler barrier needed), and be sure it is not changing under the code that computes its value. Even if the real pmd is changing under the value we hold on the stack, we don't care. If we actually end up in zap_pte_range it means the pmd was not none already and it was not huge, and it can't become huge from under us (khugepaged locking explained above). All we need is to enforce that there is no way anymore that in a code path like below, pmd_trans_huge can be false, but pmd_none_or_clear_bad can run into a hugepmd. The overhead of a barrier() is just a compiler tweak and should not be measurable (I only added it for THP builds). I don't exclude different compiler versions may have prevented the race too by caching the value of *pmd on the stack (that hasn't been verified, but it wouldn't be impossible considering pmd_none_or_clear_bad, pmd_bad, pmd_trans_huge, pmd_none are all inlines and there's no external function called in between pmd_trans_huge and pmd_none_or_clear_bad). if (pmd_trans_huge(*pmd)) { if (next-addr != HPAGE_PMD_SIZE) { VM_BUG_ON(!rwsem_is_locked(&tlb->mm->mmap_sem)); split_huge_page_pmd(vma->vm_mm, pmd); } else if (zap_huge_pmd(tlb, vma, pmd, addr)) continue; /* fall through */ } if (pmd_none_or_clear_bad(pmd)) Because this race condition could be exercised without special privileges this was reported in CVE-2012-1179. The race was identified and fully explained by Ulrich who debugged it. I'm quoting his accurate explanation below, for reference. ====== start quote ======= mapcount 0 page_mapcount 1 kernel BUG at mm/huge_memory.c:1384! At some point prior to the panic, a "bad pmd ..." message similar to the following is logged on the console: mm/memory.c:145: bad pmd ffff8800376e1f98(80000000314000e7). The "bad pmd ..." message is logged by pmd_clear_bad() before it clears the page's PMD table entry. 143 void pmd_clear_bad(pmd_t *pmd) 144 { -> 145 pmd_ERROR(*pmd); 146 pmd_clear(pmd); 147 } After the PMD table entry has been cleared, there is an inconsistency between the actual number of PMD table entries that are mapping the page and the page's map count (_mapcount field in struct page). When the page is subsequently reclaimed, __split_huge_page() detects this inconsistency. 1381 if (mapcount != page_mapcount(page)) 1382 printk(KERN_ERR "mapcount %d page_mapcount %d\n", 1383 mapcount, page_mapcount(page)); -> 1384 BUG_ON(mapcount != page_mapcount(page)); The root cause of the problem is a race of two threads in a multithreaded process. Thread B incurs a page fault on a virtual address that has never been accessed (PMD entry is zero) while Thread A is executing an madvise() system call on a virtual address within the same 2 MB (huge page) range. virtual address space .---------------------. | | | | .-|---------------------| | | | | | |<-- B(fault) | | | 2 MB | |/////////////////////|-. huge < |/////////////////////| > A(range) page | |/////////////////////|-' | | | | | | '-|---------------------| | | | | '---------------------' - Thread A is executing an madvise(..., MADV_DONTNEED) system call on the virtual address range "A(range)" shown in the picture. sys_madvise // Acquire the semaphore in shared mode. down_read(¤t->mm->mmap_sem) ... madvise_vma switch (behavior) case MADV_DONTNEED: madvise_dontneed zap_page_range unmap_vmas unmap_page_range zap_pud_range zap_pmd_range // // Assume that this huge page has never been accessed. // I.e. content of the PMD entry is zero (not mapped). // if (pmd_trans_huge(*pmd)) { // We don't get here due to the above assumption. } // // Assume that Thread B incurred a page fault and .---------> // sneaks in here as shown below. | // | if (pmd_none_or_clear_bad(pmd)) | { | if (unlikely(pmd_bad(*pmd))) | pmd_clear_bad | { | pmd_ERROR | // Log "bad pmd ..." message here. | pmd_clear | // Clear the page's PMD entry. | // Thread B incremented the map count | // in page_add_new_anon_rmap(), but | // now the page is no longer mapped | // by a PMD entry (-> inconsistency). | } | } | v - Thread B is handling a page fault on virtual address "B(fault)" shown in the picture. ... do_page_fault __do_page_fault // Acquire the semaphore in shared mode. down_read_trylock(&mm->mmap_sem) ... handle_mm_fault if (pmd_none(*pmd) && transparent_hugepage_enabled(vma)) // We get here due to the above assumption (PMD entry is zero). do_huge_pmd_anonymous_page alloc_hugepage_vma // Allocate a new transparent huge page here. ... __do_huge_pmd_anonymous_page ... spin_lock(&mm->page_table_lock) ... page_add_new_anon_rmap // Here we increment the page's map count (starts at -1). atomic_set(&page->_mapcount, 0) set_pmd_at // Here we set the page's PMD entry which will be cleared // when Thread A calls pmd_clear_bad(). ... spin_unlock(&mm->page_table_lock) The mmap_sem does not prevent the race because both threads are acquiring it in shared mode (down_read). Thread B holds the page_table_lock while the page's map count and PMD table entry are updated. However, Thread A does not synchronize on that lock. ====== end quote ======= [akpm@linux-foundation.org: checkpatch fixes] Reported-by: NUlrich Obergfell <uobergfe@redhat.com> Signed-off-by: NAndrea Arcangeli <aarcange@redhat.com> Acked-by: NJohannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Jones <davej@redhat.com> Acked-by: NLarry Woodman <lwoodman@redhat.com> Acked-by: NRik van Riel <riel@redhat.com> Cc: <stable@vger.kernel.org> [2.6.38+] Cc: Mark Salter <msalter@redhat.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 21 3月, 2012 23 次提交
-
-
由 Kuninori Morimoto 提交于
sh_mipi uses some clocks, but the method of setup depends on CPU. Current SuperH (like sh73a0) can control all of these clocks by CPG (Clock Pulse Generator). It means we can control it by clock framework only. But on sh7372, it needs CPG settings AND sh_mipi PHYCTRL::PLLDS, and only sh7372 has PHYCTRL::PLLDS. But on current sh_mipi driver, PHYCTRL::PLLDS of sh7372 was overwrote since the callback timing of clock setting was changed by c2658b70 (fbdev: sh_mipi_dsi: fixup setup timing of sh_mipi_setup()). To solve this issue, this patch adds extra .phyctrl. This patch adds detail explanation for unclear mipi settings and fixup wrong PHYCTRL::PLLDS value for ap4evb (0xb -> 0x6). Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
-
由 Sonic Zhang 提交于
Signed-off-by: NSonic Zhang <sonic.zhang@analog.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Bob Liu 提交于
bfin_dma_5xx is not a generic name for all blackfin chips. Signed-off-by: NSonic Zhang <sonic.zhang@analog.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Sonic Zhang 提交于
Signed-off-by: NSonic Zhang <sonic.zhang@analog.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Geert Uytterhoeven 提交于
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Danny Kukawka 提交于
arch/blackfin/mach-bf537/boards/pnav10.c includes 'linux/export.h' twice. No need to include the file a second time in a #ifdef block if already included at top. Remove the duplicate. Signed-off-by: NDanny Kukawka <danny.kukawka@bisect.de> Signed-off-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Scott Jiang 提交于
Signed-off-by: NScott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Bob Liu 提交于
choose musb by default for bf527 and bf548. Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 David Howells 提交于
Disintegrate asm/system.h for Blackfin. Signed-off-by: NDavid Howells <dhowells@redhat.com> cc: uclinux-dist-devel@blackfin.uclinux.org Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Danny Kukawka 提交于
Changed bfin_get_ether_addr() to return a state and to set no random mac address if the board don't provide one. Let the caller of bfin_get_ether_addr() set a random mac address if the return value is not 0. v2: don't set random mac in bfin_get_ether_addr() Signed-off-by: NDanny Kukawka <danny.kukawka@bisect.de> Acked-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Mike Frysinger 提交于
Signed-off-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Bob Liu 提交于
cleanup ANOMALY_05000312 and ANOMALY_05000244 Signed-off-by: NRobin Getz <robin.getz@analog.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Bob Liu 提交于
Update default defconfig by selecting correct net device driver. Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Bob Liu 提交于
Add suspend flag to thread_info for suspend/resume. Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Bob Liu 提交于
we can pass sport enable pin through platform data if customer board has reset pin, add it in ad73311_gpio array and modify id to 2 Signed-off-by: NScott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Bob Liu 提交于
Signed-off-by: NScott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Bob Liu 提交于
blackfin doesn't support hardware watchpoint except for over JTAG emulator. Signed-off-by: NSonic Zhang <sonic.zhang@analog.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Scott Jiang 提交于
Signed-off-by: NScott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Bob Liu 提交于
SMP kgdb runs into dead loop without this CSYNC when one core single steps over get_core_lock_noflush and the other executes get_core_lock as a slave node. Signed-off-by: NSonic Zhang <sonic.zhang@analog.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Mike Frysinger 提交于
No other SPI controller has this field, and SPI clients should be setting this up in their own drivers. So drop it from the Blackfin controller to keep people from using it. Signed-off-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Barry Song 提交于
page mask table will overflow without xip related macros. Signed-off-by: NBarry Song <barry.song@analog.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Barry Song 提交于
Restore L1 base address and length to 0 after free else the value will be wrong. Signed-off-by: NBarry Song <barry.song@analog.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-
由 Steven Miao 提交于
Add ioctl cmd for gptimer test app and do some codecleanup(remove spaces). Signed-off-by: NSteven Miao <realmz6@gmail.com> Signed-off-by: NBob Liu <lliubbo@gmail.com>
-