<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/arch, branch v2.6.28.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.28.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.28.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2009-02-02T17:53:28Z</updated>
<entry>
<title>x86, pat: fix PTE corruption issue while mapping RAM using /dev/mem</title>
<updated>2009-02-02T17:53:28Z</updated>
<author>
<name>Suresh Siddha</name>
<email>suresh.b.siddha@intel.com</email>
</author>
<published>2009-01-29T00:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d3349f421244ed74c091810ec204ecc34f607f03'/>
<id>urn:sha1:d3349f421244ed74c091810ec204ecc34f607f03</id>
<content type='text'>
commit 9597134218300c045cf219be3664615e97cb239c upstream.

Beschorner Daniel reported:
&gt; hwinfo problem since 2.6.28, showing this in the oops:
&gt;   Corrupted page table at address 7fd04de3ec00

Also, PaX Team reported a regression with this commit:

&gt;   commit 9542ada803198e6eba29d3289abb39ea82047b92
&gt;   Author: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
&gt;   Date:   Wed Sep 24 08:53:33 2008 -0700
&gt;
&gt;       x86: track memtype for RAM in page struct

This commit breaks mapping any RAM page through /dev/mem, as the
reserve_memtype() was not initializing the return attribute type and as such
corrupting the PTE entry that was setup with the return attribute type.

Because of this bug, application mapping this RAM page through /dev/mem
will die with "Corrupted page table at address xxxx" message in the kernel
log and also the kernel identity mapping which maps the underlying RAM
page gets converted to UC.

Fix this by initializing the return attribute type before calling
reserve_ram_pages_type()

Reported-by: PaX Team &lt;pageexec@freemail.hu&gt;
Reported-and-tested-by: Beschorner Daniel &lt;Daniel.Beschorner@facton.com&gt;
Tested-and-Acked-by: PaX Team &lt;pageexec@freemail.hu&gt;
Signed-off-by: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86, pat: fix reserve_memtype() for legacy 1MB range</title>
<updated>2009-02-02T17:53:28Z</updated>
<author>
<name>Suresh Siddha</name>
<email>suresh.b.siddha@intel.com</email>
</author>
<published>2009-01-29T00:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0998e51b3d7f860438fb1971d667c2b2f1cc2e48'/>
<id>urn:sha1:0998e51b3d7f860438fb1971d667c2b2f1cc2e48</id>
<content type='text'>
commit 5cca0cf15a94417f49625ce52e23589eed0a1675 upstream
 
Thierry Vignaud reported:
&gt; http://bugzilla.kernel.org/show_bug.cgi?id=12372
&gt;
&gt; On P4 with an SiS motherboard (video card is a SiS 651)
&gt; X server fails to start with error:
&gt; xf86MapVidMem: Could not mmap framebuffer (0x00000000,0x2000) (Invalid
&gt; argument)

Here X is trying to map first 8KB of memory using /dev/mem. Existing
code treats first 0-4KB of memory as non-RAM and 4KB-8KB as RAM. Recent
code changes don't allow to map memory with different attributes
at the same time.

