<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/lib, branch linux-2.6.30.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-03-12T11:21:17Z</updated>
<entry>
<title>x86: memcpy, clean up</title>
<updated>2009-03-12T11:21:17Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2009-03-12T11:20:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f3b6eaf0149186ad0637512ec363582c91e06ee6'/>
<id>urn:sha1:f3b6eaf0149186ad0637512ec363582c91e06ee6</id>
<content type='text'>
Impact: cleanup

Make this file more readable by bringing it more in line
with the usual kernel style.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86-64: remove unnecessary spill/reload of rbx from memcpy</title>
<updated>2009-03-12T11:04:47Z</updated>
<author>
<name>Jan Beulich</name>
</author>
<published>2009-03-12T10:47:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd1ef4ec4721ddc0a1f2b73a4f67930cb320665c'/>
<id>urn:sha1:dd1ef4ec4721ddc0a1f2b73a4f67930cb320665c</id>
<content type='text'>
Impact: micro-optimization

This should slightly improve its performance.

Signed-off-by: Jan Beulich &lt;jbeulich@novell.com&gt;
LKML-Reference: &lt;49B8F641.76E4.0078.0@novell.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: use _types.h headers in asm where available</title>
<updated>2009-02-13T19:35:01Z</updated>
<author>
<name>Jeremy Fitzhardinge</name>
</author>
<published>2009-02-13T19:14:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0341c14da49e7b93d2998926f6ac89a3129e3fa1'/>
<id>urn:sha1:0341c14da49e7b93d2998926f6ac89a3129e3fa1</id>
<content type='text'>
In general, the only definitions that assembly files can use
are in _types.S headers (where available), so convert them.

Signed-off-by: Jeremy Fitzhardinge &lt;jeremy.fitzhardinge@citrix.com&gt;
</content>
</entry>
<entry>
<title>x86: use early clobbers in usercopy*.c</title>
<updated>2009-01-21T08:43:17Z</updated>
<author>
<name>Andi Kleen</name>
</author>
<published>2009-01-16T14:22:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0a96129db574d6365e3439d16d88517c437ab33'/>
<id>urn:sha1:e0a96129db574d6365e3439d16d88517c437ab33</id>
<content type='text'>
Impact: fix rare (but currently harmless) miscompile with certain configs and gcc versions

Hugh Dickins noticed that strncpy_from_user() was miscompiled
in some circumstances with gcc 4.3.

Thanks to Hugh's excellent analysis it was easy to track down.

Hugh writes:

