<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch, branch v2.6.25.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch?h=v2.6.25.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch?h=v2.6.25.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2008-07-03T03:46:16Z</updated>
<entry>
<title>x86: fix cpu hotplug crash</title>
<updated>2008-07-03T03:46:16Z</updated>
<author>
<name>Yanmin Zhang</name>
<email>yanmin_zhang@linux.intel.com</email>
</author>
<published>2008-06-30T16:21:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=712a9da4d9f05a918152422bbc30b601f892b62c'/>
<id>urn:sha1:712a9da4d9f05a918152422bbc30b601f892b62c</id>
<content type='text'>
Commit fcb43042ef55d2f46b0efa5d7746967cef38f056 upstream

x86: fix cpu hotplug crash

Vegard Nossum reported crashes during cpu hotplug tests:

  http://marc.info/?l=linux-kernel&amp;m=121413950227884&amp;w=4

In function _cpu_up, the panic happens when calling
__raw_notifier_call_chain at the second time. Kernel doesn't panic when
calling it at the first time. If just say because of nr_cpu_ids, that's
not right.

By checking the source code, I found that function do_boot_cpu is the culprit.
Consider below call chain:
 _cpu_up=&gt;__cpu_up=&gt;smp_ops.cpu_up=&gt;native_cpu_up=&gt;do_boot_cpu.

So do_boot_cpu is called in the end. In do_boot_cpu, if
boot_error==true, cpu_clear(cpu, cpu_possible_map) is executed. So later
on, when _cpu_up calls __raw_notifier_call_chain at the second time to
report CPU_UP_CANCELED, because this cpu is already cleared from
cpu_possible_map, get_cpu_sysdev returns NULL.

Many resources are related to cpu_possible_map, so it's better not to
change it.

Below patch against 2.6.26-rc7 fixes it by removing the bit clearing in
cpu_possible_map.

Signed-off-by: Zhang Yanmin &lt;yanmin_zhang@linux.intel.com&gt;
Tested-by: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Acked-by: Rusty Russell &lt;rusty@rustcorp.com.au&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>ptrace GET/SET FPXREGS broken</title>
<updated>2008-07-03T03:46:16Z</updated>
<author>
<name>TAKADA Yoshihito</name>
<email>takada@mbf.nifty.com</email>
</author>
<published>2008-06-30T16:22:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=66f100382995e2510e5bbae37ec4dbc4f73e4638'/>
<id>urn:sha1:66f100382995e2510e5bbae37ec4dbc4f73e4638</id>
<content type='text'>
Commit 11dbc963a8f6128595d0f6ecf138dc369e144997 upstream

ptrace GET/SET FPXREGS broken

When I update kernel 2.6.25 from 2.6.24, gdb does not work.
On 2.6.25, ptrace(PTRACE_GETFPXREGS, ...) returns ENODEV.

But 2.6.24 kernel's ptrace() returns EIO.
It is issue of compatibility.

I attached test program as pt.c and patch for fix it.

#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;unistd.h&gt;
#include &lt;signal.h&gt;
#include &lt;errno.h&gt;
#include &lt;sys/ptrace.h&gt;
#include &lt;sys/types.h&gt;

struct user_fxsr_struct {
	unsigned short	cwd;
	unsigned short	swd;
	unsigned short	twd;
	unsigned short	fop;
	long	fip;
	long	fcs;
	long	foo;
	long	fos;
	long	mxcsr;
	long	reserved;
	long	st_space[32];	/* 8*16 bytes for each FP-reg = 128 bytes */
	long	xmm_space[32];	/* 8*16 bytes for each XMM-reg = 128 bytes */
	long	padding[56];
};

int main(void)
{
  pid_t pid;

  pid = fork();

  switch(pid){
  case -1:/*  error */
    break;
  case 0:/*  child */
    child();
    break;
  default:
    parent(pid);
    break;
  }
  return 0;
}

int child(void)
{
  ptrace(PTRACE_TRACEME);
  kill(getpid(), SIGSTOP);
  sleep(10);
  return 0;
}
int parent(pid_t pid)
{
  int ret;
  struct user_fxsr_struct fpxregs;

  ret = ptrace(PTRACE_GETFPXREGS, pid, 0, &amp;fpxregs);
  if(ret &lt; 0){
    printf("%d: %s.\n", errno, strerror(errno));
  }
  kill(pid, SIGCONT);
  wait(pid);
  return 0;
}