Fix this by treating the first 1MB legacy region as special and always
track the attribute requests with in this region using linear linked
list (and don't bother if the range is RAM or non-RAM or mixed)

Reported-and-tested-by: Thierry Vignaud &lt;tvignaud@mandriva.com&gt;
Signed-off-by: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>alpha: nautilus - fix compile failure with gcc-4.3</title>
<updated>2009-02-02T17:53:21Z</updated>
<author>
<name>Ivan Kokshaysky</name>
<email>ink@jurassic.park.msu.ru</email>
</author>
<published>2009-01-15T21:51:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b0d9586b9f4869c996fc7ed50ac4e0272aace2d0'/>
<id>urn:sha1:b0d9586b9f4869c996fc7ed50ac4e0272aace2d0</id>
<content type='text'>
commit 70b66cbfd3316b792a855cb9a2574e85f1a63d0f upstream.

init_srm_irq() deals with irq's #16 and above, but size of irq_desc
array on nautilus and some other system types is 16. So gcc-4.3
complains that "array subscript is above array bounds", even though
this function is never called on those systems.

This adds a check for NR_IRQS &lt;= 16, which effectively optimizes
init_srm_irq() code away on problematic platforms.

Thanks to Daniel Drake &lt;dsd@gentoo.org&gt; for detailed analysis
of the problem.

Signed-off-by: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Cc: Richard Henderson &lt;rth@twiddle.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Tobias Klausmann &lt;klausman@schwarzvogel.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86: fix page attribute corruption with cpa()</title>
<updated>2009-02-02T17:53:20Z</updated>
<author>
<name>Suresh Siddha</name>
<email>suresh.b.siddha@intel.com</email>
</author>
<published>2009-01-20T22:20:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2ba861c907726fc65bcefa0a90933ead714f2241'/>
<id>urn:sha1:2ba861c907726fc65bcefa0a90933ead714f2241</id>
<content type='text'>
commit a1e46212a410793d575718818e81ddc442a65283 upstream.

Impact: fix sporadic slowdowns and warning messages

This patch fixes a performance issue reported by Linus on his
Nehalem system. While Linus reverted the PAT patch (commit
58dab916dfb57328d50deb0aa9b3fc92efa248ff) which exposed the issue,
existing cpa() code can potentially still cause wrong(page attribute
corruption) behavior.

This patch also fixes the "WARNING: at arch/x86/mm/pageattr.c:560" that
various people reported.

In 64bit kernel, kernel identity mapping might have holes depending
on the available memory and how e820 reports the address range
covering the RAM, ACPI, PCI reserved regions. If there is a 2MB/1GB hole
in the address range that is not listed by e820 entries, kernel identity
mapping will have a corresponding hole in its 1-1 identity mapping.

If cpa() happens on the kernel identity mapping which falls into these holes,
existing code fails like this:

	__change_page_attr_set_clr()
		__change_page_attr()
			returns 0 because of if (!kpte). But doesn't
			set cpa-&gt;numpages and cpa-&gt;pfn.
		cpa_process_alias()
			uses uninitialized cpa-&gt;pfn (random value)
			which can potentially lead to changing the page
			attribute of kernel text/data, kernel identity
			mapping of RAM pages etc. oops!

This bug was easily exposed by another PAT patch which was doing
cpa() more often on kernel identity mapping holes (physical range between
max_low_pfn_mapped and 4GB), where in here it was setting the
cache disable attribute(PCD) for kernel identity mappings aswell.

Fix cpa() to handle the kernel identity mapping holes. Retain
the WARN() for cpa() calls to other not present address ranges
(kernel-text/data, ioremap() addresses)

Signed-off-by: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86, mm: fix pte_free()</title>
<updated>2009-02-02T17:53:19Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2009-01-23T16:37:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=16fd8be997245025ed5252f12306fff28801335b'/>
<id>urn:sha1:16fd8be997245025ed5252f12306fff28801335b</id>
<content type='text'>
commit 42ef73fe134732b2e91c0326df5fd568da17c4b2 upstream.

On -rt we were seeing spurious bad page states like:

Bad page state in process 'firefox'
page:c1bc2380 flags:0x40000000 mapping:c1bc2390 mapcount:0 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Pid: 503, comm: firefox Not tainted 2.6.26.8-rt13 #3
[&lt;c043d0f3&gt;] ? printk+0x14/0x19
[&lt;c0272d4e&gt;] bad_page+0x4e/0x79
[&lt;c0273831&gt;] free_hot_cold_page+0x5b/0x1d3
[&lt;c02739f6&gt;] free_hot_page+0xf/0x11
[&lt;c0273a18&gt;] __free_pages+0x20/0x2b
[&lt;c027d170&gt;] __pte_alloc+0x87/0x91
[&lt;c027d25e&gt;] handle_mm_fault+0xe4/0x733
[&lt;c043f680&gt;] ? rt_mutex_down_read_trylock+0x57/0x63
[&lt;c043f680&gt;] ? rt_mutex_down_read_trylock+0x57/0x63
[&lt;c0218875&gt;] do_page_fault+0x36f/0x88a

This is the case where a concurrent fault already installed the PTE and
we get to free the newly allocated one.

This is due to pgtable_page_ctor() doing the spin_lock_init(&amp;page-&gt;ptl)
which is overlaid with the {private, mapping} struct.

union {
    struct {
        unsigned long private;
        struct address_space *mapping;
    };
    spinlock_t ptl;
    struct kmem_cache *slab;
    struct page *first_page;
};

Normally the spinlock is small enough to not stomp on page-&gt;mapping, but
PREEMPT_RT=y has huge 'spin'locks.

But lockdep kernels should also be able to trigger this splat, as the
lock tracking code grows the spinlock to cover page-&gt;mapping.

The obvious fix is calling pgtable_page_dtor() like the regular pte free
path __pte_free_tlb() does.

It seems all architectures except x86 and nm10300 already do this, and
nm10300 doesn't seem to use pgtable_page_ctor(), which suggests it
doesn't do SMP or simply doesnt do MMU at all or something.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlsta@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices</title>
<updated>2009-01-25T00:41:46Z</updated>
<author>
<name>Dave Kleikamp</name>
<email>shaggy@linux.vnet.ibm.com</email>
</author>
<published>2009-01-14T09:09:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c185df273d7364bbb654070d3a77b3c635ff8e34'/>
<id>urn:sha1:c185df273d7364bbb654070d3a77b3c635ff8e34</id>
<content type='text'>
commit 9ba0fdbfaed2e74005d87fab948c5522b86ff733 upstream.

powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices

The subpage_prot syscall fails on second and subsequent calls for a given
region, because is_hugepage_only_range() is mis-identifying the 4 kB
slices when the process has a 64 kB page size.

Signed-off-by: Dave Kleikamp &lt;shaggy@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>IA64: Turn on CONFIG_HAVE_UNSTABLE_CLOCK</title>
<updated>2009-01-25T00:41:36Z</updated>
<author>
<name>Tony Luck</name>
<email>tony.luck@intel.com</email>
</author>
<published>2009-01-15T18:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9a9dbab691be99f95f4dc2db698ba6f652f7e30b'/>
<id>urn:sha1:9a9dbab691be99f95f4dc2db698ba6f652f7e30b</id>
<content type='text'>
commit 0773a6cf673316440999752e23f8c3d4f85e48b9 upstream.

sched_clock() on ia64 is based on ar.itc, so is never
completely synchronized between cpus. On some platforms
(e.g. certain models of SGI Altix) it may be running at
radically different frequencies.

Based on a patch from Dimitri Sivanich which set this
just for SN2 &amp;&amp; GENERIC kernels ... it is needed for
all ia64 machines.

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>powerpc: Disable Collaborative Memory Manager for kdump</title>
<updated>2009-01-18T18:44:05Z</updated>
<author>
<name>Brian King</name>
<email>brking@linux.vnet.ibm.com</email>
</author>
<published>2008-12-18T11:13:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ec7e974f17675e06f4498c08661cdf4d1c4c0146'/>
<id>urn:sha1:ec7e974f17675e06f4498c08661cdf4d1c4c0146</id>
<content type='text'>
commit 2218108e182fd8a6d9106077833ed7ad05fc8e75 upstream.

When running Active Memory Sharing, the Collaborative Memory Manager
(CMM) may mark some pages as "loaned" with the hypervisor.
Periodically, the CMM will query the hypervisor for a loan request,
which is a single signed value.  When kexec'ing into a kdump kernel,
the CMM driver in the kdump kernel is not aware of the pages the
previous kernel had marked as "loaned", so the hypervisor and the CMM
driver are out of sync.  This results in the CMM driver getting a
negative loan request, which can then get treated as a large unsigned
value and can cause kdump to hang due to the CMM driver inflating too
large.  Since there really is no clean way for the CMM driver in the
kdump kernel to clean this up, simply disable CMM in the kdump kernel.
This fixes hangs we were seeing doing kdump with AMS.

Signed-off-by: Brian King &lt;brking@linux.vnet.ibm.com&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86: avoid theoretical vmalloc fault loop</title>
<updated>2009-01-18T18:44:04Z</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2009-01-09T20:17:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=87a071a978a7defb98c278afbae066a670a973de'/>
<id>urn:sha1:87a071a978a7defb98c278afbae066a670a973de</id>
<content type='text'>
commit f313e12308f7c5ea645f18e759d104d088b18615 upstream.

Ajith Kumar noticed:

 I was going through the vmalloc fault handling for x86_64 and am unclear
 about the following lines in the vmalloc_fault() function.

 pgd = pgd_offset(current-&gt;mm ?: &amp;init_mm, address);
 pgd_ref = pgd_offset_k(address);

 Here the intention is to get the pgd corresponding to the current process
 and sync it up with the pgd in init_mm(obtained from pgd_offset_k).
 However, for kernel threads current-&gt;mm is NULL and hence pgd =
 pgd_offset(init_mm, address) = pgd_ref which means the fault handler
 returns without setting the pgd entry in the MM structure in the context
 of which the kernel thread has faulted.  This could lead to never-ending
 faults and busy looping of kernel threads like pdflush.  So, shouldn't the
 pgd = pgd_offset(current-&gt;mm ?: &amp;init_mm, address); be pgd =
 pgd_offset(current-&gt;active_mm ?: &amp;init_mm, address);

We can use active_mm unconditionally because it should be always set.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86: fix RIP printout in early_idt_handler</title>
<updated>2009-01-18T18:44:02Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@gmail.com</email>
</author>
<published>2009-01-03T23:27:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=703726d14c4ec5320dec747268d219899f6e8f82'/>
<id>urn:sha1:703726d14c4ec5320dec747268d219899f6e8f82</id>
<content type='text'>
commit 7aed55d1085f71241284a30af0300feea48c36db upstream.

Impact: fix debug/crash printout

Since errorcode is popped out, RIP is on the top of the stack.
Use real RIP value instead of wrong CS.

Signed-off-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
