<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/asm-powerpc/current.h, branch v2.6.19</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/asm-powerpc/current.h?h=v2.6.19</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/asm-powerpc/current.h?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2006-11-01T03:52:48Z</updated>
<entry>
<title>[POWERPC] Make current preempt-safe</title>
<updated>2006-11-01T03:52:48Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hugh@veritas.com</email>
</author>
<published>2006-10-31T18:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5fe8e8b88e68e517637e3f8287f1fee89e2d9252'/>
<id>urn:sha1:5fe8e8b88e68e517637e3f8287f1fee89e2d9252</id>
<content type='text'>
Repeated -j20 kernel builds on a G5 Quad running an SMP PREEMPT kernel
would often collapse within a day, some exec failing with "Bad address".
In each case examined, load_elf_binary was doing a kernel_read, but
generic_file_aio_read's access_ok saw current-&gt;thread.fs.seg as USER_DS
instead of KERNEL_DS.

objdump of filemap.o shows gcc 4.1.0 emitting "mr r5,r13 ... ld r9,416(r5)"
here for get_paca()-&gt;__current, instead of the expected and much more usual
"ld r9,416(r13)"; I've seen other gcc4s do the same, but perhaps not gcc3s.

So, if the task is preempted and rescheduled on a different cpu in between
the mr and the ld, r5 will be looking at a different paca_struct from the
one it's now on, pick up the wrong __current, and perhaps the wrong seg.
Presumably much worse could happen elsewhere, though that split is rare.

Other architectures appear to be safe (x86_64's read_pda is more limiting
than get_paca), but ppc64 needs to force "current" into one instruction.

Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] powerpc: sanitize header files for user space includes</title>
<updated>2006-01-09T04:13:08Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2005-12-16T21:43:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=88ced0314938814e1772b4d0d7ab20c52e4472b6'/>
<id>urn:sha1:88ced0314938814e1772b4d0d7ab20c52e4472b6</id>
<content type='text'>
include/asm-ppc/ had #ifdef __KERNEL__ in all header files that
are not meant for use by user space, include/asm-powerpc does
not have this yet.

This patch gets us a lot closer there. There are a few cases
where I was not sure, so I left them out. I have verified
that no CONFIG_* symbols are used outside of __KERNEL__
any more and that there are no obvious compile errors when
including any of the headers in user space libraries.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] powerpc: Merge current.h</title>
<updated>2005-11-10T00:23:53Z</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2005-11-09T02:04:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=584224e4095d8abcf2bef38efacc291be9a44c20'/>
<id>urn:sha1:584224e4095d8abcf2bef38efacc291be9a44c20</id>
<content type='text'>
This patch merges current.h.  This is a one-big-ifdef merge, but both
versions are so tiny, I think we can live with it.  While we're at it,
we get rid of the fairly pointless redirection through get_current()
in the ppc64 version.

Built and booted on POWER5 LPAR (ARCH=powerpc &amp; ARCH=ppc64).  Built
for 32-bit pmac (ARCH=powerpc &amp; ARCH=ppc).

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
</feed>