/* in the kerel, at kernel/i387.c get_fpxregs() */

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_64 ptrace: fix sys32_ptrace task_struct leak</title>
<updated>2008-07-03T03:46:15Z</updated>
<author>
<name>Roland McGrath</name>
<email>roland@redhat.com</email>
</author>
<published>2008-06-27T20:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1e9a615bfce7996ea4d815d45d364b47ac6a74e8'/>
<id>urn:sha1:1e9a615bfce7996ea4d815d45d364b47ac6a74e8</id>
<content type='text'>
Commit 5a4646a4efed8c835f76c3b88f3155f6ab5b8d9b introduced a leak of
task_struct refs into sys32_ptrace.  This bug has already gone away in
for 2.6.26 in commit 562b80bafffaf42a6d916b0a2ee3d684220a1c10.

Signed-off-by: Roland McGrath &lt;roland@redhat.com&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86: use BOOTMEM_EXCLUSIVE on 32-bit</title>
<updated>2008-06-24T21:08:30Z</updated>
<author>
<name>Bernhard Walle</name>
<email>bwalle@suse.de</email>
</author>
<published>2008-06-20T21:31:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6433ff677312c44e46336d208b44a1f99aac11f4'/>
<id>urn:sha1:6433ff677312c44e46336d208b44a1f99aac11f4</id>
<content type='text'>
commit d3942cff620bea073fc4e3c8ed878eb1e84615ce upstream

This patch uses the BOOTMEM_EXCLUSIVE for crashkernel reservation also for
i386 and prints a error message on failure.

The patch is still for 2.6.26 since it is only bug fixing. The unification
of reserve_crashkernel() between i386 and x86_64 should be done for 2.6.27.

Signed-off-by: Bernhard Walle &lt;bwalle@suse.de&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>Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP</title>
<updated>2008-06-24T21:08:29Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-06-20T18:18:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=489cf6b0ade32067774b89e8e822a012d3f3bb96'/>
<id>urn:sha1:489cf6b0ade32067774b89e8e822a012d3f3bb96</id>
<content type='text'>
commit 89f5b7da2a6bad2e84670422ab8192382a5aeb9f upstream

KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed
the ZERO_PAGE from the VM mappings, any users of get_user_pages() will
generally now populate the VM with real empty pages needlessly.

We used to get the ZERO_PAGE when we did the "handle_mm_fault()", but
since fault handling no longer uses ZERO_PAGE for new anonymous pages,
we now need to handle that special case in follow_page() instead.

In particular, the removal of ZERO_PAGE effectively removed the core
file writing optimization where we would skip writing pages that had not
been populated at all, and increased memory pressure a lot by allocating
all those useless newly zeroed pages.

This reinstates the optimization by making the unmapped PTE case the
same as for a non-existent page table, which already did this correctly.

While at it, this also fixes the XIP case for follow_page(), where the
caller could not differentiate between the case of a page that simply
could not be used (because it had no "struct page" associated with it)
and a page that just wasn't mapped.

We do that by simply returning an error pointer for pages that could not
be turned into a "struct page *".  The error is arbitrarily picked to be
EFAULT, since that was what get_user_pages() already used for the
equivalent IO-mapped page case.