&gt; Try building an x86_64 defconfig 2.6.29-rc1 kernel tree,
&gt; except not quite defconfig, switch CONFIG_PREEMPT_NONE=y
&gt; and CONFIG_PREEMPT_VOLUNTARY off (because it expands a
&gt; might_fault() there, which hides the issue): using a
&gt; gcc 4.3.2 (I've checked both openSUSE 11.1 and Fedora 10).
&gt;
&gt; It generates the following:
&gt;
&gt; 0000000000000000 &lt;__strncpy_from_user&gt;:
&gt;    0:   48 89 d1                mov    %rdx,%rcx
&gt;    3:   48 85 c9                test   %rcx,%rcx
&gt;    6:   74 0e                   je     16 &lt;__strncpy_from_user+0x16&gt;
&gt;    8:   ac                      lods   %ds:(%rsi),%al
&gt;    9:   aa                      stos   %al,%es:(%rdi)
&gt;    a:   84 c0                   test   %al,%al
&gt;    c:   74 05                   je     13 &lt;__strncpy_from_user+0x13&gt;
&gt;    e:   48 ff c9                dec    %rcx
&gt;   11:   75 f5                   jne    8 &lt;__strncpy_from_user+0x8&gt;
&gt;   13:   48 29 c9                sub    %rcx,%rcx
&gt;   16:   48 89 c8                mov    %rcx,%rax
&gt;   19:   c3                      retq
&gt;
&gt; Observe that "sub %rcx,%rcx; mov %rcx,%rax", whereas gcc 4.2.1
&gt; (and many other configs) say "sub %rcx,%rdx; mov %rdx,%rax".
&gt; Isn't it returning 0 when it ought to be returning strlen?

The asm constraints for the strncpy_from_user() result were missing an
early clobber, which tells gcc that the last output arguments
are written before all input arguments are read.

Also add more early clobbers in the rest of the file and fix 32-bit
usercopy.c in the same way.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
[ since this API is rarely used and no in-kernel user relies on a 'len'
  return value (they only rely on negative return values) this miscompile
  was never noticed in the field. But it's worth fixing it nevertheless. ]
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Merge commit 'v2.6.28-rc2' into core/locking</title>
<updated>2008-10-28T15:54:49Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2008-10-28T15:54:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1a76187a5be4f89c6cb19d800cb5fb7aac735c5'/>
<id>urn:sha1:d1a76187a5be4f89c6cb19d800cb5fb7aac735c5</id>
<content type='text'>
Conflicts:
	arch/um/include/asm/system.h
</content>
</entry>
<entry>
<title>Merge branch 'x86/unify-cpu-detect' into x86-v28-for-linus-phase4-D</title>
<updated>2008-10-11T18:23:20Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2008-10-11T18:23:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0afe2db21394820d32646a695eccf3fbfe6ab5c7'/>
<id>urn:sha1:0afe2db21394820d32646a695eccf3fbfe6ab5c7</id>
<content type='text'>
Conflicts:
	arch/x86/kernel/cpu/common.c
	arch/x86/kernel/signal_64.c
	include/asm-x86/cpufeature.h
</content>
</entry>
<entry>
<title>x86: some lock annotations for user copy paths, v3</title>
<updated>2008-09-11T19:42:59Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2008-09-11T18:53:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1d18ef489509314506328b9e464dd47c24c1d68f'/>
<id>urn:sha1:1d18ef489509314506328b9e464dd47c24c1d68f</id>
<content type='text'>
- add annotation back to clear_user()
- change probe_kernel_address() to _inatomic*() method

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: some lock annotations for user copy paths, v2</title>
<updated>2008-09-11T07:44:21Z</updated>
<author>
<name>Nick Piggin</name>
</author>
<published>2008-09-10T11:37:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ee1afa308f2a38e5d1e2ad3752ad7abcf480da1'/>
<id>urn:sha1:3ee1afa308f2a38e5d1e2ad3752ad7abcf480da1</id>
<content type='text'>
 - introduce might_fault()
 - handle the atomic user copy paths correctly

[ mingo@elte.hu: move might_sleep() outside of in_atomic(). ]
Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: some lock annotations for user copy paths</title>
<updated>2008-09-10T11:48:49Z</updated>
<author>
<name>Nick Piggin</name>
</author>
<published>2008-09-10T11:37:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c10d38dda1774ed4540380333cabd229eff37094'/>
<id>urn:sha1:c10d38dda1774ed4540380333cabd229eff37094</id>
<content type='text'>
copy_to/from_user and all its variants (except the atomic ones) can take a
page fault and perform non-trivial work like taking mmap_sem and entering
the filesyste/pagecache.

Unfortunately, this often escapes lockdep because a common pattern is to
use it to read in some arguments just set up from userspace, or write data
back to a hot buffer. In those cases, it will be unlikely for page reclaim
to get a window in to cause copy_*_user to fault.

With the new might_lock primitives, add some annotations to x86. I don't
know if I caught all possible faulting points (it's a bit of a maze, and I
didn't really look at 32-bit). But this is a starting point.

Boots and runs OK so far.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: drop -funroll-loops for csum_partial_64.c</title>
<updated>2008-09-04T15:42:06Z</updated>
<author>
<name>Andi Kleen</name>
</author>
<published>2008-09-04T11:46:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb481dd56adf3c5b0993b8f052cc9ba966e3959d'/>
<id>urn:sha1:fb481dd56adf3c5b0993b8f052cc9ba966e3959d</id>
<content type='text'>
Impact: performance optimization

I did some rebenchmarking with modern compilers and dropping
-funroll-loops makes the function consistently go faster by a few
percent.  So drop that flag.

Thanks to Richard Guenther for a hint.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
</feed>