[ Also removed an impossible test for pte_offset_map_lock() failing:
  that's not how that function works ]

Acked-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Acked-by: Nick Piggin &lt;npiggin@suse.de&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86: disable mwait for AMD family 10H/11H CPUs</title>
<updated>2008-06-22T05:24:57Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2008-06-19T14:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f8bd72872adbf6cc36f370f5c6319085c3be3ec3'/>
<id>urn:sha1:f8bd72872adbf6cc36f370f5c6319085c3be3ec3</id>
<content type='text'>
back-ported from upstream commit e9623b35599fcdbc00c16535cbefbb4d5578f4ab by Vegard Nossum


The previous revert of 0c07ee38c9d4eb081758f5ad14bbffa7197e1aec left
out the mwait disable condition for AMD family 10H/11H CPUs.

Andreas Herrman said:

It depends on the CPU. For AMD CPUs that support MWAIT this is wrong.
Family 0x10 and 0x11 CPUs will enter C1 on HLT. Powersavings then
depend on a clock divisor and current Pstate of the core.

If all cores of a processor are in halt state (C1) the processor can
enter the C1E (C1 enhanced) state. If mwait is used this will never
happen.

Thus HLT saves more power than MWAIT here.

It might be best to switch off the mwait flag for these AMD CPU
families like it was introduced with commit
f039b754714a422959027cb18bb33760eb8153f0 (x86: Don't use MWAIT on AMD
Family 10)

Re-add the AMD families 10H/11H check and disable the mwait usage for
those.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86: remove mwait capability C-state check</title>
<updated>2008-06-22T05:24:57Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-06-19T14:32:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=384353364373c7c9f8134a847a35e27642cb6dae'/>
<id>urn:sha1:384353364373c7c9f8134a847a35e27642cb6dae</id>
<content type='text'>
back-ported from upstream commit a738d897b7b03b83488ae74a9bc03d26a2875dc6 by Vegard Nossum

Vegard Nossum reports:

| powertop shows between 200-400 wakeups/second with the description
| "&lt;kernel IPI&gt;: Rescheduling interrupts" when all processors have load (e.g.
| I need to run two busy-loops on my 2-CPU system for this to show up).
|
| The bisect resulted in this commit:
|
| commit 0c07ee38c9d4eb081758f5ad14bbffa7197e1aec
| Date:   Wed Jan 30 13:33:16 2008 +0100
|
|     x86: use the correct cpuid method to detect MWAIT support for C states

remove the functional effects of this patch and make mwait unconditional.

A future patch will turn off mwait on specific CPUs where that causes
power to be wasted.

Bisected-by: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Tested-by: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Vegard Nossum &lt;vegard.nossum@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86-64: Fix "bytes left to copy" return value for copy_from_user()</title>
<updated>2008-06-22T05:24:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-06-18T00:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=864f24395c72b6a6c48d13f409f986dc71a5cf4a'/>
<id>urn:sha1:864f24395c72b6a6c48d13f409f986dc71a5cf4a</id>
<content type='text'>
commit 42a886af728c089df8da1b0017b0e7e6c81b5335 upstream

Most users by far do not care about the exact return value (they only
really care about whether the copy succeeded in its entirety or not),
but a few special core routines actually care deeply about exactly how
many bytes were copied from user space.

And the unrolled versions of the x86-64 user copy routines would
sometimes report that it had copied more bytes than it actually had.

Very few uses actually have partial copies to begin with, but to make
this bug even harder to trigger, most x86 CPU's use the "rep string"
instructions for normal user copies, and that version didn't have this
issue.

To make it even harder to hit, the one user of this that really cared
about the return value (and used the uncached version of the copy that
doesn't use the "rep string" instructions) was the generic write
routine, which pre-populated its source, once more hiding the problem by
avoiding the exception case that triggers the bug.

In other words, very special thanks to Bron Gondwana who not only
triggered this, but created a test-program to show it, and bisected the
behavior down to commit 08291429cfa6258c4cd95d8833beb40f828b194e ("mm:
fix pagecache write deadlocks") which changed the access pattern just
enough that you can now trigger it with 'writev()' with multiple
iovec's.

That commit itself was not the cause of the bug, it just allowed all the
stars to align just right that you could trigger the problem.

[ Side note: this is just the minimal fix to make the copy routines
  (with __copy_from_user_inatomic_nocache as the particular version that
  was involved in showing this) have the right return values.

  We really should improve on the exceptional case further - to make the
  copy do a byte-accurate copy up to the exact page limit that causes it
  to fail.  As it is, the callers have to do extra work to handle the
  limit case gracefully. ]

Reported-by: Bron Gondwana &lt;brong@fastmail.fm&gt;
Cc: Nick Piggin &lt;npiggin@suse.de&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86: fix recursive dependencies</title>
<updated>2008-06-16T20:20:06Z</updated>
<author>
<name>Roman Zippel</name>
<email>zippel@linux-m68k.org</email>
</author>
<published>2008-02-29T04:09:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dbeda1b14c51a1490d43975e506252cbe4964e21'/>
<id>urn:sha1:dbeda1b14c51a1490d43975e506252cbe4964e21</id>
<content type='text'>
commit 823c248e7cc75b4f22da914b01f8e5433cff197e in mainline

The proper dependency check uncovered a few dependency problems,
the subarchitecture used a mixture of selects and depends on SMP
and PCI dependency was messed up.

Signed-off-by: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Ravikiran Thirumalai &lt;kiran@scalex86.org&gt;

</content>
</entry>
<entry>
<title>Kconfig: introduce ARCH_DEFCONFIG to DEFCONFIG_LIST</title>
<updated>2008-06-16T20:20:05Z</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2008-05-25T21:03:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c7559a1531958785bdc25363f8cde154011c0f9d'/>
<id>urn:sha1:c7559a1531958785bdc25363f8cde154011c0f9d</id>
<content type='text'>
commit 73531905ed53576d9e8707659a761e7046a60497 in mainline.

init/Kconfig contains a list of configs that are searched
for if 'make *config' are used with no .config present.
Extend this list to look at the config identified by
ARCH_DEFCONFIG.

With this change we now try the defconfig targets last.

This fixes a regression reported
by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

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